diff --git a/.npmignore b/.npmignore index 9ad259ee..abca4290 100644 --- a/.npmignore +++ b/.npmignore @@ -4,6 +4,7 @@ !/REACT_QUERY.md !/**/*.ts !/**/*.js +!/**/*.json !/**/*.map /.eslintrc.js diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4d634574..64795acd 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 79567c4a-05f9-4d65-864d-dfe107aa4e9d management: - docChecksum: 53b3a2c569506446ace146aa7cf48d28 + docChecksum: 02b8b3922a054ba10bca24dac8f57fff docVersion: 0.0.1 - speakeasyVersion: 1.463.1 - generationVersion: 2.486.6 - releaseVersion: 1.2.2 - configChecksum: f8999a74e1a63f3c167f0ca6e1c8db53 + speakeasyVersion: 1.468.9 + generationVersion: 2.493.21 + releaseVersion: 1.3.0 + configChecksum: 4bfbd2ede6ba5f3a1dda550c898c7e66 repoURL: https://github.com/vercel/sdk.git installationURL: https://github.com/vercel/sdk published: true @@ -14,7 +14,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.11 - core: 3.18.12 + core: 3.18.16 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 devContainers: 2.90.0 @@ -22,15 +22,17 @@ features: enumUnions: 0.1.0 enums: 2.82.1 envVarSecurityUsage: 0.1.2 - examples: 2.81.4 + examples: 2.81.5 globalSecurity: 2.82.12 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 globalServerURLs: 2.82.4 + mockServer: 0.1.0 nullables: 0.1.0 responseFormat: 0.2.3 retries: 2.83.0 sdkHooks: 0.2.0 + tests: 0.11.4 unions: 2.85.8 uploadStreams: 0.1.0 generatedFiles: @@ -52,6 +54,17 @@ generatedFiles: - docs/models/action1.md - docs/models/active.md - docs/models/activedashboardviews.md + - docs/models/addbypassiprequest.md + - docs/models/addbypassiprequestbody.md + - docs/models/addbypassiprequestbody1.md + - docs/models/addbypassiprequestbody2.md + - docs/models/addbypassipresponsebody.md + - docs/models/addbypassipresponsebody1.md + - docs/models/addbypassipresponsebody2.md + - docs/models/addbypassipresponsebodyaction.md + - docs/models/addbypassipresponsebodyresult.md + - docs/models/addbypassipresponsebodysecurityresult.md + - docs/models/additionalroles.md - docs/models/addprojectdomainredirectstatuscode.md - docs/models/addprojectdomainrequest.md - docs/models/addprojectdomainrequestbody.md @@ -621,6 +634,9 @@ generatedFiles: - docs/models/deleteteamrequest.md - docs/models/deleteteamrequestbody.md - docs/models/deleteteamresponsebody.md + - docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md + - docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md + - docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md - docs/models/deletewebhookrequest.md - docs/models/deliveryformat.md - docs/models/deployhooks.md @@ -876,6 +892,12 @@ generatedFiles: - docs/models/getauthtokenrequest.md - docs/models/getauthtokenresponsebody.md - docs/models/getauthuserresponsebody.md + - docs/models/getbypassiprequest.md + - docs/models/getbypassipresponsebody.md + - docs/models/getbypassipresponsebody1.md + - docs/models/getbypassipresponsebody2.md + - docs/models/getbypassipresponsebodypagination.md + - docs/models/getbypassipresponsebodyresult.md - docs/models/getcertbyidrequest.md - docs/models/getcertbyidresponsebody.md - docs/models/getcheckchecksresponse200applicationjsonsource.md @@ -1438,6 +1460,11 @@ generatedFiles: - docs/models/getteamrequest.md - docs/models/getteamsrequest.md - docs/models/getteamsresponsebody.md + - docs/models/getv9projectsidornamecustomenvironmentsenvironments.md + - docs/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md + - docs/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md + - docs/models/getv9projectsidornamecustomenvironmentsrequest.md + - docs/models/getv9projectsidornamecustomenvironmentsresponsebody.md - docs/models/getwebhookevents.md - docs/models/getwebhookrequest.md - docs/models/getwebhookresponsebody.md @@ -1631,11 +1658,20 @@ generatedFiles: - docs/models/patchteamrequest.md - docs/models/patchteamrequestbody.md - docs/models/patchteamsaml.md + - docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridbranchmatcher.md + - docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md + - docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md + - docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md + - docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridtype.md - docs/models/paths.md - docs/models/period.md - docs/models/permissions.md - docs/models/php.md - docs/models/plan.md + - docs/models/postv1projectsidornamecustomenvironmentsrequest.md + - docs/models/postv1projectsidornamecustomenvironmentsrequestbody.md + - docs/models/postv1projectsidornamecustomenvironmentsresponsebody.md + - docs/models/postv1projectsidornamecustomenvironmentstype.md - docs/models/preferredscopesandgitnamespaces.md - docs/models/production.md - docs/models/project.md @@ -1747,6 +1783,11 @@ generatedFiles: - docs/models/redirectstatuscode.md - docs/models/remotecaching.md - docs/models/remotepatterns.md + - docs/models/removebypassiprequest.md + - docs/models/removebypassiprequestbody.md + - docs/models/removebypassiprequestbody1.md + - docs/models/removebypassiprequestbody2.md + - docs/models/removebypassipresponsebody.md - docs/models/removecertrequest.md - docs/models/removecertresponsebody.md - docs/models/removeprojectdomainrequest.md @@ -1919,6 +1960,7 @@ generatedFiles: - docs/models/responsebody1.md - docs/models/responsebody2.md - docs/models/responsebody3.md + - docs/models/responsebodyaction.md - docs/models/responsebodyaliasassignedat.md - docs/models/responsebodyaliaserror.md - docs/models/responsebodyaliases.md @@ -1972,6 +2014,7 @@ generatedFiles: - docs/models/responsebodyreadysubstate.md - docs/models/responsebodyrecords.md - docs/models/responsebodyremotepatterns.md + - docs/models/responsebodyresult.md - docs/models/responsebodyrole.md - docs/models/responsebodyroutes.md - docs/models/responsebodyscope.md @@ -2048,6 +2091,7 @@ generatedFiles: - docs/models/submitinvoicerequest.md - docs/models/submitinvoicerequestbody.md - docs/models/submitinvoiceresponsebody.md + - docs/models/tagids.md - docs/models/target.md - docs/models/target1.md - docs/models/target2.md @@ -2255,6 +2299,7 @@ generatedFiles: - docs/models/updateprojectdatacachepaths.md - docs/models/updateprojectdatacacheplan.md - docs/models/updateprojectdatacacheprojectsaliaserror.md + - docs/models/updateprojectdatacacheprojectsbranchmatcher.md - docs/models/updateprojectdatacacheprojectsbuilds.md - docs/models/updateprojectdatacacheprojectschecksconclusion.md - docs/models/updateprojectdatacacheprojectschecksstate.md @@ -2400,6 +2445,9 @@ generatedFiles: - docs/models/updaterecordrequestbody.md - docs/models/updaterecordresponsebody.md - docs/models/updaterecordtype.md + - docs/models/updateresourcesecretsbyidrequest.md + - docs/models/updateresourcesecretsbyidrequestbody.md + - docs/models/updateresourcesecretsbyidsecrets.md - docs/models/updateresourcesecretsrequest.md - docs/models/updateresourcesecretsrequestbody.md - docs/models/updateteammemberjoinedfrom.md @@ -2450,6 +2498,7 @@ generatedFiles: - docs/sdks/dns/README.md - docs/sdks/domains/README.md - docs/sdks/edgeconfig/README.md + - docs/sdks/environment/README.md - docs/sdks/integrations/README.md - docs/sdks/logdrains/README.md - docs/sdks/marketplace/README.md @@ -2462,6 +2511,378 @@ generatedFiles: - docs/sdks/webhooks/README.md - jsr.json - package.json + - src/__tests__/accessgroups.test.ts + - src/__tests__/aliases.test.ts + - src/__tests__/artifacts.test.ts + - src/__tests__/assertions.ts + - src/__tests__/authentication.test.ts + - src/__tests__/certs.test.ts + - src/__tests__/checks.test.ts + - src/__tests__/deployments.test.ts + - src/__tests__/dns.test.ts + - src/__tests__/domains.test.ts + - src/__tests__/edgeconfig.test.ts + - src/__tests__/environment.test.ts + - src/__tests__/files.ts + - src/__tests__/integrations.test.ts + - src/__tests__/logdrains.test.ts + - src/__tests__/marketplace.test.ts + - src/__tests__/mockserver/Dockerfile + - src/__tests__/mockserver/Makefile + - src/__tests__/mockserver/README.md + - src/__tests__/mockserver/go.mod + - src/__tests__/mockserver/go.sum + - src/__tests__/mockserver/internal/handler/assert/contenttype.go + - src/__tests__/mockserver/internal/handler/assert/header.go + - src/__tests__/mockserver/internal/handler/assert/parameter.go + - src/__tests__/mockserver/internal/handler/assert/pointer.go + - src/__tests__/mockserver/internal/handler/assert/security.go + - src/__tests__/mockserver/internal/handler/doc.go + - src/__tests__/mockserver/internal/handler/generated_handler.go + - src/__tests__/mockserver/internal/handler/generated_handlers.go + - src/__tests__/mockserver/internal/handler/pathdeletev13deploymentsid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1accessgroupsaccessgroupidornameprojectsprojectid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1accessgroupsidorname.go + - src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigidschema.go + - src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigidtokens.go + - src/__tests__/mockserver/internal/handler/pathdeletev1integrationsconfigurationid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1integrationslogdrainsid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1logdrainsid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1projectsidornamemembersuid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1securityfirewallbypass.go + - src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamidinvitesinviteid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamidmembersuid.go + - src/__tests__/mockserver/internal/handler/pathdeletev1user.go + - src/__tests__/mockserver/internal/handler/pathdeletev1webhooksid.go + - src/__tests__/mockserver/internal/handler/pathdeletev2aliasesaliasid.go + - src/__tests__/mockserver/internal/handler/pathdeletev2domainsdomainrecordsrecordid.go + - src/__tests__/mockserver/internal/handler/pathdeletev3usertokenstokenid.go + - src/__tests__/mockserver/internal/handler/pathdeletev6domainsdomain.go + - src/__tests__/mockserver/internal/handler/pathdeletev7certsid.go + - src/__tests__/mockserver/internal/handler/pathdeletev9projectsidorname.go + - src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornamecustomenvironmentsenvironmentslugorid.go + - src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornamedomainsdomain.go + - src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornameenvid.go + - src/__tests__/mockserver/internal/handler/pathgetv13deploymentsidorurl.go + - src/__tests__/mockserver/internal/handler/pathgetv1accessgroups.go + - src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsaccessgroupidornameprojectsprojectid.go + - src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidorname.go + - src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidornamemembers.go + - src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidornameprojects.go + - src/__tests__/mockserver/internal/handler/pathgetv1deploymentsdeploymentidchecks.go + - src/__tests__/mockserver/internal/handler/pathgetv1deploymentsdeploymentidcheckscheckid.go + - src/__tests__/mockserver/internal/handler/pathgetv1domainsdomainregistry.go + - src/__tests__/mockserver/internal/handler/pathgetv1edgeconfig.go + - src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigid.go + - src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidbackups.go + - src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigiditemedgeconfigitemkey.go + - src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigiditems.go + - src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidschema.go + - src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidtokens.go + - src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidtokentoken.go + - src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidaccount.go + - src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidbillinginvoicesinvoiceid.go + - src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidmembermemberid.go + - src/__tests__/mockserver/internal/handler/pathgetv1integrationsconfigurationid.go + - src/__tests__/mockserver/internal/handler/pathgetv1integrationsgitnamespaces.go + - src/__tests__/mockserver/internal/handler/pathgetv1integrationssearchrepo.go + - src/__tests__/mockserver/internal/handler/pathgetv1logdrains.go + - src/__tests__/mockserver/internal/handler/pathgetv1logdrainsid.go + - src/__tests__/mockserver/internal/handler/pathgetv1projectsidornameenvid.go + - src/__tests__/mockserver/internal/handler/pathgetv1projectsprojectidpromotealiases.go + - src/__tests__/mockserver/internal/handler/pathgetv1securityfirewallbypass.go + - src/__tests__/mockserver/internal/handler/pathgetv1securityfirewallconfigconfigversion.go + - src/__tests__/mockserver/internal/handler/pathgetv1teamsteamidrequestuserid.go + - src/__tests__/mockserver/internal/handler/pathgetv1webhooks.go + - src/__tests__/mockserver/internal/handler/pathgetv1webhooksid.go + - src/__tests__/mockserver/internal/handler/pathgetv2deploymentsidaliases.go + - src/__tests__/mockserver/internal/handler/pathgetv2integrationslogdrains.go + - src/__tests__/mockserver/internal/handler/pathgetv2teams.go + - src/__tests__/mockserver/internal/handler/pathgetv2teamsteamid.go + - src/__tests__/mockserver/internal/handler/pathgetv2teamsteamidmembers.go + - src/__tests__/mockserver/internal/handler/pathgetv3deploymentsidorurlevents.go + - src/__tests__/mockserver/internal/handler/pathgetv3events.go + - src/__tests__/mockserver/internal/handler/pathgetv4aliases.go + - src/__tests__/mockserver/internal/handler/pathgetv4aliasesidoralias.go + - src/__tests__/mockserver/internal/handler/pathgetv4domainsprice.go + - src/__tests__/mockserver/internal/handler/pathgetv4domainsstatus.go + - src/__tests__/mockserver/internal/handler/pathgetv5domains.go + - src/__tests__/mockserver/internal/handler/pathgetv5domainsdomain.go + - src/__tests__/mockserver/internal/handler/pathgetv5usertokens.go + - src/__tests__/mockserver/internal/handler/pathgetv5usertokenstokenid.go + - src/__tests__/mockserver/internal/handler/pathgetv6deployments.go + - src/__tests__/mockserver/internal/handler/pathgetv6deploymentsidfiles.go + - src/__tests__/mockserver/internal/handler/pathgetv6domainsdomainconfig.go + - src/__tests__/mockserver/internal/handler/pathgetv7certsid.go + - src/__tests__/mockserver/internal/handler/pathgetv7deploymentsidfilesfileid.go + - src/__tests__/mockserver/internal/handler/pathgetv8artifactshash.go + - src/__tests__/mockserver/internal/handler/pathgetv8artifactsstatus.go + - src/__tests__/mockserver/internal/handler/pathgetv9projects.go + - src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamecustomenvironments.go + - src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamecustomenvironmentsenvironmentslugorid.go + - src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamedomains.go + - src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamedomainsdomain.go + - src/__tests__/mockserver/internal/handler/pathheadv8artifactshash.go + - src/__tests__/mockserver/internal/handler/pathpatchv12deploymentsidcancel.go + - src/__tests__/mockserver/internal/handler/pathpatchv1accessgroupsaccessgroupidornameprojectsprojectid.go + - src/__tests__/mockserver/internal/handler/pathpatchv1datacacheprojectsprojectid.go + - src/__tests__/mockserver/internal/handler/pathpatchv1deploymentsdeploymentidcheckscheckid.go + - src/__tests__/mockserver/internal/handler/pathpatchv1domainsrecordsrecordid.go + - src/__tests__/mockserver/internal/handler/pathpatchv1projectsidornameprotectionbypass.go + - src/__tests__/mockserver/internal/handler/pathpatchv1securityfirewallconfig.go + - src/__tests__/mockserver/internal/handler/pathpatchv1teamsteamidmembersuid.go + - src/__tests__/mockserver/internal/handler/pathpatchv2teamsteamid.go + - src/__tests__/mockserver/internal/handler/pathpatchv9projectsidorname.go + - src/__tests__/mockserver/internal/handler/pathpatchv9projectsidornamecustomenvironmentsenvironmentslugorid.go + - src/__tests__/mockserver/internal/handler/pathpatchv9projectsidornamedomainsdomain.go + - src/__tests__/mockserver/internal/handler/pathpostv10projects.go + - src/__tests__/mockserver/internal/handler/pathpostv10projectsidornamedomains.go + - src/__tests__/mockserver/internal/handler/pathpostv10projectsidornameenv.go + - src/__tests__/mockserver/internal/handler/pathpostv10projectsprojectidpromotedeploymentid.go + - src/__tests__/mockserver/internal/handler/pathpostv13deployments.go + - src/__tests__/mockserver/internal/handler/pathpostv1accessgroups.go + - src/__tests__/mockserver/internal/handler/pathpostv1accessgroupsaccessgroupidornameprojects.go + - src/__tests__/mockserver/internal/handler/pathpostv1accessgroupsidorname.go + - src/__tests__/mockserver/internal/handler/pathpostv1deploymentsdeploymentidchecks.go + - src/__tests__/mockserver/internal/handler/pathpostv1deploymentsdeploymentidcheckscheckidrerequest.go + - src/__tests__/mockserver/internal/handler/pathpostv1edgeconfig.go + - src/__tests__/mockserver/internal/handler/pathpostv1edgeconfigedgeconfigidschema.go + - src/__tests__/mockserver/internal/handler/pathpostv1edgeconfigedgeconfigidtoken.go + - src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbilling.go + - src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbillinginvoices.go + - src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbillinginvoicesinvoiceidactions.go + - src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidevents.go + - src/__tests__/mockserver/internal/handler/pathpostv1integrationsssotoken.go + - src/__tests__/mockserver/internal/handler/pathpostv1logdrains.go + - src/__tests__/mockserver/internal/handler/pathpostv1projectsidornamecustomenvironments.go + - src/__tests__/mockserver/internal/handler/pathpostv1projectsidornamemembers.go + - src/__tests__/mockserver/internal/handler/pathpostv1securityattackmode.go + - src/__tests__/mockserver/internal/handler/pathpostv1securityfirewallbypass.go + - src/__tests__/mockserver/internal/handler/pathpostv1teams.go + - src/__tests__/mockserver/internal/handler/pathpostv1teamsteamidmembersteamsjoin.go + - src/__tests__/mockserver/internal/handler/pathpostv1teamsteamidrequest.go + - src/__tests__/mockserver/internal/handler/pathpostv1webhooks.go + - src/__tests__/mockserver/internal/handler/pathpostv2deploymentsidaliases.go + - src/__tests__/mockserver/internal/handler/pathpostv2domainsdomainrecords.go + - src/__tests__/mockserver/internal/handler/pathpostv2files.go + - src/__tests__/mockserver/internal/handler/pathpostv2integrationslogdrains.go + - src/__tests__/mockserver/internal/handler/pathpostv3usertokens.go + - src/__tests__/mockserver/internal/handler/pathpostv5domains.go + - src/__tests__/mockserver/internal/handler/pathpostv5domainsbuy.go + - src/__tests__/mockserver/internal/handler/pathpostv7certs.go + - src/__tests__/mockserver/internal/handler/pathpostv8artifacts.go + - src/__tests__/mockserver/internal/handler/pathpostv8artifactsevents.go + - src/__tests__/mockserver/internal/handler/pathpostv9projectsidornamedomainsdomainverify.go + - src/__tests__/mockserver/internal/handler/pathputv1edgeconfigedgeconfigid.go + - src/__tests__/mockserver/internal/handler/pathputv1installationsintegrationconfigurationidproductsintegrationproductidorslugresourcesresourceidsecrets.go + - src/__tests__/mockserver/internal/handler/pathputv1installationsintegrationconfigurationidresourcesresourceidsecrets.go + - src/__tests__/mockserver/internal/handler/pathputv1securityfirewallconfig.go + - src/__tests__/mockserver/internal/handler/pathputv7certs.go + - src/__tests__/mockserver/internal/handler/values/files.go + - src/__tests__/mockserver/internal/logging/doc.go + - src/__tests__/mockserver/internal/logging/formats.go + - src/__tests__/mockserver/internal/logging/http_file.go + - src/__tests__/mockserver/internal/logging/http_logger.go + - src/__tests__/mockserver/internal/logging/levels.go + - src/__tests__/mockserver/internal/logging/logger.go + - src/__tests__/mockserver/internal/logging/oas_operation.go + - src/__tests__/mockserver/internal/logging/oas_operation_call.go + - src/__tests__/mockserver/internal/sdk/models/components/aclaction.go + - src/__tests__/mockserver/internal/sdk/models/components/authtoken.go + - src/__tests__/mockserver/internal/sdk/models/components/authuser.go + - src/__tests__/mockserver/internal/sdk/models/components/authuserlimited.go + - src/__tests__/mockserver/internal/sdk/models/components/edgeconfigitem.go + - src/__tests__/mockserver/internal/sdk/models/components/edgeconfigitemvalue.go + - src/__tests__/mockserver/internal/sdk/models/components/edgeconfigtoken.go + - src/__tests__/mockserver/internal/sdk/models/components/filetree.go + - src/__tests__/mockserver/internal/sdk/models/components/flagjsonvalue.go + - src/__tests__/mockserver/internal/sdk/models/components/httpmetadata.go + - src/__tests__/mockserver/internal/sdk/models/components/pagination.go + - src/__tests__/mockserver/internal/sdk/models/components/ratelimitnotice.go + - src/__tests__/mockserver/internal/sdk/models/components/security.go + - src/__tests__/mockserver/internal/sdk/models/components/teamlimited.go + - src/__tests__/mockserver/internal/sdk/models/components/userevent.go + - src/__tests__/mockserver/internal/sdk/models/operations/addbypassip.go + - src/__tests__/mockserver/internal/sdk/models/operations/addprojectdomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/addprojectmember.go + - src/__tests__/mockserver/internal/sdk/models/operations/artifactexists.go + - src/__tests__/mockserver/internal/sdk/models/operations/artifactquery.go + - src/__tests__/mockserver/internal/sdk/models/operations/assignalias.go + - src/__tests__/mockserver/internal/sdk/models/operations/buydomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/canceldeployment.go + - src/__tests__/mockserver/internal/sdk/models/operations/checkdomainprice.go + - src/__tests__/mockserver/internal/sdk/models/operations/checkdomainstatus.go + - src/__tests__/mockserver/internal/sdk/models/operations/createaccessgroup.go + - src/__tests__/mockserver/internal/sdk/models/operations/createaccessgroupproject.go + - src/__tests__/mockserver/internal/sdk/models/operations/createauthtoken.go + - src/__tests__/mockserver/internal/sdk/models/operations/createcheck.go + - src/__tests__/mockserver/internal/sdk/models/operations/createconfigurablelogdrain.go + - src/__tests__/mockserver/internal/sdk/models/operations/createdeployment.go + - src/__tests__/mockserver/internal/sdk/models/operations/createedgeconfig.go + - src/__tests__/mockserver/internal/sdk/models/operations/createedgeconfigtoken.go + - src/__tests__/mockserver/internal/sdk/models/operations/createevent.go + - src/__tests__/mockserver/internal/sdk/models/operations/createlogdrain.go + - src/__tests__/mockserver/internal/sdk/models/operations/createortransferdomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/createproject.go + - src/__tests__/mockserver/internal/sdk/models/operations/createprojectenv.go + - src/__tests__/mockserver/internal/sdk/models/operations/createrecord.go + - src/__tests__/mockserver/internal/sdk/models/operations/createteam.go + - src/__tests__/mockserver/internal/sdk/models/operations/createwebhook.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteaccessgroup.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteaccessgroupproject.go + - src/__tests__/mockserver/internal/sdk/models/operations/deletealias.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteauthtoken.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteconfigurablelogdrain.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteconfiguration.go + - src/__tests__/mockserver/internal/sdk/models/operations/deletedeployment.go + - src/__tests__/mockserver/internal/sdk/models/operations/deletedomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfig.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfigschema.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfigtokens.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteintegrationlogdrain.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteproject.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteteam.go + - src/__tests__/mockserver/internal/sdk/models/operations/deleteteaminvitecode.go + - src/__tests__/mockserver/internal/sdk/models/operations/deletev9projectsidornamecustomenvironmentsenvironmentslugorid.go + - src/__tests__/mockserver/internal/sdk/models/operations/deletewebhook.go + - src/__tests__/mockserver/internal/sdk/models/operations/downloadartifact.go + - src/__tests__/mockserver/internal/sdk/models/operations/editprojectenv.go + - src/__tests__/mockserver/internal/sdk/models/operations/exchangessotoken.go + - src/__tests__/mockserver/internal/sdk/models/operations/filterprojectenvs.go + - src/__tests__/mockserver/internal/sdk/models/operations/getaccountinfo.go + - src/__tests__/mockserver/internal/sdk/models/operations/getalias.go + - src/__tests__/mockserver/internal/sdk/models/operations/getallchecks.go + - src/__tests__/mockserver/internal/sdk/models/operations/getalllogdrains.go + - src/__tests__/mockserver/internal/sdk/models/operations/getauthtoken.go + - src/__tests__/mockserver/internal/sdk/models/operations/getauthuser.go + - src/__tests__/mockserver/internal/sdk/models/operations/getbypassip.go + - src/__tests__/mockserver/internal/sdk/models/operations/getcertbyid.go + - src/__tests__/mockserver/internal/sdk/models/operations/getcheck.go + - src/__tests__/mockserver/internal/sdk/models/operations/getconfigurablelogdrain.go + - src/__tests__/mockserver/internal/sdk/models/operations/getconfiguration.go + - src/__tests__/mockserver/internal/sdk/models/operations/getconfigurations.go + - src/__tests__/mockserver/internal/sdk/models/operations/getdeployment.go + - src/__tests__/mockserver/internal/sdk/models/operations/getdeploymentevents.go + - src/__tests__/mockserver/internal/sdk/models/operations/getdeploymentfilecontents.go + - src/__tests__/mockserver/internal/sdk/models/operations/getdeployments.go + - src/__tests__/mockserver/internal/sdk/models/operations/getdomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/getdomainconfig.go + - src/__tests__/mockserver/internal/sdk/models/operations/getdomains.go + - src/__tests__/mockserver/internal/sdk/models/operations/getdomaintransfer.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfig.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigbackup.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigbackups.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigitem.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigitems.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigs.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigschema.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigtoken.go + - src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigtokens.go + - src/__tests__/mockserver/internal/sdk/models/operations/getfirewallconfig.go + - src/__tests__/mockserver/internal/sdk/models/operations/getintegrationlogdrains.go + - src/__tests__/mockserver/internal/sdk/models/operations/getinvoice.go + - src/__tests__/mockserver/internal/sdk/models/operations/getmember.go + - src/__tests__/mockserver/internal/sdk/models/operations/getprojectdomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/getprojectdomains.go + - src/__tests__/mockserver/internal/sdk/models/operations/getprojectenv.go + - src/__tests__/mockserver/internal/sdk/models/operations/getprojectmembers.go + - src/__tests__/mockserver/internal/sdk/models/operations/getprojects.go + - src/__tests__/mockserver/internal/sdk/models/operations/getrecords.go + - src/__tests__/mockserver/internal/sdk/models/operations/getteam.go + - src/__tests__/mockserver/internal/sdk/models/operations/getteamaccessrequest.go + - src/__tests__/mockserver/internal/sdk/models/operations/getteammembers.go + - src/__tests__/mockserver/internal/sdk/models/operations/getteams.go + - src/__tests__/mockserver/internal/sdk/models/operations/getv9projectsidornamecustomenvironments.go + - src/__tests__/mockserver/internal/sdk/models/operations/getv9projectsidornamecustomenvironmentsenvironmentslugorid.go + - src/__tests__/mockserver/internal/sdk/models/operations/getwebhook.go + - src/__tests__/mockserver/internal/sdk/models/operations/getwebhooks.go + - src/__tests__/mockserver/internal/sdk/models/operations/gitnamespaces.go + - src/__tests__/mockserver/internal/sdk/models/operations/inviteusertoteam.go + - src/__tests__/mockserver/internal/sdk/models/operations/issuecert.go + - src/__tests__/mockserver/internal/sdk/models/operations/jointeam.go + - src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroupmembers.go + - src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroupprojects.go + - src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroups.go + - src/__tests__/mockserver/internal/sdk/models/operations/listaliases.go + - src/__tests__/mockserver/internal/sdk/models/operations/listauthtokens.go + - src/__tests__/mockserver/internal/sdk/models/operations/listdeploymentaliases.go + - src/__tests__/mockserver/internal/sdk/models/operations/listdeploymentfiles.go + - src/__tests__/mockserver/internal/sdk/models/operations/listpromotealiases.go + - src/__tests__/mockserver/internal/sdk/models/operations/listuserevents.go + - src/__tests__/mockserver/internal/sdk/models/operations/patchdomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/patchedgeconfigschema.go + - src/__tests__/mockserver/internal/sdk/models/operations/patchteam.go + - src/__tests__/mockserver/internal/sdk/models/operations/patchv9projectsidornamecustomenvironmentsenvironmentslugorid.go + - src/__tests__/mockserver/internal/sdk/models/operations/postv1projectsidornamecustomenvironments.go + - src/__tests__/mockserver/internal/sdk/models/operations/putfirewallconfig.go + - src/__tests__/mockserver/internal/sdk/models/operations/readaccessgroup.go + - src/__tests__/mockserver/internal/sdk/models/operations/readaccessgroupproject.go + - src/__tests__/mockserver/internal/sdk/models/operations/recordevents.go + - src/__tests__/mockserver/internal/sdk/models/operations/removebypassip.go + - src/__tests__/mockserver/internal/sdk/models/operations/removecert.go + - src/__tests__/mockserver/internal/sdk/models/operations/removeprojectdomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/removeprojectenv.go + - src/__tests__/mockserver/internal/sdk/models/operations/removeprojectmember.go + - src/__tests__/mockserver/internal/sdk/models/operations/removerecord.go + - src/__tests__/mockserver/internal/sdk/models/operations/removeteammember.go + - src/__tests__/mockserver/internal/sdk/models/operations/requestaccesstoteam.go + - src/__tests__/mockserver/internal/sdk/models/operations/requestdelete.go + - src/__tests__/mockserver/internal/sdk/models/operations/requestpromote.go + - src/__tests__/mockserver/internal/sdk/models/operations/rerequestcheck.go + - src/__tests__/mockserver/internal/sdk/models/operations/searchrepo.go + - src/__tests__/mockserver/internal/sdk/models/operations/status.go + - src/__tests__/mockserver/internal/sdk/models/operations/submitbillingdata.go + - src/__tests__/mockserver/internal/sdk/models/operations/submitinvoice.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateaccessgroup.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateaccessgroupproject.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateattackchallengemode.go + - src/__tests__/mockserver/internal/sdk/models/operations/updatecheck.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateedgeconfig.go + - src/__tests__/mockserver/internal/sdk/models/operations/updatefirewallconfig.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateinvoice.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateproject.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateprojectdatacache.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateprojectdomain.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateprojectprotectionbypass.go + - src/__tests__/mockserver/internal/sdk/models/operations/updaterecord.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateresourcesecrets.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateresourcesecretsbyid.go + - src/__tests__/mockserver/internal/sdk/models/operations/updateteammember.go + - src/__tests__/mockserver/internal/sdk/models/operations/uploadartifact.go + - src/__tests__/mockserver/internal/sdk/models/operations/uploadcert.go + - src/__tests__/mockserver/internal/sdk/models/operations/uploadfile.go + - src/__tests__/mockserver/internal/sdk/models/operations/verifyprojectdomain.go + - src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelbadrequesterror.go + - src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelforbiddenerror.go + - src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelnotfounderror.go + - src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelratelimiterror.go + - src/__tests__/mockserver/internal/sdk/types/bigint.go + - src/__tests__/mockserver/internal/sdk/types/date.go + - src/__tests__/mockserver/internal/sdk/types/datetime.go + - src/__tests__/mockserver/internal/sdk/types/decimal.go + - src/__tests__/mockserver/internal/sdk/types/pointers.go + - src/__tests__/mockserver/internal/sdk/utils/json.go + - src/__tests__/mockserver/internal/sdk/utils/reflect.go + - src/__tests__/mockserver/internal/sdk/utils/sort.go + - src/__tests__/mockserver/internal/server/doc.go + - src/__tests__/mockserver/internal/server/generated_handlers.go + - src/__tests__/mockserver/internal/server/internal_handlers.go + - src/__tests__/mockserver/internal/server/server.go + - src/__tests__/mockserver/internal/server/server_option.go + - src/__tests__/mockserver/internal/server/templates/log/index.html.tmpl + - src/__tests__/mockserver/internal/server/templates/log/operation.html.tmpl + - src/__tests__/mockserver/internal/server/templates/log/style.css.tmpl + - src/__tests__/mockserver/internal/tracking/requesttracker.go + - src/__tests__/mockserver/main.go + - src/__tests__/projectmembers.test.ts + - src/__tests__/projects.test.ts + - src/__tests__/security.test.ts + - src/__tests__/teams.test.ts + - src/__tests__/testclient.ts + - src/__tests__/user.test.ts + - src/__tests__/webhooks.test.ts - src/core.ts - src/funcs/accessGroupsCreateAccessGroup.ts - src/funcs/accessGroupsCreateAccessGroupProject.ts @@ -2538,6 +2959,11 @@ generatedFiles: - src/funcs/edgeConfigGetEdgeConfigs.ts - src/funcs/edgeConfigPatchEdgeConfigSchema.ts - src/funcs/edgeConfigUpdateEdgeConfig.ts + - src/funcs/environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts + - src/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironments.ts + - src/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts + - src/funcs/environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts + - src/funcs/environmentPostV1ProjectsIdOrNameCustomEnvironments.ts - src/funcs/integrationsDeleteConfiguration.ts - src/funcs/integrationsGetConfiguration.ts - src/funcs/integrationsGetConfigurations.ts @@ -2559,6 +2985,7 @@ generatedFiles: - src/funcs/marketplaceSubmitInvoice.ts - src/funcs/marketplaceUpdateInvoice.ts - src/funcs/marketplaceUpdateResourceSecrets.ts + - src/funcs/marketplaceUpdateResourceSecretsById.ts - src/funcs/projectMembersAddProjectMember.ts - src/funcs/projectMembersGetProjectMembers.ts - src/funcs/projectMembersRemoveProjectMember.ts @@ -2581,8 +3008,11 @@ generatedFiles: - src/funcs/projectsUpdateProjectDomain.ts - src/funcs/projectsUpdateProjectProtectionBypass.ts - src/funcs/projectsVerifyProjectDomain.ts + - src/funcs/securityAddBypassIp.ts + - src/funcs/securityGetBypassIp.ts - src/funcs/securityGetFirewallConfig.ts - src/funcs/securityPutFirewallConfig.ts + - src/funcs/securityRemoveBypassIp.ts - src/funcs/securityUpdateAttackChallengeMode.ts - src/funcs/securityUpdateFirewallConfig.ts - src/funcs/teamsCreateTeam.ts @@ -2624,6 +3054,7 @@ generatedFiles: - src/lib/security.ts - src/lib/url.ts - src/models/aclaction.ts + - src/models/addbypassipop.ts - src/models/addprojectdomainop.ts - src/models/addprojectmemberop.ts - src/models/artifactexistsop.ts @@ -2667,6 +3098,7 @@ generatedFiles: - src/models/deleteprojectop.ts - src/models/deleteteaminvitecodeop.ts - src/models/deleteteamop.ts + - src/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.ts - src/models/deletewebhookop.ts - src/models/downloadartifactop.ts - src/models/edgeconfigitem.ts @@ -2683,6 +3115,7 @@ generatedFiles: - src/models/getalllogdrainsop.ts - src/models/getauthtokenop.ts - src/models/getauthuserop.ts + - src/models/getbypassipop.ts - src/models/getcertbyidop.ts - src/models/getcheckop.ts - src/models/getconfigurablelogdrainop.ts @@ -2719,6 +3152,8 @@ generatedFiles: - src/models/getteammembersop.ts - src/models/getteamop.ts - src/models/getteamsop.ts + - src/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridop.ts + - src/models/getv9projectsidornamecustomenvironmentsop.ts - src/models/getwebhookop.ts - src/models/getwebhooksop.ts - src/models/gitnamespacesop.ts @@ -2739,11 +3174,14 @@ generatedFiles: - src/models/patchdomainop.ts - src/models/patchedgeconfigschemaop.ts - src/models/patchteamop.ts + - src/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.ts + - src/models/postv1projectsidornamecustomenvironmentsop.ts - src/models/putfirewallconfigop.ts - src/models/ratelimitnotice.ts - src/models/readaccessgroupop.ts - src/models/readaccessgroupprojectop.ts - src/models/recordeventsop.ts + - src/models/removebypassipop.ts - src/models/removecertop.ts - src/models/removeprojectdomainop.ts - src/models/removeprojectenvop.ts @@ -2774,6 +3212,7 @@ generatedFiles: - src/models/updateprojectop.ts - src/models/updateprojectprotectionbypassop.ts - src/models/updaterecordop.ts + - src/models/updateresourcesecretsbyidop.ts - src/models/updateresourcesecretsop.ts - src/models/updateteammemberop.ts - src/models/uploadartifactop.ts @@ -2795,6 +3234,7 @@ generatedFiles: - src/sdk/dns.ts - src/sdk/domains.ts - src/sdk/edgeconfig.ts + - src/sdk/environment.ts - src/sdk/integrations.ts - src/sdk/logdrains.ts - src/sdk/marketplace.ts @@ -3231,6 +3671,8 @@ examples: x-artifact-client-ci: "VERCEL" x-artifact-client-interactive: 0 x-artifact-tag: "Tc0BmHvJYMIYJ62/zx87YqO0Flxk+5Ovip25NY825CQ=" + requestBody: + application/octet-stream: "x-file: example.file" responses: "202": application/json: {"urls": ["https://api.vercel.com/v2/now/artifact/12HKQaOmR5t5Uy6vdcQsNIiZgHGB"]} @@ -3256,7 +3698,8 @@ examples: application/json: {"error": {"message": ""}} "404": application/json: {} - "200": {} + "200": + application/json: "x-file: example.file" artifactExists: speakeasy-default-artifact-exists: parameters: @@ -3282,7 +3725,7 @@ examples: application/json: {"hashes": ["12HKQaOmR5t5Uy6vdcQsNIiZgHGB", "34HKQaOmR5t5Uy6vasdasdasdasd"]} responses: "200": - application/json: {"key": {"error": {"message": ""}}, "key1": {"error": {"message": ""}}, "key2": {"error": {"message": ""}}} + application/json: {"key": {"error": {"message": ""}}, "key1": {"size": 9698.01, "taskDurationMs": 1946.74}, "key2": {"size": 1135.95, "taskDurationMs": 5348.41}} "400": application/json: {} "401": @@ -3391,7 +3834,7 @@ examples: application/json: {"disabled": true} responses: "200": - application/json: {"accountId": "", "crons": {"enabledAt": "7135.80", "disabledAt": "2989.85", "updatedAt": "6226.22", "deploymentId": "", "definitions": [{"host": "vercel.com", "path": "/api/crons/sync-something?hello=world", "schedule": "0 0 * * *"}, {"host": "vercel.com", "path": "/api/crons/sync-something?hello=world", "schedule": "0 0 * * *"}, {"host": "vercel.com", "path": "/api/crons/sync-something?hello=world", "schedule": "0 0 * * *"}]}, "directoryListing": false, "id": "", "latestDeployments": [{"id": "", "createdAt": "5719.60", "createdIn": "", "creator": {"email": "Braeden15@gmail.com", "uid": "", "username": "Teresa84"}, "deploymentHostname": "", "name": "", "plan": "pro", "previewCommentsEnabled": false, "private": false, "readyState": "BUILDING", "type": "LAMBDAS", "url": "https://unknown-gift.biz", "userId": ""}, {"id": "", "createdAt": "7644.50", "createdIn": "", "creator": {"email": "Erich.Mann@hotmail.com", "uid": "", "username": "Genoveva89"}, "deploymentHostname": "", "name": "", "plan": "hobby", "previewCommentsEnabled": false, "private": true, "readyState": "ERROR", "type": "LAMBDAS", "url": "https://slimy-tuba.name", "userId": ""}, {"id": "", "createdAt": "2357.62", "createdIn": "", "creator": {"email": "Garret.Ferry81@gmail.com", "uid": "", "username": "Vivianne.Gutkowski"}, "deploymentHostname": "", "name": "", "plan": "pro", "previewCommentsEnabled": false, "private": true, "readyState": "CANCELED", "type": "LAMBDAS", "url": "https://astonishing-cinema.net/", "userId": ""}], "name": "", "nodeVersion": "10.x", "targets": {}} + application/json: {"accountId": "", "crons": {"enabledAt": "7135.80", "disabledAt": "2989.85", "updatedAt": "6226.22", "deploymentId": "", "definitions": [{"host": "vercel.com", "path": "/api/crons/sync-something?hello=world", "schedule": "0 0 * * *"}, {"host": "vercel.com", "path": "/api/crons/sync-something?hello=world", "schedule": "0 0 * * *"}, {"host": "vercel.com", "path": "/api/crons/sync-something?hello=world", "schedule": "0 0 * * *"}]}, "directoryListing": false, "id": "", "latestDeployments": [{"id": "", "createdAt": "5719.60", "createdIn": "", "creator": {"email": "Braeden15@gmail.com", "uid": "", "username": "Teresa84"}, "deploymentHostname": "", "name": "", "plan": "pro", "previewCommentsEnabled": false, "private": false, "readyState": "BUILDING", "type": "LAMBDAS", "url": "https://unknown-gift.biz", "userId": ""}, {"id": "", "createdAt": "7644.50", "createdIn": "", "creator": {"email": "Erich.Mann@hotmail.com", "uid": "", "username": "Genoveva89"}, "deploymentHostname": "", "name": "", "plan": "hobby", "previewCommentsEnabled": false, "private": true, "readyState": "ERROR", "type": "LAMBDAS", "url": "https://slimy-tuba.name", "userId": ""}, {"id": "", "createdAt": "2357.62", "createdIn": "", "creator": {"email": "Garret.Ferry81@gmail.com", "uid": "", "username": "Vivianne.Gutkowski"}, "deploymentHostname": "", "name": "", "plan": "pro", "previewCommentsEnabled": false, "private": true, "readyState": "CANCELED", "type": "LAMBDAS", "url": "https://astonishing-cinema.net/", "userId": ""}], "name": "", "nodeVersion": "10.x"} "400": application/json: {} "401": @@ -3470,6 +3913,7 @@ examples: until: 1612264332000 teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" slug: "my-team-url-slug" + customEnvironmentId: "env_123abc4567" responses: "200": application/json: {"domains": [{"name": "", "apexName": "", "projectId": "", "verified": true}], "pagination": {"count": 20, "next": 1540095775951, "prev": 1540095775951}} @@ -3573,9 +4017,11 @@ examples: source: "vercel-cli:pull" teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" slug: "my-team-url-slug" + customEnvironmentId: "env_123abc4567" + customEnvironmentSlug: "my-custom-env" responses: "200": - application/json: {"pagination": {"count": 20, "next": 1540095775951, "prev": 1540095775951}} + application/json: {"envs": [{}, {}, {}], "pagination": {"count": 20, "next": 1540095775951, "prev": 1540095775951}} "400": application/json: {} "401": @@ -3609,7 +4055,7 @@ examples: application/json: {"key": "API_URL", "value": "https://api.vercel.com", "type": "plain", "target": ["preview"], "gitBranch": "feature-1", "comment": "database connection string for production"} responses: "201": - application/json: {"failed": [{"error": {"code": "", "message": ""}}]} + application/json: {"created": [{}], "failed": [{"error": {"code": "", "message": ""}}]} "400": application/json: {} "401": @@ -3623,6 +4069,7 @@ examples: query: teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" slug: "my-team-url-slug" + customEnvironmentId: "env_123abc4567" responses: "200": application/json: [{"type": "sensitive", "key": "", "value": ""}, {"type": "plain", "key": "", "value": ""}, {"type": "encrypted", "key": "", "value": ""}] @@ -3658,6 +4105,8 @@ examples: query: teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" slug: "my-team-url-slug" + requestBody: + application/json: {} responses: "200": application/json: {} @@ -3734,7 +4183,7 @@ examples: slug: "my-team-url-slug" responses: "200": - application/json: {"aliasAssigned": false, "bootedAt": "2317.28", "buildingAt": "458.06", "buildSkipped": true, "creator": {"uid": ""}, "public": true, "status": "ERROR", "id": "", "type": "LAMBDAS", "createdAt": "3161.76", "name": "", "readyState": "READY", "meta": {"key": "", "key1": ""}, "regions": [], "url": "https://disloyal-backburn.info", "version": "1604.95"} + application/json: {"aliasAssigned": false, "bootedAt": 2317.28, "buildingAt": 458.05, "buildSkipped": true, "creator": {"uid": ""}, "public": true, "status": "ERROR", "id": "", "type": "LAMBDAS", "createdAt": 3161.76, "name": "", "readyState": "READY", "meta": {"key": "", "key1": ""}, "regions": [], "url": "https://disloyal-backburn.info", "version": 1604.95} "400": application/json: {} "404": @@ -3749,7 +4198,7 @@ examples: application/json: {"files": [{"file": "folder/file.js"}, {"file": "folder/file.js"}], "gitMetadata": {"remoteUrl": "https://github.com/vercel/next.js", "commitAuthorName": "kyliau", "commitMessage": "add method to measure Interaction to Next Paint (INP) (#36490)", "commitRef": "main", "commitSha": "dc36199b2234c6586ebe05ec94078a895c707e29", "dirty": true}, "meta": {"foo": "bar"}, "name": "my-instant-deployment", "project": "my-deployment-project"} responses: "200": - application/json: {"build": {"env": []}, "env": ["", "", ""], "inspectorUrl": "https://grave-dredger.com", "isInConcurrentBuildsQueue": false, "isInSystemBuildsQueue": false, "aliasAssigned": false, "bootedAt": "4336.60", "buildingAt": "7030.55", "buildSkipped": true, "creator": {"uid": ""}, "public": false, "status": "QUEUED", "type": "LAMBDAS", "createdAt": "5133.44", "name": "", "id": "", "version": "1218.01", "meta": {"key": "", "key1": ""}, "readyState": "INITIALIZING", "regions": [], "url": "https://apprehensive-perp.info/", "projectId": "", "ownerId": "", "routes": [{"src": ""}, {"src": ""}], "plan": "pro", "createdIn": ""} + application/json: {"build": {"env": []}, "env": ["", "", ""], "inspectorUrl": "https://grave-dredger.com", "isInConcurrentBuildsQueue": false, "isInSystemBuildsQueue": false, "projectSettings": {}, "aliasAssigned": false, "bootedAt": "4336.60", "buildingAt": "7030.55", "buildSkipped": true, "creator": {"uid": ""}, "public": false, "status": "QUEUED", "type": "LAMBDAS", "createdAt": "5133.44", "name": "", "id": "", "version": "1218.01", "meta": {"key": "", "key1": ""}, "readyState": "INITIALIZING", "regions": [], "url": "https://apprehensive-perp.info/", "projectId": "", "ownerId": "", "routes": [{"src": ""}, {"src": ""}], "plan": "pro", "createdIn": ""} "400": application/json: {} "401": @@ -3766,7 +4215,7 @@ examples: slug: "my-team-url-slug" responses: "200": - application/json: {"build": {"env": ["", "", ""]}, "env": ["", ""], "inspectorUrl": "https://concrete-gerbil.org", "isInConcurrentBuildsQueue": false, "isInSystemBuildsQueue": true, "aliasAssigned": false, "bootedAt": "8528.74", "buildingAt": "7590.78", "buildSkipped": false, "creator": {"uid": ""}, "public": true, "status": "BUILDING", "id": "", "createdAt": "3071.53", "name": "", "meta": {"key": "", "key1": "", "key2": ""}, "readyState": "QUEUED", "regions": [""], "type": "LAMBDAS", "url": "https://timely-reboot.name", "version": "6067.47", "createdIn": "", "ownerId": "", "plan": "pro", "projectId": "", "routes": [{"handle": "resource"}, {"src": "", "continue": false, "middleware": "6618.11"}]} + application/json: {"build": {"env": ["", "", ""]}, "env": ["", ""], "inspectorUrl": "https://concrete-gerbil.org", "isInConcurrentBuildsQueue": false, "isInSystemBuildsQueue": true, "projectSettings": {}, "aliasAssigned": false, "bootedAt": "8528.74", "buildingAt": "7590.78", "buildSkipped": false, "creator": {"uid": ""}, "public": true, "status": "BUILDING", "id": "", "createdAt": "3071.53", "name": "", "meta": {"key": "", "key1": "", "key2": ""}, "readyState": "QUEUED", "regions": [""], "type": "LAMBDAS", "url": "https://timely-reboot.name", "version": "6067.47", "createdIn": "", "ownerId": "", "plan": "pro", "projectId": "", "routes": [{"handle": "resource"}, {"src": "", "continue": false, "middleware": 6618.12}]} "400": application/json: {} "401": @@ -4040,7 +4489,7 @@ examples: slug: "my-team-url-slug" responses: "200": - application/json: {"records": [{"id": "", "slug": "", "name": "", "type": "CAA", "value": "", "creator": "", "created": "625.21", "updated": "9085.95", "createdAt": "5625.17", "updatedAt": "391.36"}, {"id": "", "slug": "", "name": "", "type": "TXT", "value": "", "creator": "", "created": "8810.32", "updated": "5188.16", "createdAt": "6202.53", "updatedAt": "4008.09"}], "pagination": {"count": 20, "next": 1540095775951, "prev": 1540095775951}} + application/json: {"records": [{"id": "", "slug": "", "name": "", "type": "CAA", "value": "", "creator": "", "created": 625.21, "updated": 9085.95, "createdAt": 5625.17, "updatedAt": 391.36}, {"id": "", "slug": "", "name": "", "type": "TXT", "value": "", "creator": "", "created": 8810.32, "updated": 5188.16, "createdAt": 6202.54, "updatedAt": 4008.09}], "pagination": {"count": 20, "next": 1540095775951, "prev": 1540095775951}} "400": application/json: {} "401": @@ -4350,7 +4799,7 @@ examples: slug: "my-team-url-slug" responses: "200": - application/json: {"user": {"id": "", "username": "Leola60", "email": "Eunice.Hansen@hotmail.com"}, "id": "", "lastModified": "1520.01", "backup": {"digest": "", "items": {"key": {"updatedAt": "1577.81", "value": "", "createdAt": "970.45"}}, "slug": "", "updatedAt": "952.14"}} + application/json: {"user": {"id": "", "username": "Leola60", "email": "Eunice.Hansen@hotmail.com"}, "id": "", "lastModified": 1520, "backup": {"digest": "", "items": {"key": {"updatedAt": 1577.8, "value": "", "createdAt": 970.45}}, "slug": "", "updatedAt": 952.13}, "metadata": {}} "400": application/json: {} "401": @@ -4397,13 +4846,15 @@ examples: speakeasy-default-get-auth-user: responses: "200": - application/json: {"user": {"createdAt": 1630748523395, "softBlock": {"blockedAt": "7708.70", "reason": "UNPAID_INVOICE"}, "stagingPrefix": "", "hasTrialAvailable": true, "id": "AEIIDYVk59zbFF2Sxfyxxmua", "email": "me@example.com", "name": "John Doe", "username": "jdoe", "avatar": "22cb30c85ff45ac4c72de8981500006b28114aa1", "defaultTeamId": "", "version": "northstar"}} + application/json: {"user": {"createdAt": 1630748523395, "softBlock": {"blockedAt": 7708.7, "reason": "UNPAID_INVOICE"}, "billing": {}, "resourceConfig": {}, "stagingPrefix": "", "hasTrialAvailable": true, "id": "AEIIDYVk59zbFF2Sxfyxxmua", "email": "me@example.com", "name": "John Doe", "username": "jdoe", "avatar": "22cb30c85ff45ac4c72de8981500006b28114aa1", "defaultTeamId": "", "version": "northstar"}} "400": application/json: {} "401": application/json: {"error": {"message": ""}} requestDelete: speakeasy-default-request-delete: + requestBody: + application/json: {} responses: "202": application/json: {"id": "", "email": "Lamont82@gmail.com", "message": "Verification email sent"} @@ -4456,7 +4907,7 @@ examples: path: integrationConfigurationId: "" requestBody: - application/json: {"timestamp": "2024-09-29T02:38:01.476Z", "eod": "2022-12-28T23:46:57.523Z", "period": {"start": "2022-06-25T19:04:50.518Z", "end": "2023-10-18T01:18:36.230Z"}, "billing": {"items": [{"billingPlanId": "", "name": "", "price": "161.25", "quantity": "8824.47", "units": "", "total": ""}]}, "usage": [{"resourceId": "", "name": "", "type": "rate", "units": "", "dayValue": "9439.21", "periodValue": "6958.71"}, {"resourceId": "", "name": "", "type": "total", "units": "", "dayValue": "9892.22", "periodValue": "4749.62"}, {"resourceId": "", "name": "", "type": "rate", "units": "", "dayValue": "7119.53", "periodValue": "6310.47"}]} + application/json: {"timestamp": "2024-09-29T02:38:01.476Z", "eod": "2022-12-28T23:46:57.523Z", "period": {"start": "2022-06-25T19:04:50.518Z", "end": "2023-10-18T01:18:36.230Z"}, "billing": {"items": [{"billingPlanId": "", "name": "", "price": "161.25", "quantity": 8824.47, "units": "", "total": ""}]}, "usage": [{"resourceId": "", "name": "", "type": "rate", "units": "", "dayValue": "9439.21", "periodValue": "6958.71"}, {"resourceId": "", "name": "", "type": "total", "units": "", "dayValue": "9892.22", "periodValue": "4749.62"}, {"resourceId": "", "name": "", "type": "rate", "units": "", "dayValue": "7119.53", "periodValue": "6310.47"}]} responses: "400": application/json: {} @@ -4837,7 +5288,7 @@ examples: application/json: {"firewallEnabled": true} responses: "200": - application/json: {"active": {"ownerId": "", "projectKey": "", "id": "", "version": "4570.86", "updatedAt": "", "firewallEnabled": true, "crs": {"sd": {"active": false, "action": "deny"}, "ma": {"active": false, "action": "log"}, "lfi": {"active": false, "action": "log"}, "rfi": {"active": false, "action": "deny"}, "rce": {"active": false, "action": "deny"}, "php": {"active": true, "action": "deny"}, "gen": {"active": false, "action": "deny"}, "xss": {"active": false, "action": "deny"}, "sqli": {"active": true, "action": "log"}, "sf": {"active": true, "action": "deny"}, "java": {"active": true, "action": "log"}}, "rules": [{"id": "", "name": "", "active": true, "conditionGroup": [{"conditions": [{"type": "ip_address", "op": "suf"}, {"type": "geo_as_number", "op": "pre"}, {"type": "ja3_digest", "op": "inc"}]}, {"conditions": [{"type": "geo_as_number", "op": "neq"}, {"type": "protocol", "op": "sub"}, {"type": "ja3_digest", "op": "suf"}]}, {"conditions": [{"type": "region", "op": "neq"}]}]}, {"id": "", "name": "", "active": false, "conditionGroup": []}, {"id": "", "name": "", "active": false, "conditionGroup": [{"conditions": [{"type": "scheme", "op": "neq"}]}, {"conditions": []}, {"conditions": [{"type": "header", "op": "inc"}, {"type": "query", "op": "eq"}]}]}], "ips": [], "changes": []}} + application/json: {"active": {"ownerId": "", "projectKey": "", "id": "", "version": "4570.86", "updatedAt": "", "firewallEnabled": true, "crs": {"sd": {"active": false, "action": "deny"}, "ma": {"active": false, "action": "log"}, "lfi": {"active": false, "action": "log"}, "rfi": {"active": false, "action": "deny"}, "rce": {"active": false, "action": "deny"}, "php": {"active": true, "action": "deny"}, "gen": {"active": false, "action": "deny"}, "xss": {"active": false, "action": "deny"}, "sqli": {"active": true, "action": "log"}, "sf": {"active": true, "action": "deny"}, "java": {"active": true, "action": "log"}}, "rules": [{"id": "", "name": "", "active": true, "conditionGroup": [{"conditions": [{"type": "ip_address", "op": "suf"}, {"type": "geo_as_number", "op": "pre"}, {"type": "ja3_digest", "op": "inc"}]}, {"conditions": [{"type": "geo_as_number", "op": "neq"}, {"type": "protocol", "op": "sub"}, {"type": "ja3_digest", "op": "suf"}]}, {"conditions": [{"type": "region", "op": "neq"}]}], "action": {}}, {"id": "", "name": "", "active": false, "conditionGroup": [], "action": {}}, {"id": "", "name": "", "active": false, "conditionGroup": [{"conditions": [{"type": "scheme", "op": "neq"}]}, {"conditions": []}, {"conditions": [{"type": "header", "op": "inc"}, {"type": "query", "op": "eq"}]}], "action": {}}], "ips": [], "changes": []}} "400": application/json: {} "401": @@ -4873,7 +5324,7 @@ examples: slug: "my-team-url-slug" responses: "200": - application/json: {"ownerId": "", "projectKey": "", "id": "", "version": "228.91", "updatedAt": "", "firewallEnabled": true, "crs": {"sd": {"active": false, "action": "deny"}, "ma": {"active": true, "action": "log"}, "lfi": {"active": false, "action": "log"}, "rfi": {"active": false, "action": "deny"}, "rce": {"active": true, "action": "deny"}, "php": {"active": false, "action": "log"}, "gen": {"active": false, "action": "log"}, "xss": {"active": true, "action": "deny"}, "sqli": {"active": true, "action": "deny"}, "sf": {"active": true, "action": "deny"}, "java": {"active": true, "action": "deny"}}, "rules": [{"id": "", "name": "", "active": true, "conditionGroup": [{"conditions": [{"type": "ip_address", "op": "eq"}]}, {"conditions": [{"type": "geo_city", "op": "ex"}, {"type": "ja4_digest", "op": "nex"}, {"type": "ip_address", "op": "lte"}]}]}], "ips": [{"id": "", "hostname": "puny-goat.org", "ip": "0.147.40.42", "action": "challenge"}], "changes": []} + application/json: {"ownerId": "", "projectKey": "", "id": "", "version": "228.91", "updatedAt": "", "firewallEnabled": true, "crs": {"sd": {"active": false, "action": "deny"}, "ma": {"active": true, "action": "log"}, "lfi": {"active": false, "action": "log"}, "rfi": {"active": false, "action": "deny"}, "rce": {"active": true, "action": "deny"}, "php": {"active": false, "action": "log"}, "gen": {"active": false, "action": "log"}, "xss": {"active": true, "action": "deny"}, "sqli": {"active": true, "action": "deny"}, "sf": {"active": true, "action": "deny"}, "java": {"active": true, "action": "deny"}}, "rules": [{"id": "", "name": "", "active": true, "conditionGroup": [{"conditions": [{"type": "ip_address", "op": "eq"}]}, {"conditions": [{"type": "geo_city", "op": "ex"}, {"type": "ja4_digest", "op": "nex"}, {"type": "ip_address", "op": "lte"}]}], "action": {}}], "ips": [{"id": "", "hostname": "puny-goat.org", "ip": "0.147.40.42", "action": "challenge"}], "changes": []} "400": application/json: {} "401": @@ -4924,7 +5375,7 @@ examples: application/json: {"joinedFrom": {"origin": "github", "commitId": "f498d25d8bd654b578716203be73084b31130cd7", "repoId": "67753070", "repoPath": "jane-doe/example", "gitUserId": 103053343, "gitUserLogin": "jane-doe"}} responses: "200": - application/json: {"teamSlug": "", "teamName": ""} + application/json: {"teamSlug": "", "teamName": "", "github": {}, "gitlab": {}, "bitbucket": {}} "400": application/json: {} "401": @@ -4939,7 +5390,7 @@ examples: teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" responses: "200": - application/json: {"teamSlug": "my-team", "teamName": "My Team", "confirmed": false, "joinedFrom": {"origin": "import"}, "accessRequestedAt": 1588720733602} + application/json: {"teamSlug": "my-team", "teamName": "My Team", "confirmed": false, "joinedFrom": {"origin": "import"}, "accessRequestedAt": 1588720733602, "github": {}, "gitlab": {}, "bitbucket": {}} "400": application/json: {} "401": @@ -5050,7 +5501,7 @@ examples: application/json: {"slug": "a-random-team", "name": "A Random Team"} responses: "200": - application/json: {"id": "team_nLlpyC6RE1qxqglFKbrMxlud", "slug": ""} + application/json: {"id": "team_nLlpyC6RE1qxqglFKbrMxlud", "slug": "", "billing": {}} "400": application/json: {} "401": @@ -5063,6 +5514,8 @@ examples: query: newDefaultTeamId: "team_LLHUOMOoDlqOp8wPE4kFo9pE" slug: "my-team-url-slug" + requestBody: + application/json: {} responses: "200": application/json: {"id": "team_LLHUOMOoDlqOp8wPE4kFo9pE", "newDefaultTeamIdError": true} @@ -5279,6 +5732,8 @@ examples: query: teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" slug: "my-team-url-slug" + requestBody: + application/json: {} responses: "200": application/json: {"id": "", "createdAt": "1842.08", "expiresAt": "8685.41", "autoRenew": true, "cns": []} @@ -5303,4 +5758,286 @@ examples: application/json: {} "401": application/json: {"error": {"message": ""}} -generatedTests: {} + update-resource-secrets-by-id: + speakeasy-default-update-resource-secrets-by-id: + parameters: + path: + integrationConfigurationId: "" + resourceId: "" + responses: + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + "404": + application/json: {"error": {}} + post_/v1/projects/{idOrName}/custom-environments: + speakeasy-default-post-/v1-/projects/{id-or-name}/custom-environments: + parameters: + path: + idOrName: "" + query: + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" + slug: "my-team-url-slug" + responses: + "201": + application/json: {} + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + get_/v9/projects/{idOrName}/custom-environments: + speakeasy-default-get-/v9-/projects/{id-or-name}/custom-environments: + parameters: + path: + idOrName: "" + query: + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" + slug: "my-team-url-slug" + responses: + "200": + application/json: {"environments": []} + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}: + speakeasy-default-get-/v9-/projects/{id-or-name}/custom-environments/{environment-slug-or-id}: + parameters: + path: + idOrName: "" + environmentSlugOrId: "" + query: + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" + slug: "my-team-url-slug" + responses: + "200": + application/json: {} + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + "404": + application/json: {"error": {}} + patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}: + speakeasy-default-patch-/v9-/projects/{id-or-name}/custom-environments/{environment-slug-or-id}: + parameters: + path: + idOrName: "" + environmentSlugOrId: "" + query: + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" + slug: "my-team-url-slug" + responses: + "200": + application/json: {} + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}: + speakeasy-default-delete-/v9-/projects/{id-or-name}/custom-environments/{environment-slug-or-id}: + parameters: + path: + idOrName: "" + environmentSlugOrId: "" + query: + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" + slug: "my-team-url-slug" + responses: + "200": + application/json: {} + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + getBypassIp: + speakeasy-default-get-bypass-ip: + parameters: + query: + projectId: "" + limit: 10 + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" + slug: "my-team-url-slug" + responses: + "200": + application/json: {"result": [{"OwnerId": "", "Id": "", "Domain": "sneaky-intervention.info", "Ip": "124.153.161.35", "ProjectId": "", "IsProjectRule": false}], "pagination": ""} + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + "404": + application/json: {"error": {}} + addBypassIp: + speakeasy-default-add-bypass-ip: + parameters: + query: + projectId: "" + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" + slug: "my-team-url-slug" + responses: + "200": + application/json: {"ok": false, "result": [{"OwnerId": "", "Id": "", "Domain": "jubilant-outrun.name", "ProjectId": "", "IsProjectRule": true}], "pagination": ""} + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + "404": + application/json: {"error": {}} + removeBypassIp: + speakeasy-default-remove-bypass-ip: + parameters: + query: + projectId: "" + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l" + slug: "my-team-url-slug" + responses: + "200": + application/json: {"ok": true} + "400": + application/json: {"error": {}} + "401": + application/json: {"error": {"message": ""}} + "404": + application/json: {"error": {}} +generatedTests: + readAccessGroup: "2025-01-16T21:59:36Z" + updateAccessGroup: "2025-01-16T21:59:36Z" + deleteAccessGroup: "2025-01-16T21:59:36Z" + listAccessGroupMembers: "2025-01-16T21:59:36Z" + listAccessGroups: "2025-01-16T21:59:36Z" + createAccessGroup: "2025-01-16T21:59:36Z" + listAccessGroupProjects: "2025-01-16T21:59:36Z" + createAccessGroupProject: "2025-01-16T21:59:36Z" + readAccessGroupProject: "2025-01-16T21:59:36Z" + updateAccessGroupProject: "2025-01-16T21:59:36Z" + deleteAccessGroupProject: "2025-01-16T21:59:36Z" + recordEvents: "2025-01-16T21:59:36Z" + status: "2025-01-16T21:59:36Z" + downloadArtifact: "2025-01-16T21:59:36Z" + artifactExists: "2025-01-16T21:59:36Z" + artifactQuery: "2025-01-16T21:59:36Z" + createCheck: "2025-01-16T21:59:36Z" + getAllChecks: "2025-01-16T21:59:36Z" + getCheck: "2025-01-16T21:59:36Z" + updateCheck: "2025-01-16T21:59:36Z" + rerequestCheck: "2025-01-16T21:59:36Z" + updateProjectDataCache: "2025-01-16T21:59:36Z" + getProjects: "2025-01-16T21:59:36Z" + createProject: "2025-01-16T21:59:36Z" + updateProject: "2025-01-16T21:59:36Z" + deleteProject: "2025-01-16T21:59:36Z" + getProjectDomains: "2025-01-16T21:59:36Z" + getProjectDomain: "2025-01-16T21:59:36Z" + updateProjectDomain: "2025-01-16T21:59:36Z" + removeProjectDomain: "2025-01-16T21:59:36Z" + addProjectDomain: "2025-01-16T21:59:36Z" + verifyProjectDomain: "2025-01-16T21:59:36Z" + getProjectEnv: "2025-01-16T21:59:36Z" + createProjectEnv: "2025-01-16T21:59:36Z" + removeProjectEnv: "2025-01-16T21:59:36Z" + updateProjectProtectionBypass: "2025-01-16T21:59:36Z" + requestPromote: "2025-01-16T21:59:36Z" + listPromoteAliases: "2025-01-16T21:59:36Z" + getDeploymentEvents: "2025-01-16T21:59:36Z" + getDeployment: "2025-01-16T21:59:36Z" + createDeployment: "2025-01-16T21:59:36Z" + cancelDeployment: "2025-01-16T21:59:36Z" + uploadFile: "2025-01-16T21:59:36Z" + listDeploymentFiles: "2025-01-16T21:59:36Z" + getDeploymentFileContents: "2025-01-16T21:59:36Z" + getDeployments: "2025-01-16T21:59:36Z" + deleteDeployment: "2025-01-16T21:59:36Z" + buyDomain: "2025-01-16T21:59:36Z" + checkDomainPrice: "2025-01-16T21:59:36Z" + checkDomainStatus: "2025-01-16T21:59:36Z" + getDomainTransfer: "2025-01-16T21:59:36Z" + getDomainConfig: "2025-01-16T21:59:36Z" + getDomain: "2025-01-16T21:59:36Z" + getDomains: "2025-01-16T21:59:36Z" + createOrTransferDomain: "2025-01-16T21:59:36Z" + deleteDomain: "2025-01-16T21:59:36Z" + createRecord: "2025-01-16T21:59:36Z" + updateRecord: "2025-01-16T21:59:36Z" + removeRecord: "2025-01-16T21:59:36Z" + getEdgeConfigs: "2025-01-16T21:59:36Z" + createEdgeConfig: "2025-01-16T21:59:36Z" + getEdgeConfig: "2025-01-16T21:59:36Z" + updateEdgeConfig: "2025-01-16T21:59:36Z" + deleteEdgeConfig: "2025-01-16T21:59:36Z" + getEdgeConfigItems: "2025-01-16T21:59:36Z" + getEdgeConfigSchema: "2025-01-16T21:59:36Z" + patchEdgeConfigSchema: "2025-01-16T21:59:36Z" + deleteEdgeConfigSchema: "2025-01-16T21:59:36Z" + getEdgeConfigItem: "2025-01-16T21:59:36Z" + getEdgeConfigTokens: "2025-01-16T21:59:36Z" + deleteEdgeConfigTokens: "2025-01-16T21:59:36Z" + getEdgeConfigToken: "2025-01-16T21:59:36Z" + createEdgeConfigToken: "2025-01-16T21:59:36Z" + getEdgeConfigBackups: "2025-01-16T21:59:36Z" + listUserEvents: "2025-01-16T21:59:36Z" + requestDelete: "2025-01-16T21:59:36Z" + get-account-info: "2025-01-16T21:59:36Z" + get-member: "2025-01-16T21:59:36Z" + create-event: "2025-01-16T21:59:36Z" + submit-billing-data: "2025-01-16T21:59:36Z" + submit-invoice: "2025-01-16T21:59:36Z" + get-invoice: "2025-01-16T21:59:36Z" + update-invoice: "2025-01-16T21:59:36Z" + update-resource-secrets: "2025-01-16T21:59:36Z" + update-resource-secrets-by-id: "2025-01-16T21:59:36Z" + exchange-sso-token: "2025-01-16T21:59:36Z" + getConfiguration: "2025-01-16T21:59:36Z" + deleteConfiguration: "2025-01-16T21:59:36Z" + gitNamespaces: "2025-01-16T21:59:36Z" + searchRepo: "2025-01-16T21:59:36Z" + listAuthTokens: "2025-01-16T21:59:36Z" + createAuthToken: "2025-01-16T21:59:36Z" + getAuthToken: "2025-01-16T21:59:36Z" + deleteAuthToken: "2025-01-16T21:59:36Z" + getIntegrationLogDrains: "2025-01-16T21:59:36Z" + createLogDrain: "2025-01-16T21:59:36Z" + deleteIntegrationLogDrain: "2025-01-16T21:59:36Z" + getConfigurableLogDrain: "2025-01-16T21:59:36Z" + deleteConfigurableLogDrain: "2025-01-16T21:59:36Z" + getAllLogDrains: "2025-01-16T21:59:36Z" + createConfigurableLogDrain: "2025-01-16T21:59:36Z" + addProjectMember: "2025-01-16T21:59:36Z" + removeProjectMember: "2025-01-16T21:59:36Z" + post_/v1/projects/{idOrName}/custom-environments: "2025-01-16T21:59:36Z" + get_/v9/projects/{idOrName}/custom-environments: "2025-01-16T21:59:36Z" + get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}: "2025-01-16T21:59:36Z" + patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}: "2025-01-16T21:59:36Z" + delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}: "2025-01-16T21:59:36Z" + updateAttackChallengeMode: "2025-01-16T21:59:36Z" + putFirewallConfig: "2025-01-16T21:59:36Z" + updateFirewallConfig: "2025-01-16T21:59:36Z" + getFirewallConfig: "2025-01-16T21:59:36Z" + getBypassIp: "2025-01-16T21:59:36Z" + addBypassIp: "2025-01-16T21:59:36Z" + removeBypassIp: "2025-01-16T21:59:36Z" + getTeamMembers: "2025-01-16T21:59:36Z" + requestAccessToTeam: "2025-01-16T21:59:36Z" + getTeamAccessRequest: "2025-01-16T21:59:36Z" + joinTeam: "2025-01-16T21:59:36Z" + updateTeamMember: "2025-01-16T21:59:36Z" + removeTeamMember: "2025-01-16T21:59:36Z" + getTeam: "2025-01-16T21:59:36Z" + patchTeam: "2025-01-16T21:59:36Z" + getTeams: "2025-01-16T21:59:36Z" + createTeam: "2025-01-16T21:59:36Z" + deleteTeam: "2025-01-16T21:59:36Z" + deleteTeamInviteCode: "2025-01-16T21:59:36Z" + createWebhook: "2025-01-16T21:59:36Z" + getWebhooks: "2025-01-16T21:59:36Z" + getWebhook: "2025-01-16T21:59:36Z" + deleteWebhook: "2025-01-16T21:59:36Z" + listAliases: "2025-01-16T21:59:36Z" + getAlias: "2025-01-16T21:59:36Z" + deleteAlias: "2025-01-16T21:59:36Z" + listDeploymentAliases: "2025-01-16T21:59:36Z" + assignAlias: "2025-01-16T21:59:36Z" + getCertById: "2025-01-16T21:59:36Z" + removeCert: "2025-01-16T21:59:36Z" + issueCert: "2025-01-16T21:59:36Z" + uploadCert: "2025-01-16T21:59:36Z" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 86028eb3..b06ee828 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -18,7 +18,7 @@ generation: tests: generateNewTests: true typescript: - version: 1.2.2 + version: 1.3.0 additionalDependencies: dependencies: {} devDependencies: {} @@ -32,6 +32,7 @@ typescript: - --filter - '@vercel/sdk' defaultErrorName: SDKError + enableCustomCodeRegions: false enableReactQuery: false enumFormat: union flattenGlobalSecurity: true diff --git a/.speakeasy/testfiles/example.file b/.speakeasy/testfiles/example.file new file mode 100644 index 00000000..3b18e512 --- /dev/null +++ b/.speakeasy/testfiles/example.file @@ -0,0 +1 @@ +hello world diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml new file mode 100644 index 00000000..b9a9fcce --- /dev/null +++ b/.speakeasy/tests.arazzo.yaml @@ -0,0 +1,5216 @@ +arazzo: 1.0.0 +info: + title: Test Suite + summary: Created from vercel-spec.json + version: 0.0.1 +sourceDescriptions: + - name: vercel-spec.json + url: https://TBD.com + type: openapi +workflows: + - workflowId: readAccessGroup + steps: + - stepId: test + operationId: readAccessGroup + parameters: + - name: idOrName + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "isDsyncManaged": false, + "name": "my-access-group", + "createdAt": "1588720733602", + "teamId": "team_123a6c5209bc3778245d011443644c8d27dc2c50", + "updatedAt": "1588720733602", + "accessGroupId": "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + "membersCount": 5, + "projectsCount": 2 + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: readAccessGroup-id + steps: + - stepId: test + operationId: readAccessGroup + parameters: + - name: idOrName + in: path + value: ag_1a2b3c4d5e6f7g8h9i0j + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "isDsyncManaged": false, + "name": "my-access-group", + "createdAt": "1588720733602", + "teamId": "team_123a6c5209bc3778245d011443644c8d27dc2c50", + "updatedAt": "1588720733602", + "accessGroupId": "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + "membersCount": 5, + "projectsCount": 2 + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: readAccessGroup-name + steps: + - stepId: test + operationId: readAccessGroup + parameters: + - name: idOrName + in: path + value: My Access Group + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "isDsyncManaged": false, + "name": "my-access-group", + "createdAt": "1588720733602", + "teamId": "team_123a6c5209bc3778245d011443644c8d27dc2c50", + "updatedAt": "1588720733602", + "accessGroupId": "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + "membersCount": 5, + "projectsCount": 2 + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: updateAccessGroup + steps: + - stepId: test + operationId: updateAccessGroup + parameters: + - name: idOrName + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + name: My access group + projects: [] + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "name": "my-access-group", + "createdAt": "1588720733602", + "teamId": "team_123a6c5209bc3778245d011443644c8d27dc2c50", + "updatedAt": "1588720733602", + "accessGroupId": "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + "membersCount": 5, + "projectsCount": 2 + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: deleteAccessGroup + steps: + - stepId: test + operationId: deleteAccessGroup + parameters: + - name: idOrName + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: access-groups + - workflowId: listAccessGroupMembers + steps: + - stepId: test + operationId: listAccessGroupMembers + parameters: + - name: idOrName + in: path + value: ag_pavWOn1iLObbXLRiwVvzmPrTWyTf + - name: limit + in: query + value: 20 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "members": [ + { + "email": "Jaida_Rogahn@yahoo.com", + "uid": "\u003cid\u003e", + "username": "Karianne_Bernier", + "teamRole": "VIEWER" + } + ], + "pagination": { + "count": "3878.47", + "next": "\u003cvalue\u003e" + } + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: listAccessGroups + steps: + - stepId: test + operationId: listAccessGroups + parameters: + - name: projectId + in: query + value: prj_pavWOn1iLObbx3RowVvzmPrTWyTf + - name: search + in: query + value: example + - name: membersLimit + in: query + value: 20 + - name: projectsLimit + in: query + value: 20 + - name: limit + in: query + value: 20 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: access-groups + - workflowId: createAccessGroup + steps: + - stepId: test + operationId: createAccessGroup + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + name: My access group + projects: [] + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "membersCount": "591.78", + "projectsCount": "3787.91", + "name": "my-access-group", + "createdAt": "1588720733602", + "teamId": "team_123a6c5209bc3778245d011443644c8d27dc2c50", + "updatedAt": "1588720733602", + "accessGroupId": "ag_123a6c5209bc3778245d011443644c8d27dc2c50" + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: listAccessGroupProjects + steps: + - stepId: test + operationId: listAccessGroupProjects + parameters: + - name: idOrName + in: path + value: ag_pavWOn1iLObbXLRiwVvzmPrTWyTf + - name: limit + in: query + value: 20 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "projects": [], + "pagination": { + "count": "7604.02", + "next": "\u003cvalue\u003e" + } + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: createAccessGroupProject + steps: + - stepId: test + operationId: createAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + projectId: prj_ndlgr43fadlPyCtREAqxxdyFK + role: ADMIN + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamId": "\u003cid\u003e", + "accessGroupId": "\u003cid\u003e", + "projectId": "\u003cid\u003e", + "role": "PROJECT_VIEWER", + "createdAt": "\u003cvalue\u003e", + "updatedAt": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: readAccessGroupProject + steps: + - stepId: test + operationId: readAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: + - name: projectId + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamId": "\u003cid\u003e", + "accessGroupId": "\u003cid\u003e", + "projectId": "\u003cid\u003e", + "role": "ADMIN", + "createdAt": "\u003cvalue\u003e", + "updatedAt": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: readAccessGroupProject-id + steps: + - stepId: test + operationId: readAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: ag_1a2b3c4d5e6f7g8h9i0j + - name: projectId + in: path + value: prj_ndlgr43fadlPyCtREAqxxdyFK + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamId": "\u003cid\u003e", + "accessGroupId": "\u003cid\u003e", + "projectId": "\u003cid\u003e", + "role": "ADMIN", + "createdAt": "1706854122023", + "updatedAt": "1735905380072" + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: readAccessGroupProject-name + steps: + - stepId: test + operationId: readAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: My Access Group + - name: projectId + in: path + value: prj_ndlgr43fadlPyCtREAqxxdyFK + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamId": "\u003cid\u003e", + "accessGroupId": "\u003cid\u003e", + "projectId": "\u003cid\u003e", + "role": "PROJECT_DEVELOPER", + "createdAt": "1731124284693", + "updatedAt": "1735836411388" + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: updateAccessGroupProject + steps: + - stepId: test + operationId: updateAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: + - name: projectId + in: path + value: + requestBody: + contentType: application/json + payload: + role: ADMIN + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamId": "\u003cid\u003e", + "accessGroupId": "\u003cid\u003e", + "projectId": "\u003cid\u003e", + "role": "ADMIN", + "createdAt": "\u003cvalue\u003e", + "updatedAt": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: updateAccessGroupProject-id + steps: + - stepId: test + operationId: updateAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: ag_1a2b3c4d5e6f7g8h9i0j + - name: projectId + in: path + value: prj_ndlgr43fadlPyCtREAqxxdyFK + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + role: ADMIN + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamId": "\u003cid\u003e", + "accessGroupId": "\u003cid\u003e", + "projectId": "\u003cid\u003e", + "role": "ADMIN", + "createdAt": "1706645964469", + "updatedAt": "1735872085577" + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: updateAccessGroupProject-name + steps: + - stepId: test + operationId: updateAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: My Access Group + - name: projectId + in: path + value: prj_ndlgr43fadlPyCtREAqxxdyFK + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + role: ADMIN + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamId": "\u003cid\u003e", + "accessGroupId": "\u003cid\u003e", + "projectId": "\u003cid\u003e", + "role": "ADMIN", + "createdAt": "1708158031858", + "updatedAt": "1735838146635" + } + type: simple + x-speakeasy-test-group: access-groups + - workflowId: deleteAccessGroupProject-id + steps: + - stepId: test + operationId: deleteAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: ag_1a2b3c4d5e6f7g8h9i0j + - name: projectId + in: path + value: prj_ndlgr43fadlPyCtREAqxxdyFK + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: access-groups + - workflowId: deleteAccessGroupProject-name + steps: + - stepId: test + operationId: deleteAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: My Access Group + - name: projectId + in: path + value: prj_ndlgr43fadlPyCtREAqxxdyFK + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: access-groups + - workflowId: deleteAccessGroupProject + steps: + - stepId: test + operationId: deleteAccessGroupProject + parameters: + - name: accessGroupIdOrName + in: path + value: + - name: projectId + in: path + value: + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: access-groups + - workflowId: recordEvents + steps: + - stepId: test + operationId: recordEvents + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + - name: x-artifact-client-ci + in: header + value: VERCEL + - name: x-artifact-client-interactive + in: header + value: 0 + requestBody: + contentType: application/json + payload: + - duration: 400 + event: HIT + hash: 12HKQaOmR5t5Uy6vdcQsNIiZgHGB + sessionId: + source: LOCAL + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: artifacts + - workflowId: status + steps: + - stepId: test + operationId: status + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "status": "enabled" + } + type: simple + x-speakeasy-test-group: artifacts + - workflowId: downloadArtifact + steps: + - stepId: test + operationId: downloadArtifact + parameters: + - name: hash + in: path + value: 12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + - name: x-artifact-client-ci + in: header + value: VERCEL + - name: x-artifact-client-interactive + in: header + value: 0 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: artifacts + - workflowId: artifactExists + steps: + - stepId: test + operationId: artifactExists + parameters: + - name: hash + in: path + value: 12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: artifacts + - workflowId: artifactQuery + steps: + - stepId: test + operationId: artifactQuery + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + hashes: + - 12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - 34HKQaOmR5t5Uy6vasdasdasdasd + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "key": { + "error": { + "message": "\u003cvalue\u003e" + } + }, + "key1": { + "size": 9698.01, + "taskDurationMs": 1946.74 + }, + "key2": { + "size": 1135.95, + "taskDurationMs": 5348.41 + } + } + type: simple + x-speakeasy-test-group: artifacts + - workflowId: createCheck + steps: + - stepId: test + operationId: createCheck + parameters: + - name: deploymentId + in: path + value: dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + blocking: true + detailsUrl: http://example.com + externalId: 1234abc + name: Performance Check + path: / + rerequestable: true + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "chk_1a2b3c4d5e6f7g8h9i0j", + "name": "Performance Check", + "status": "completed", + "blocking": false, + "integrationId": "\u003cid\u003e", + "deploymentId": "\u003cid\u003e", + "createdAt": "2396.37", + "updatedAt": "1065.29" + } + type: simple + x-speakeasy-test-group: checks + - workflowId: getAllChecks + steps: + - stepId: test + operationId: getAllChecks + parameters: + - name: deploymentId + in: path + value: dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "checks": [ + { + "createdAt": "4203.11", + "id": "\u003cid\u003e", + "integrationId": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "rerequestable": false, + "status": "registered", + "updatedAt": "4461.16" + } + ] + } + type: simple + x-speakeasy-test-group: checks + - workflowId: getCheck + steps: + - stepId: test + operationId: getCheck + parameters: + - name: deploymentId + in: path + value: dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6 + - name: checkId + in: path + value: check_2qn7PZrx89yxY34vEZPD31Y9XVj6 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "status": "completed", + "blocking": true, + "integrationId": "\u003cid\u003e", + "deploymentId": "\u003cid\u003e", + "createdAt": "2039.14", + "updatedAt": "676.34" + } + type: simple + x-speakeasy-test-group: checks + - workflowId: updateCheck + steps: + - stepId: test + operationId: updateCheck + parameters: + - name: deploymentId + in: path + value: dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6 + - name: checkId + in: path + value: check_2qn7PZrx89yxY34vEZPD31Y9XVj6 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + detailsUrl: https://example.com/check/run/1234abc + externalId: 1234abc + name: Performance Check + output: + metrics: + CLS: + previousValue: 2 + source: web-vitals + value: 4 + FCP: + previousValue: 900 + source: web-vitals + value: 1200 + LCP: + previousValue: 1000 + source: web-vitals + value: 1200 + TBT: + previousValue: 3500 + source: web-vitals + value: 3000 + virtualExperienceScore: + previousValue: 35 + source: web-vitals + value: 30 + path: / + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "status": "completed", + "blocking": true, + "integrationId": "\u003cid\u003e", + "deploymentId": "\u003cid\u003e", + "createdAt": "9017.64", + "updatedAt": "7909.85" + } + type: simple + x-speakeasy-test-group: checks + - workflowId: rerequestCheck + steps: + - stepId: test + operationId: rerequestCheck + parameters: + - name: deploymentId + in: path + value: dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6 + - name: checkId + in: path + value: check_2qn7PZrx89yxY34vEZPD31Y9XVj6 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: checks + - workflowId: updateProjectDataCache + steps: + - stepId: test + operationId: updateProjectDataCache + parameters: + - name: projectId + in: path + value: prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + disabled: true + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "accountId": "\u003cid\u003e", + "crons": { + "enabledAt": "7135.80", + "disabledAt": "2989.85", + "updatedAt": "6226.22", + "deploymentId": "\u003cid\u003e", + "definitions": [ + { + "host": "vercel.com", + "path": "/api/crons/sync-something?hello=world", + "schedule": "0 0 * * *" + }, + { + "host": "vercel.com", + "path": "/api/crons/sync-something?hello=world", + "schedule": "0 0 * * *" + }, + { + "host": "vercel.com", + "path": "/api/crons/sync-something?hello=world", + "schedule": "0 0 * * *" + } + ] + }, + "directoryListing": false, + "id": "\u003cid\u003e", + "latestDeployments": [ + { + "id": "\u003cid\u003e", + "createdAt": "5719.60", + "createdIn": "\u003cvalue\u003e", + "creator": { + "email": "Braeden15@gmail.com", + "uid": "\u003cid\u003e", + "username": "Teresa84" + }, + "deploymentHostname": "\u003cvalue\u003e", + "name": "\u003cvalue\u003e", + "plan": "pro", + "previewCommentsEnabled": false, + "private": false, + "readyState": "BUILDING", + "type": "LAMBDAS", + "url": "https://unknown-gift.biz", + "userId": "\u003cid\u003e" + }, + { + "id": "\u003cid\u003e", + "createdAt": "7644.50", + "createdIn": "\u003cvalue\u003e", + "creator": { + "email": "Erich.Mann@hotmail.com", + "uid": "\u003cid\u003e", + "username": "Genoveva89" + }, + "deploymentHostname": "\u003cvalue\u003e", + "name": "\u003cvalue\u003e", + "plan": "hobby", + "previewCommentsEnabled": false, + "private": true, + "readyState": "ERROR", + "type": "LAMBDAS", + "url": "https://slimy-tuba.name", + "userId": "\u003cid\u003e" + }, + { + "id": "\u003cid\u003e", + "createdAt": "2357.62", + "createdIn": "\u003cvalue\u003e", + "creator": { + "email": "Garret.Ferry81@gmail.com", + "uid": "\u003cid\u003e", + "username": "Vivianne.Gutkowski" + }, + "deploymentHostname": "\u003cvalue\u003e", + "name": "\u003cvalue\u003e", + "plan": "pro", + "previewCommentsEnabled": false, + "private": true, + "readyState": "CANCELED", + "type": "LAMBDAS", + "url": "https://astonishing-cinema.net/", + "userId": "\u003cid\u003e" + } + ], + "name": "\u003cvalue\u003e", + "nodeVersion": "10.x" + } + type: simple + x-speakeasy-test-group: projects + - workflowId: getProjects + steps: + - stepId: test + operationId: getProjects + parameters: + - name: gitForkProtection + in: query + value: "1" + - name: repoUrl + in: query + value: https://github.com/vercel/next.js + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "projects": [], + "pagination": { + "count": 20, + "next": 1540095775951, + "prev": 1540095775951 + } + } + type: simple + x-speakeasy-test-group: projects + - workflowId: createProject + steps: + - stepId: test + operationId: createProject + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + name: a-project-name + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "accountId": "\u003cid\u003e", + "crons": { + "enabledAt": "5535.60", + "disabledAt": "7749.32", + "updatedAt": "4248.45", + "deploymentId": "\u003cid\u003e", + "definitions": [ + { + "host": "vercel.com", + "path": "/api/crons/sync-something?hello=world", + "schedule": "0 0 * * *" + }, + { + "host": "vercel.com", + "path": "/api/crons/sync-something?hello=world", + "schedule": "0 0 * * *" + } + ] + }, + "directoryListing": false, + "id": "\u003cid\u003e", + "latestDeployments": [ + { + "id": "\u003cid\u003e", + "createdAt": "3954.07", + "createdIn": "\u003cvalue\u003e", + "creator": { + "email": "Junior46@yahoo.com", + "uid": "\u003cid\u003e", + "username": "Rick.Fritsch" + }, + "deploymentHostname": "\u003cvalue\u003e", + "name": "\u003cvalue\u003e", + "plan": "enterprise", + "previewCommentsEnabled": false, + "private": false, + "readyState": "CANCELED", + "type": "LAMBDAS", + "url": "https://potable-bid.biz", + "userId": "\u003cid\u003e" + } + ], + "name": "\u003cvalue\u003e", + "nodeVersion": "22.x", + "targets": { + "key": { + "id": "\u003cid\u003e", + "createdAt": "1667.88", + "createdIn": "\u003cvalue\u003e", + "creator": { + "email": "Mustafa49@yahoo.com", + "uid": "\u003cid\u003e", + "username": "Roberta.Cormier" + }, + "deploymentHostname": "\u003cvalue\u003e", + "name": "\u003cvalue\u003e", + "plan": "hobby", + "previewCommentsEnabled": false, + "private": false, + "readyState": "INITIALIZING", + "type": "LAMBDAS", + "url": "https://formal-breastplate.org", + "userId": "\u003cid\u003e" + } + } + } + type: simple + x-speakeasy-test-group: projects + - workflowId: updateProject + steps: + - stepId: test + operationId: updateProject + parameters: + - name: idOrName + in: path + value: prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + name: a-project-name + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "accountId": "\u003cid\u003e", + "crons": { + "enabledAt": "6482.22", + "disabledAt": "3040.87", + "updatedAt": "9398.85", + "deploymentId": "\u003cid\u003e", + "definitions": [ + { + "host": "vercel.com", + "path": "/api/crons/sync-something?hello=world", + "schedule": "0 0 * * *" + }, + { + "host": "vercel.com", + "path": "/api/crons/sync-something?hello=world", + "schedule": "0 0 * * *" + } + ] + }, + "directoryListing": true, + "id": "\u003cid\u003e", + "latestDeployments": [ + { + "id": "\u003cid\u003e", + "createdAt": "7688.55", + "createdIn": "\u003cvalue\u003e", + "creator": { + "email": "Alfredo_Murazik@yahoo.com", + "uid": "\u003cid\u003e", + "username": "Kiera28" + }, + "deploymentHostname": "\u003cvalue\u003e", + "name": "\u003cvalue\u003e", + "plan": "enterprise", + "previewCommentsEnabled": false, + "private": false, + "readyState": "ERROR", + "type": "LAMBDAS", + "url": "https://close-premise.net/", + "userId": "\u003cid\u003e" + }, + { + "id": "\u003cid\u003e", + "createdAt": "3847.37", + "createdIn": "\u003cvalue\u003e", + "creator": { + "email": "Zachery.Johns68@yahoo.com", + "uid": "\u003cid\u003e", + "username": "Nicole_Reynolds" + }, + "deploymentHostname": "\u003cvalue\u003e", + "name": "\u003cvalue\u003e", + "plan": "hobby", + "previewCommentsEnabled": false, + "private": true, + "readyState": "QUEUED", + "type": "LAMBDAS", + "url": "https://unsightly-newsstand.net/", + "userId": "\u003cid\u003e" + } + ], + "name": "\u003cvalue\u003e", + "nodeVersion": "14.x", + "targets": { + "key": { + "id": "\u003cid\u003e", + "createdAt": "5163.13", + "createdIn": "\u003cvalue\u003e", + "creator": { + "email": "Joyce_Hodkiewicz46@yahoo.com", + "uid": "\u003cid\u003e", + "username": "Bud.Bogan18" + }, + "deploymentHostname": "\u003cvalue\u003e", + "name": "\u003cvalue\u003e", + "plan": "pro", + "previewCommentsEnabled": false, + "private": true, + "readyState": "QUEUED", + "type": "LAMBDAS", + "url": "https://frugal-coordination.net/", + "userId": "\u003cid\u003e" + } + } + } + type: simple + x-speakeasy-test-group: projects + - workflowId: deleteProject + steps: + - stepId: test + operationId: deleteProject + parameters: + - name: idOrName + in: path + value: prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: projects + - workflowId: getProjectDomains + steps: + - stepId: test + operationId: getProjectDomains + parameters: + - name: idOrName + in: path + value: + - name: customEnvironmentId + in: query + value: env_123abc4567 + - name: redirect + in: query + value: example.com + - name: limit + in: query + value: 20 + - name: since + in: query + value: 1609499532000 + - name: until + in: query + value: 1612264332000 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "domains": [ + { + "name": "\u003cvalue\u003e", + "apexName": "\u003cvalue\u003e", + "projectId": "\u003cid\u003e", + "verified": true + } + ], + "pagination": { + "count": 20, + "next": 1540095775951, + "prev": 1540095775951 + } + } + type: simple + x-speakeasy-test-group: projects + - workflowId: getProjectDomain + steps: + - stepId: test + operationId: getProjectDomain + parameters: + - name: idOrName + in: path + value: + - name: domain + in: path + value: www.example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "name": "\u003cvalue\u003e", + "apexName": "\u003cvalue\u003e", + "projectId": "\u003cid\u003e", + "verified": true + } + type: simple + x-speakeasy-test-group: projects + - workflowId: updateProjectDomain + steps: + - stepId: test + operationId: updateProjectDomain + parameters: + - name: idOrName + in: path + value: + - name: domain + in: path + value: www.example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + gitBranch: null + redirect: foobar.com + redirectStatusCode: 307 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "name": "\u003cvalue\u003e", + "apexName": "\u003cvalue\u003e", + "projectId": "\u003cid\u003e", + "verified": false + } + type: simple + x-speakeasy-test-group: projects + - workflowId: removeProjectDomain + steps: + - stepId: test + operationId: removeProjectDomain + parameters: + - name: idOrName + in: path + value: + - name: domain + in: path + value: www.example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: projects + - workflowId: addProjectDomain + steps: + - stepId: test + operationId: addProjectDomain + parameters: + - name: idOrName + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + gitBranch: null + name: www.example.com + redirect: foobar.com + redirectStatusCode: 307 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "name": "\u003cvalue\u003e", + "apexName": "\u003cvalue\u003e", + "projectId": "\u003cid\u003e", + "verified": true + } + type: simple + x-speakeasy-test-group: projects + - workflowId: verifyProjectDomain + steps: + - stepId: test + operationId: verifyProjectDomain + parameters: + - name: idOrName + in: path + value: prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - name: domain + in: path + value: example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "name": "\u003cvalue\u003e", + "apexName": "\u003cvalue\u003e", + "projectId": "\u003cid\u003e", + "verified": false + } + type: simple + x-speakeasy-test-group: projects + - workflowId: getProjectEnv + steps: + - stepId: test + operationId: getProjectEnv + parameters: + - name: idOrName + in: path + value: prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "type": "plain", + "key": "\u003ckey\u003e", + "value": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: projects + - workflowId: createProjectEnv + steps: + - stepId: test + operationId: createProjectEnv + parameters: + - name: idOrName + in: path + value: prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA + - name: upsert + in: query + value: "true" + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + comment: database connection string for production + gitBranch: feature-1 + key: API_URL + target: + - preview + type: plain + value: https://api.vercel.com + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "created": [ + {} + ], + "failed": [ + { + "error": { + "code": "\u003cvalue\u003e", + "message": "\u003cvalue\u003e" + } + } + ] + } + type: simple + x-speakeasy-test-group: projects + - workflowId: removeProjectEnv + steps: + - stepId: test + operationId: removeProjectEnv + parameters: + - name: idOrName + in: path + value: prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA + - name: id + in: path + value: XMbOEya1gUUO1ir4 + - name: customEnvironmentId + in: query + value: env_123abc4567 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + [ + { + "type": "sensitive", + "key": "\u003ckey\u003e", + "value": "\u003cvalue\u003e" + }, + { + "type": "plain", + "key": "\u003ckey\u003e", + "value": "\u003cvalue\u003e" + }, + { + "type": "encrypted", + "key": "\u003ckey\u003e", + "value": "\u003cvalue\u003e" + } + ] + type: simple + x-speakeasy-test-group: projects + - workflowId: updateProjectProtectionBypass + steps: + - stepId: test + operationId: updateProjectProtectionBypass + parameters: + - name: idOrName + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: {} + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: projects + - workflowId: requestPromote + steps: + - stepId: test + operationId: requestPromote + parameters: + - name: projectId + in: path + value: + - name: deploymentId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 201 + x-speakeasy-test-group: projects + - workflowId: listPromoteAliases + steps: + - stepId: test + operationId: listPromoteAliases + parameters: + - name: projectId + in: path + value: + - name: limit + in: query + value: 20 + - name: since + in: query + value: 1609499532000 + - name: until + in: query + value: 1612264332000 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: projects + - workflowId: getDeploymentEvents + steps: + - stepId: test + operationId: getDeploymentEvents + parameters: + - name: idOrUrl + in: path + value: dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd + - name: direction + in: query + value: backward + - name: follow + in: query + value: 1 + - name: limit + in: query + value: 100 + - name: name + in: query + value: bld_cotnkcr76 + - name: since + in: query + value: 1540095775941 + - name: until + in: query + value: 1540106318643 + - name: statusCode + in: query + value: 5xx + - name: delimiter + in: query + value: 1 + - name: builds + in: query + value: 1 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: deployments + - workflowId: getDeployment + steps: + - stepId: test + operationId: getDeployment + parameters: + - name: idOrUrl + in: path + value: dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ + - name: withGitRepoInfo + in: query + value: "true" + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "aliasAssigned": false, + "bootedAt": 2317.28, + "buildingAt": 458.05, + "buildSkipped": true, + "creator": { + "uid": "\u003cid\u003e" + }, + "public": true, + "status": "ERROR", + "id": "\u003cid\u003e", + "type": "LAMBDAS", + "createdAt": 3161.76, + "name": "\u003cvalue\u003e", + "readyState": "READY", + "meta": { + "key": "\u003cvalue\u003e", + "key1": "\u003cvalue\u003e" + }, + "regions": [], + "url": "https://disloyal-backburn.info", + "version": 1604.95 + } + type: simple + x-speakeasy-test-group: deployments + - workflowId: createDeployment + steps: + - stepId: test + operationId: createDeployment + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + files: + - file: folder/file.js + - file: folder/file.js + gitMetadata: + commitAuthorName: kyliau + commitMessage: add method to measure Interaction to Next Paint (INP) (#36490) + commitRef: main + commitSha: dc36199b2234c6586ebe05ec94078a895c707e29 + dirty: true + remoteUrl: https://github.com/vercel/next.js + meta: + foo: bar + name: my-instant-deployment + project: my-deployment-project + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "build": { + "env": [] + }, + "env": [ + "\u003cvalue\u003e", + "\u003cvalue\u003e", + "\u003cvalue\u003e" + ], + "inspectorUrl": "https://grave-dredger.com", + "isInConcurrentBuildsQueue": false, + "isInSystemBuildsQueue": false, + "projectSettings": {}, + "aliasAssigned": false, + "bootedAt": "4336.60", + "buildingAt": "7030.55", + "buildSkipped": true, + "creator": { + "uid": "\u003cid\u003e" + }, + "public": false, + "status": "QUEUED", + "type": "LAMBDAS", + "createdAt": "5133.44", + "name": "\u003cvalue\u003e", + "id": "\u003cid\u003e", + "version": "1218.01", + "meta": { + "key": "\u003cvalue\u003e", + "key1": "\u003cvalue\u003e" + }, + "readyState": "INITIALIZING", + "regions": [], + "url": "https://apprehensive-perp.info/", + "projectId": "\u003cid\u003e", + "ownerId": "\u003cid\u003e", + "routes": [ + { + "src": "\u003cvalue\u003e" + }, + { + "src": "\u003cvalue\u003e" + } + ], + "plan": "pro", + "createdIn": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: deployments + - workflowId: cancelDeployment + steps: + - stepId: test + operationId: cancelDeployment + parameters: + - name: id + in: path + value: dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "build": { + "env": [ + "\u003cvalue\u003e", + "\u003cvalue\u003e", + "\u003cvalue\u003e" + ] + }, + "env": [ + "\u003cvalue\u003e", + "\u003cvalue\u003e" + ], + "inspectorUrl": "https://concrete-gerbil.org", + "isInConcurrentBuildsQueue": false, + "isInSystemBuildsQueue": true, + "projectSettings": {}, + "aliasAssigned": false, + "bootedAt": "8528.74", + "buildingAt": "7590.78", + "buildSkipped": false, + "creator": { + "uid": "\u003cid\u003e" + }, + "public": true, + "status": "BUILDING", + "id": "\u003cid\u003e", + "createdAt": "3071.53", + "name": "\u003cvalue\u003e", + "meta": { + "key": "\u003cvalue\u003e", + "key1": "\u003cvalue\u003e", + "key2": "\u003cvalue\u003e" + }, + "readyState": "QUEUED", + "regions": [ + "\u003cvalue\u003e" + ], + "type": "LAMBDAS", + "url": "https://timely-reboot.name", + "version": "6067.47", + "createdIn": "\u003cvalue\u003e", + "ownerId": "\u003cid\u003e", + "plan": "pro", + "projectId": "\u003cid\u003e", + "routes": [ + { + "handle": "resource" + }, + { + "src": "\u003cvalue\u003e", + "continue": false, + "middleware": 6618.12 + } + ] + } + type: simple + x-speakeasy-test-group: deployments + - workflowId: uploadFile + steps: + - stepId: test + operationId: uploadFile + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: deployments + - workflowId: listDeploymentFiles + steps: + - stepId: test + operationId: listDeploymentFiles + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + [ + { + "name": "my-file.json", + "type": "file", + "uid": "2d4aad419917f15b1146e9e03ddc9bb31747e4d0", + "contentType": "application/json", + "mode": "956.44" + }, + { + "name": "my-file.json", + "type": "file", + "uid": "2d4aad419917f15b1146e9e03ddc9bb31747e4d0", + "contentType": "application/json", + "mode": "1805.56" + } + ] + type: simple + x-speakeasy-test-group: deployments + - workflowId: getDeploymentFileContents + steps: + - stepId: test + operationId: getDeploymentFileContents + parameters: + - name: id + in: path + value: + - name: fileId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + x-speakeasy-test-group: deployments + - workflowId: getDeployments + steps: + - stepId: test + operationId: getDeployments + parameters: + - name: app + in: query + value: docs + - name: from + in: query + value: 1612948664566 + - name: limit + in: query + value: 10 + - name: projectId + in: query + value: QmXGTs7mvAMMC7WW5ebrM33qKG32QK3h4vmQMjmY + - name: target + in: query + value: production + - name: to + in: query + value: 1612948664566 + - name: users + in: query + value: kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY + - name: since + in: query + value: 1540095775941 + - name: until + in: query + value: 1540095775951 + - name: state + in: query + value: BUILDING,READY + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "pagination": { + "count": 20, + "next": 1540095775951, + "prev": 1540095775951 + }, + "deployments": [ + { + "uid": "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa", + "name": "docs", + "url": "docs-9jaeg38me.vercel.app", + "created": 1609492210000, + "deleted": 1609492210000, + "undeleted": 1609492210000, + "softDeletedByRetention": true, + "source": "cli", + "state": "READY", + "readyState": "READY", + "type": "LAMBDAS", + "creator": { + "uid": "eLrCnEgbKhsHyfbiNR7E8496", + "email": "example@example.com", + "username": "johndoe", + "githubLogin": "johndoe", + "gitlabLogin": "johndoe" + }, + "target": "production", + "createdAt": 1609492210000, + "buildingAt": 1609492210000, + "ready": 1609492210000, + "inspectorUrl": "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq" + }, + { + "uid": "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa", + "name": "docs", + "url": "docs-9jaeg38me.vercel.app", + "created": 1609492210000, + "deleted": 1609492210000, + "undeleted": 1609492210000, + "softDeletedByRetention": true, + "source": "cli", + "state": "READY", + "readyState": "READY", + "type": "LAMBDAS", + "creator": { + "uid": "eLrCnEgbKhsHyfbiNR7E8496", + "email": "example@example.com", + "username": "johndoe", + "githubLogin": "johndoe", + "gitlabLogin": "johndoe" + }, + "target": "production", + "createdAt": 1609492210000, + "buildingAt": 1609492210000, + "ready": 1609492210000, + "inspectorUrl": "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq" + } + ] + } + type: simple + x-speakeasy-test-group: deployments + - workflowId: deleteDeployment + steps: + - stepId: test + operationId: deleteDeployment + parameters: + - name: id + in: path + value: dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd + - name: url + in: query + value: https://files-orcin-xi.vercel.app/ + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "uid": "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd", + "state": "DELETED" + } + type: simple + x-speakeasy-test-group: deployments + - workflowId: buyDomain + steps: + - stepId: test + operationId: buyDomain + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + address1: 340 S Lemon Ave Suite 4133 + city: San Francisco + country: US + email: jane.doe@someplace.com + expectedPrice: 10 + firstName: Jane + lastName: Doe + name: example.com + orgName: Acme Inc. + phone: "+1.4158551452" + postalCode: "91789" + renew: true + state: CA + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "domain": { + "uid": "\u003cid\u003e", + "ns": [ + "\u003cvalue\u003e", + "\u003cvalue\u003e", + "\u003cvalue\u003e" + ], + "verified": false, + "created": "9374.80", + "pending": false + } + } + type: simple + x-speakeasy-test-group: domains + - workflowId: checkDomainPrice + steps: + - stepId: test + operationId: checkDomainPrice + parameters: + - name: name + in: query + value: example.com + - name: type + in: query + value: new + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: domains + - workflowId: checkDomainStatus + steps: + - stepId: test + operationId: checkDomainStatus + parameters: + - name: name + in: query + value: example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "available": true + } + type: simple + x-speakeasy-test-group: domains + - workflowId: getDomainTransfer + steps: + - stepId: test + operationId: getDomainTransfer + parameters: + - name: domain + in: path + value: example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "transferable": false, + "transferPolicy": "charge-and-renew", + "reason": "\u003cvalue\u003e", + "status": "completed" + } + type: simple + x-speakeasy-test-group: domains + - workflowId: getDomainConfig + steps: + - stepId: test + operationId: getDomainConfig + parameters: + - name: domain + in: path + value: example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "misconfigured": true + } + type: simple + x-speakeasy-test-group: domains + - workflowId: getDomain + steps: + - stepId: test + operationId: getDomain + parameters: + - name: domain + in: path + value: example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "domain": { + "suffix": true, + "verified": true, + "nameservers": [ + "ns1.nameserver.net", + "ns2.nameserver.net" + ], + "intendedNameservers": [ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com" + ], + "customNameservers": [ + "ns1.nameserver.net", + "ns2.nameserver.net" + ], + "creator": { + "username": "vercel_user", + "email": "demo@example.com", + "id": "ZspSRT4ljIEEmMHgoDwKWDei" + }, + "teamId": "\u003cid\u003e", + "boughtAt": 1613602938882, + "createdAt": 1613602938882, + "expiresAt": 1613602938882, + "id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + "name": "example.com", + "orderedAt": 1613602938882, + "renew": true, + "serviceType": "zeit.world", + "transferredAt": 1613602938882, + "transferStartedAt": 1613602938882, + "userId": "\u003cid\u003e" + } + } + type: simple + x-speakeasy-test-group: domains + - workflowId: getDomains + steps: + - stepId: test + operationId: getDomains + parameters: + - name: limit + in: query + value: 20 + - name: since + in: query + value: 1609499532000 + - name: until + in: query + value: 1612264332000 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "domains": [ + { + "verified": true, + "nameservers": [ + "ns1.nameserver.net", + "ns2.nameserver.net" + ], + "intendedNameservers": [ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com" + ], + "customNameservers": [ + "ns1.nameserver.net", + "ns2.nameserver.net" + ], + "creator": { + "username": "vercel_user", + "email": "demo@example.com", + "id": "ZspSRT4ljIEEmMHgoDwKWDei" + }, + "teamId": "\u003cid\u003e", + "createdAt": 1613602938882, + "boughtAt": 1613602938882, + "expiresAt": 1613602938882, + "id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + "name": "example.com", + "orderedAt": 1613602938882, + "renew": true, + "serviceType": "zeit.world", + "transferredAt": 1613602938882, + "transferStartedAt": 1613602938882, + "userId": "\u003cid\u003e" + } + ], + "pagination": { + "count": 20, + "next": 1540095775951, + "prev": 1540095775951 + } + } + type: simple + x-speakeasy-test-group: domains + - workflowId: createOrTransferDomain + steps: + - stepId: test + operationId: createOrTransferDomain + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + authCode: fdhfr820ad#@FAdlj$$ + expectedPrice: 8 + method: transfer-in + name: example.com + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "domain": { + "verified": true, + "nameservers": [ + "ns1.nameserver.net", + "ns2.nameserver.net" + ], + "intendedNameservers": [ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com" + ], + "customNameservers": [ + "ns1.nameserver.net", + "ns2.nameserver.net" + ], + "creator": { + "username": "vercel_user", + "email": "demo@example.com", + "id": "ZspSRT4ljIEEmMHgoDwKWDei" + }, + "name": "example.com", + "boughtAt": 1613602938882, + "createdAt": 1613602938882, + "expiresAt": 1613602938882, + "id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + "orderedAt": 1613602938882, + "renew": true, + "serviceType": "zeit.world", + "transferredAt": 1613602938882, + "transferStartedAt": 1613602938882, + "userId": "\u003cid\u003e", + "teamId": "\u003cid\u003e" + } + } + type: simple + x-speakeasy-test-group: domains + - workflowId: deleteDomain + steps: + - stepId: test + operationId: deleteDomain + parameters: + - name: domain + in: path + value: example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "uid": "rec_V0fra8eEgQwEpFhYG2vTzC3K" + } + type: simple + x-speakeasy-test-group: domains + - workflowId: createRecord + steps: + - stepId: test + operationId: createRecord + parameters: + - name: domain + in: path + value: example.com + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + comment: used to verify ownership of domain + https: + params: alpn=h2,h3 + priority: 10 + target: host.example.com + ttl: 60 + type: CNAME + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "uid": "rec_V0fra8eEgQwEpFhYG2vTzC3K" + } + type: simple + x-speakeasy-test-group: dns + - workflowId: updateRecord + steps: + - stepId: test + operationId: updateRecord + parameters: + - name: recordId + in: path + value: rec_2qn7pzrx89yxy34vezpd31y9 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + comment: used to verify ownership of domain + https: + priority: 35000 + target: example2.com. + name: example-1 + srv: + port: 570172 + priority: 199524 + target: example2.com. + weight: 97604 + ttl: "60" + type: A + value: google.com + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "creator": "\u003cvalue\u003e", + "domain": "rectangular-peninsula.net", + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "recordType": "SRV", + "type": "record-sys", + "value": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: dns + - workflowId: removeRecord + steps: + - stepId: test + operationId: removeRecord + parameters: + - name: domain + in: path + value: example.com + - name: recordId + in: path + value: rec_V0fra8eEgQwEpFhYG2vTzC3K + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: dns + - workflowId: getEdgeConfigs + steps: + - stepId: test + operationId: getEdgeConfigs + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + [ + { + "sizeInBytes": "8239.08", + "itemCount": "557.07" + } + ] + type: simple + x-speakeasy-test-group: edge-config + - workflowId: createEdgeConfig + steps: + - stepId: test + operationId: createEdgeConfig + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + slug: + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "sizeInBytes": "145.91", + "itemCount": "5042.97" + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: getEdgeConfig + steps: + - stepId: test + operationId: getEdgeConfig + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "sizeInBytes": "3967.65", + "itemCount": "7010.13" + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: updateEdgeConfig + steps: + - stepId: test + operationId: updateEdgeConfig + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + slug: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "sizeInBytes": "5022.37", + "itemCount": "211.31" + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: deleteEdgeConfig + steps: + - stepId: test + operationId: deleteEdgeConfig + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: edge-config + - workflowId: getEdgeConfigItems + steps: + - stepId: test + operationId: getEdgeConfigItems + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "key": "\u003ckey\u003e", + "value": "5002.95", + "edgeConfigId": "\u003cid\u003e", + "createdAt": "9069.68", + "updatedAt": "6276.41" + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: getEdgeConfigSchema + steps: + - stepId: test + operationId: getEdgeConfigSchema + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: edge-config + - workflowId: patchEdgeConfigSchema + steps: + - stepId: test + operationId: patchEdgeConfigSchema + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + definition: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: edge-config + - workflowId: deleteEdgeConfigSchema + steps: + - stepId: test + operationId: deleteEdgeConfigSchema + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: edge-config + - workflowId: getEdgeConfigItem + steps: + - stepId: test + operationId: getEdgeConfigItem + parameters: + - name: edgeConfigId + in: path + value: + - name: edgeConfigItemKey + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "key": "\u003ckey\u003e", + "value": "9966.77", + "edgeConfigId": "\u003cid\u003e", + "createdAt": "1621.85", + "updatedAt": "3034.44" + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: getEdgeConfigTokens + steps: + - stepId: test + operationId: getEdgeConfigTokens + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "token": "\u003cvalue\u003e", + "label": "\u003cvalue\u003e", + "id": "\u003cid\u003e", + "edgeConfigId": "\u003cid\u003e", + "createdAt": "7692.35" + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: deleteEdgeConfigTokens + steps: + - stepId: test + operationId: deleteEdgeConfigTokens + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + tokens: [] + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: edge-config + - workflowId: getEdgeConfigToken + steps: + - stepId: test + operationId: getEdgeConfigToken + parameters: + - name: edgeConfigId + in: path + value: + - name: token + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "token": "\u003cvalue\u003e", + "label": "\u003cvalue\u003e", + "id": "\u003cid\u003e", + "edgeConfigId": "\u003cid\u003e", + "createdAt": "3597.77" + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: createEdgeConfigToken + steps: + - stepId: test + operationId: createEdgeConfigToken + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + label: + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "token": "\u003cvalue\u003e", + "id": "\u003cid\u003e" + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: getEdgeConfigBackups + steps: + - stepId: test + operationId: getEdgeConfigBackups + parameters: + - name: edgeConfigId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "backups": [ + { + "id": "\u003cid\u003e", + "lastModified": "2424.25" + }, + { + "id": "\u003cid\u003e", + "lastModified": "1518.43" + } + ], + "pagination": { + "hasNext": true + } + } + type: simple + x-speakeasy-test-group: edge-config + - workflowId: listUserEvents + steps: + - stepId: test + operationId: listUserEvents + parameters: + - name: limit + in: query + value: 20 + - name: since + in: query + value: "2019-12-08T10:00:38.976Z" + - name: until + in: query + value: "2019-12-09T23:00:38.976Z" + - name: types + in: query + value: login,team-member-join,domain-buy + - name: userId + in: query + value: aeIInYVk59zbFF2SxfyxxmuO + - name: withPayload + in: query + value: "true" + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "events": [] + } + type: simple + x-speakeasy-test-group: user + - workflowId: requestDelete + steps: + - stepId: test + operationId: requestDelete + requestBody: + contentType: application/json + payload: {} + successCriteria: + - condition: $statusCode == 202 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "email": "Lamont82@gmail.com", + "message": "Verification email sent" + } + type: simple + x-speakeasy-test-group: user + - workflowId: get-account-info + steps: + - stepId: test + operationId: get-account-info + parameters: + - name: integrationConfigurationId + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "url": "https://friendly-pleasure.info", + "contact": { + "email": "Horace_Bernhard@yahoo.com" + } + } + type: simple + x-speakeasy-test-group: marketplace + - workflowId: get-member + steps: + - stepId: test + operationId: get-member + parameters: + - name: integrationConfigurationId + in: path + value: + - name: memberId + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "role": "ADMIN" + } + type: simple + x-speakeasy-test-group: marketplace + - workflowId: create-event + steps: + - stepId: test + operationId: create-event + parameters: + - name: integrationConfigurationId + in: path + value: + requestBody: + contentType: application/json + payload: + event: + type: installation.updated + successCriteria: + - condition: $statusCode == 201 + x-speakeasy-test-group: marketplace + - workflowId: submit-billing-data + steps: + - stepId: test + operationId: submit-billing-data + parameters: + - name: integrationConfigurationId + in: path + value: + requestBody: + contentType: application/json + payload: + billing: + items: + - billingPlanId: + name: + price: "161.25" + quantity: 8824.47 + total: + units: + eod: "2022-12-28T23:46:57.523Z" + period: + end: "2023-10-18T01:18:36.230Z" + start: "2022-06-25T19:04:50.518Z" + timestamp: "2024-09-29T02:38:01.476Z" + usage: + - dayValue: "9439.21" + name: + periodValue: "6958.71" + resourceId: + type: rate + units: + - dayValue: "9892.22" + name: + periodValue: "4749.62" + resourceId: + type: total + units: + - dayValue: "7119.53" + name: + periodValue: "6310.47" + resourceId: + type: rate + units: + successCriteria: + - condition: $statusCode == 201 + x-speakeasy-test-group: marketplace + - workflowId: submit-invoice + steps: + - stepId: test + operationId: submit-invoice + parameters: + - name: integrationConfigurationId + in: path + value: + requestBody: + contentType: application/json + payload: + invoiceDate: "2022-06-05T08:54:16.353Z" + items: + - billingPlanId: + name: + price: "905.89" + quantity: "1684.76" + total: + units: + - billingPlanId: + name: + price: "84.05" + quantity: "9130.94" + total: + units: + period: + end: "2024-10-08T09:35:48.520Z" + start: "2022-07-26T14:15:15.601Z" + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: marketplace + - workflowId: get-invoice + steps: + - stepId: test + operationId: get-invoice + parameters: + - name: integrationConfigurationId + in: path + value: + - name: invoiceId + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "invoiceId": "\u003cid\u003e", + "invoiceDate": "\u003cvalue\u003e", + "period": { + "start": "\u003cvalue\u003e", + "end": "\u003cvalue\u003e" + }, + "items": [ + { + "billingPlanId": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "price": "317.28", + "quantity": "1022.19", + "units": "\u003cvalue\u003e", + "total": "\u003cvalue\u003e" + } + ], + "total": "\u003cvalue\u003e", + "created": "\u003cvalue\u003e", + "updated": "\u003cvalue\u003e", + "state": "scheduled", + "test": false + } + type: simple + x-speakeasy-test-group: marketplace + - workflowId: update-invoice + steps: + - stepId: test + operationId: update-invoice + parameters: + - name: integrationConfigurationId + in: path + value: + - name: invoiceId + in: path + value: + requestBody: + contentType: application/json + payload: + action: refund + reason: + total: + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: marketplace + - workflowId: update-resource-secrets + steps: + - stepId: test + operationId: update-resource-secrets + parameters: + - name: integrationConfigurationId + in: path + value: + - name: integrationProductIdOrSlug + in: path + value: + - name: resourceId + in: path + value: + requestBody: + contentType: application/json + payload: + secrets: [] + successCriteria: + - condition: $statusCode == 201 + x-speakeasy-test-group: marketplace + - workflowId: update-resource-secrets-by-id + steps: + - stepId: test + operationId: update-resource-secrets-by-id + parameters: + - name: integrationConfigurationId + in: path + value: + - name: resourceId + in: path + value: + successCriteria: + - condition: $statusCode == 201 + x-speakeasy-test-group: marketplace + - workflowId: exchange-sso-token + steps: + - stepId: test + operationId: exchange-sso-token + requestBody: + contentType: application/json + payload: + client_id: + client_secret: + code: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id_token": "\u003cvalue\u003e", + "access_token": "\u003cvalue\u003e", + "token_type": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: marketplace + - workflowId: getConfiguration + steps: + - stepId: test + operationId: getConfiguration + parameters: + - name: id + in: path + value: icfg_cuwj0AdCdH3BwWT4LPijCC7t + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "completedAt": 1558531915505, + "createdAt": 1558531915505, + "id": "icfg_3bwCLgxL8qt5kjRLcv2Dit7F", + "integrationId": "oac_xzpVzcUOgcB1nrVlirtKhbWV", + "ownerId": "kr1PsOIzqEL5Xg6M4VZcZosf", + "projects": [ + "prj_xQxbutw1HpL6HLYPAzt5h75m8NjO" + ], + "source": "marketplace", + "slug": "slack", + "teamId": "team_nLlpyC6RE1qxydlFKbrxDlud", + "type": "integration-configuration", + "updatedAt": 1558531915505, + "userId": "kr1PsOIzqEL5Xg6M4VZcZosf", + "scopes": [ + "read:project", + "read-write:log-drain" + ], + "disabledAt": 1558531915505, + "deletedAt": 1558531915505, + "deleteRequestedAt": 1558531915505 + } + type: simple + x-speakeasy-test-group: integrations + - workflowId: deleteConfiguration + steps: + - stepId: test + operationId: deleteConfiguration + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: integrations + - workflowId: gitNamespaces + steps: + - stepId: test + operationId: gitNamespaces + parameters: + - name: host + in: query + value: ghes-test.now.systems + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + [ + { + "provider": "\u003cvalue\u003e", + "slug": "\u003cvalue\u003e", + "id": "8350.19", + "ownerType": "\u003cvalue\u003e" + }, + { + "provider": "\u003cvalue\u003e", + "slug": "\u003cvalue\u003e", + "id": "4647.99", + "ownerType": "\u003cvalue\u003e" + } + ] + type: simple + x-speakeasy-test-group: integrations + - workflowId: searchRepo + steps: + - stepId: test + operationId: searchRepo + parameters: + - name: host + in: query + value: ghes-test.now.systems + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: integrations + - workflowId: listAuthTokens + steps: + - stepId: test + operationId: listAuthTokens + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "tokens": [ + { + "id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + "name": "\u003cvalue\u003e", + "type": "oauth2-token", + "origin": "github", + "expiresAt": 1632816536002, + "activeAt": 1632816536002, + "createdAt": 1632816536002 + }, + { + "id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + "name": "\u003cvalue\u003e", + "type": "oauth2-token", + "origin": "github", + "expiresAt": 1632816536002, + "activeAt": 1632816536002, + "createdAt": 1632816536002 + }, + { + "id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + "name": "\u003cvalue\u003e", + "type": "oauth2-token", + "origin": "github", + "expiresAt": 1632816536002, + "activeAt": 1632816536002, + "createdAt": 1632816536002 + } + ], + "testingToken": { + "id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + "name": "\u003cvalue\u003e", + "type": "oauth2-token", + "origin": "github", + "expiresAt": 1632816536002, + "activeAt": 1632816536002, + "createdAt": 1632816536002 + }, + "pagination": { + "count": 20, + "next": 1540095775951, + "prev": 1540095775951 + } + } + type: simple + x-speakeasy-test-group: authentication + - workflowId: createAuthToken + steps: + - stepId: test + operationId: createAuthToken + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + name: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "token": { + "id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + "name": "\u003cvalue\u003e", + "type": "oauth2-token", + "origin": "github", + "expiresAt": 1632816536002, + "activeAt": 1632816536002, + "createdAt": 1632816536002 + }, + "bearerToken": "uRKJSTt0L4RaSkiMj41QTkxM" + } + type: simple + x-speakeasy-test-group: authentication + - workflowId: getAuthToken + steps: + - stepId: test + operationId: getAuthToken + parameters: + - name: tokenId + in: path + value: 5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "token": { + "id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + "name": "\u003cvalue\u003e", + "type": "oauth2-token", + "origin": "github", + "expiresAt": 1632816536002, + "activeAt": 1632816536002, + "createdAt": 1632816536002 + } + } + type: simple + x-speakeasy-test-group: authentication + - workflowId: deleteAuthToken + steps: + - stepId: test + operationId: deleteAuthToken + parameters: + - name: tokenId + in: path + value: 5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "tokenId": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391" + } + type: simple + x-speakeasy-test-group: authentication + - workflowId: getIntegrationLogDrains + steps: + - stepId: test + operationId: getIntegrationLogDrains + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + [] + type: simple + x-speakeasy-test-group: logDrains + - workflowId: createLogDrain + steps: + - stepId: test + operationId: createLogDrain + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + deliveryFormat: json + name: My first log drain + secret: a1Xsfd325fXcs + url: https://example.com/log-drain + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "clientId": "oac_xRhY4LAB7yLhUADD69EvV7ct", + "configurationId": "icfg_cuwj0AdCdH3BwWT4LPijCC7t", + "createdAt": 1558531915505, + "id": "ld_nBuA7zCID8g4QZ8g", + "deliveryFormat": "json", + "name": "My first log drain", + "ownerId": "kr1PsOIzqEL5Xg6M4VZcZosf", + "projectId": "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb", + "projectIds": [ + "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb" + ], + "url": "https://example.com/log-drain", + "sources": [ + "external" + ], + "createdFrom": "integration", + "headers": { + "0": "{", + "1": "\"", + "2": "A", + "3": "u", + "4": "t", + "5": "h", + "6": "o", + "7": "r", + "8": "i", + "9": "z", + "10": "a", + "11": "t", + "12": "i", + "13": "o", + "14": "n", + "15": "\"", + "16": ":", + "17": " ", + "18": "\"", + "19": "B", + "20": "e", + "21": "a", + "22": "r", + "23": "e", + "24": "r", + "25": " ", + "26": "1", + "27": "2", + "28": "3", + "29": "\"", + "30": "}" + }, + "environments": [ + "production" + ], + "branch": "feature/*", + "samplingRate": 0.5 + } + type: simple + x-speakeasy-test-group: logDrains + - workflowId: deleteIntegrationLogDrain + steps: + - stepId: test + operationId: deleteIntegrationLogDrain + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: logDrains + - workflowId: getConfigurableLogDrain + steps: + - stepId: test + operationId: getConfigurableLogDrain + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "deliveryFormat": "json", + "url": "https://pleasant-beret.com/", + "name": "\u003cvalue\u003e", + "ownerId": "\u003cid\u003e", + "createdAt": "9979.70", + "deletedAt": "2589.89", + "updatedAt": "1929.64", + "environments": [ + "production", + "production" + ], + "secret": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: logDrains + - workflowId: deleteConfigurableLogDrain + steps: + - stepId: test + operationId: deleteConfigurableLogDrain + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: logDrains + - workflowId: getAllLogDrains + steps: + - stepId: test + operationId: getAllLogDrains + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + [ + { + "id": "\u003cid\u003e", + "deliveryFormat": "json", + "url": "https://perfumed-director.net/", + "name": "\u003cvalue\u003e", + "ownerId": "\u003cid\u003e", + "createdAt": "5878.41", + "deletedAt": "1366.34", + "updatedAt": "8559.11", + "environments": [ + "production" + ] + } + ] + type: simple + x-speakeasy-test-group: logDrains + - workflowId: createConfigurableLogDrain + steps: + - stepId: test + operationId: createConfigurableLogDrain + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + deliveryFormat: json + sources: + - external + url: https://sugary-technician.name + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "deliveryFormat": "json", + "url": "https://close-dividend.biz", + "name": "\u003cvalue\u003e", + "ownerId": "\u003cid\u003e", + "createdAt": "911.21", + "deletedAt": "5254.68", + "updatedAt": "3248.86", + "environments": [ + "preview", + "production" + ] + } + type: simple + x-speakeasy-test-group: logDrains + - workflowId: addProjectMember + steps: + - stepId: test + operationId: addProjectMember + parameters: + - name: idOrName + in: path + value: prj_pavWOn1iLObbXLRiwVvzmPrTWyTf + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + email: entity@example.com + role: ADMIN + uid: ndlgr43fadlPyCtREAqxxdyFK + username: example + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e" + } + type: simple + x-speakeasy-test-group: projectMembers + - workflowId: removeProjectMember + steps: + - stepId: test + operationId: removeProjectMember + parameters: + - name: idOrName + in: path + value: prj_pavWOn1iLObbXLRiwVvzmPrTWyTf + - name: uid + in: path + value: ndlgr43fadlPyCtREAqxxdyFK + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e" + } + type: simple + x-speakeasy-test-group: projectMembers + - workflowId: post_/v1/projects/{idOrName}/custom-environments + steps: + - stepId: test + operationId: post_/v1/projects/{idOrName}/custom-environments + parameters: + - name: idOrName + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: environment + - workflowId: get_/v9/projects/{idOrName}/custom-environments + steps: + - stepId: test + operationId: get_/v9/projects/{idOrName}/custom-environments + parameters: + - name: idOrName + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "environments": [] + } + type: simple + x-speakeasy-test-group: environment + - workflowId: get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} + steps: + - stepId: test + operationId: get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} + parameters: + - name: idOrName + in: path + value: + - name: environmentSlugOrId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: environment + - workflowId: patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} + steps: + - stepId: test + operationId: patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} + parameters: + - name: idOrName + in: path + value: + - name: environmentSlugOrId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: environment + - workflowId: delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} + steps: + - stepId: test + operationId: delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId} + parameters: + - name: idOrName + in: path + value: + - name: environmentSlugOrId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: environment + - workflowId: updateAttackChallengeMode + steps: + - stepId: test + operationId: updateAttackChallengeMode + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + attackModeEnabled: true + projectId: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "attackModeEnabled": true, + "attackModeUpdatedAt": "4536.22" + } + type: simple + x-speakeasy-test-group: security + - workflowId: putFirewallConfig + steps: + - stepId: test + operationId: putFirewallConfig + parameters: + - name: projectId + in: query + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + firewallEnabled: true + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "active": { + "ownerId": "\u003cid\u003e", + "projectKey": "\u003cvalue\u003e", + "id": "\u003cid\u003e", + "version": "4570.86", + "updatedAt": "\u003cvalue\u003e", + "firewallEnabled": true, + "crs": { + "sd": { + "active": false, + "action": "deny" + }, + "ma": { + "active": false, + "action": "log" + }, + "lfi": { + "active": false, + "action": "log" + }, + "rfi": { + "active": false, + "action": "deny" + }, + "rce": { + "active": false, + "action": "deny" + }, + "php": { + "active": true, + "action": "deny" + }, + "gen": { + "active": false, + "action": "deny" + }, + "xss": { + "active": false, + "action": "deny" + }, + "sqli": { + "active": true, + "action": "log" + }, + "sf": { + "active": true, + "action": "deny" + }, + "java": { + "active": true, + "action": "log" + } + }, + "rules": [ + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "active": true, + "conditionGroup": [ + { + "conditions": [ + { + "type": "ip_address", + "op": "suf" + }, + { + "type": "geo_as_number", + "op": "pre" + }, + { + "type": "ja3_digest", + "op": "inc" + } + ] + }, + { + "conditions": [ + { + "type": "geo_as_number", + "op": "neq" + }, + { + "type": "protocol", + "op": "sub" + }, + { + "type": "ja3_digest", + "op": "suf" + } + ] + }, + { + "conditions": [ + { + "type": "region", + "op": "neq" + } + ] + } + ], + "action": {} + }, + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "active": false, + "conditionGroup": [], + "action": {} + }, + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "active": false, + "conditionGroup": [ + { + "conditions": [ + { + "type": "scheme", + "op": "neq" + } + ] + }, + { + "conditions": [] + }, + { + "conditions": [ + { + "type": "header", + "op": "inc" + }, + { + "type": "query", + "op": "eq" + } + ] + } + ], + "action": {} + } + ], + "ips": [], + "changes": [] + } + } + type: simple + x-speakeasy-test-group: security + - workflowId: updateFirewallConfig + steps: + - stepId: test + operationId: updateFirewallConfig + parameters: + - name: projectId + in: query + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + action: ip.remove + id: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: security + - workflowId: getFirewallConfig + steps: + - stepId: test + operationId: getFirewallConfig + parameters: + - name: configVersion + in: path + value: + - name: projectId + in: query + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "ownerId": "\u003cid\u003e", + "projectKey": "\u003cvalue\u003e", + "id": "\u003cid\u003e", + "version": "228.91", + "updatedAt": "\u003cvalue\u003e", + "firewallEnabled": true, + "crs": { + "sd": { + "active": false, + "action": "deny" + }, + "ma": { + "active": true, + "action": "log" + }, + "lfi": { + "active": false, + "action": "log" + }, + "rfi": { + "active": false, + "action": "deny" + }, + "rce": { + "active": true, + "action": "deny" + }, + "php": { + "active": false, + "action": "log" + }, + "gen": { + "active": false, + "action": "log" + }, + "xss": { + "active": true, + "action": "deny" + }, + "sqli": { + "active": true, + "action": "deny" + }, + "sf": { + "active": true, + "action": "deny" + }, + "java": { + "active": true, + "action": "deny" + } + }, + "rules": [ + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e", + "active": true, + "conditionGroup": [ + { + "conditions": [ + { + "type": "ip_address", + "op": "eq" + } + ] + }, + { + "conditions": [ + { + "type": "geo_city", + "op": "ex" + }, + { + "type": "ja4_digest", + "op": "nex" + }, + { + "type": "ip_address", + "op": "lte" + } + ] + } + ], + "action": {} + } + ], + "ips": [ + { + "id": "\u003cid\u003e", + "hostname": "puny-goat.org", + "ip": "0.147.40.42", + "action": "challenge" + } + ], + "changes": [] + } + type: simple + x-speakeasy-test-group: security + - workflowId: getBypassIp + steps: + - stepId: test + operationId: getBypassIp + parameters: + - name: projectId + in: query + value: + - name: limit + in: query + value: 10 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "result": [ + { + "OwnerId": "\u003cid\u003e", + "Id": "\u003cid\u003e", + "Domain": "sneaky-intervention.info", + "Ip": "124.153.161.35", + "ProjectId": "\u003cid\u003e", + "IsProjectRule": false + } + ], + "pagination": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: security + - workflowId: addBypassIp + steps: + - stepId: test + operationId: addBypassIp + parameters: + - name: projectId + in: query + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "ok": false, + "result": [ + { + "OwnerId": "\u003cid\u003e", + "Id": "\u003cid\u003e", + "Domain": "jubilant-outrun.name", + "ProjectId": "\u003cid\u003e", + "IsProjectRule": true + } + ], + "pagination": "\u003cvalue\u003e" + } + type: simple + x-speakeasy-test-group: security + - workflowId: removeBypassIp + steps: + - stepId: test + operationId: removeBypassIp + parameters: + - name: projectId + in: query + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "ok": true + } + type: simple + x-speakeasy-test-group: security + - workflowId: getTeamMembers + steps: + - stepId: test + operationId: getTeamMembers + parameters: + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: limit + in: query + value: 20 + - name: since + in: query + value: 1540095775951 + - name: until + in: query + value: 1540095775951 + - name: role + in: query + value: OWNER + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "members": [ + { + "avatar": "123a6c5209bc3778245d011443644c8d27dc2c50", + "confirmed": true, + "email": "jane.doe@example.com", + "role": "OWNER", + "uid": "zTuNVUXEAvvnNN3IaqinkyMw", + "username": "jane-doe", + "name": "Jane Doe", + "createdAt": 1588720733602, + "accessRequestedAt": 1588820733602 + }, + { + "avatar": "123a6c5209bc3778245d011443644c8d27dc2c50", + "confirmed": true, + "email": "jane.doe@example.com", + "role": "OWNER", + "uid": "zTuNVUXEAvvnNN3IaqinkyMw", + "username": "jane-doe", + "name": "Jane Doe", + "createdAt": 1588720733602, + "accessRequestedAt": 1588820733602 + } + ], + "pagination": { + "hasNext": true, + "count": 20, + "next": 1540095775951, + "prev": 1540095775951 + } + } + type: simple + x-speakeasy-test-group: teams + - workflowId: requestAccessToTeam + steps: + - stepId: test + operationId: requestAccessToTeam + parameters: + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + requestBody: + contentType: application/json + payload: + joinedFrom: + commitId: f498d25d8bd654b578716203be73084b31130cd7 + gitUserId: 103053343 + gitUserLogin: jane-doe + origin: github + repoId: "67753070" + repoPath: jane-doe/example + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamSlug": "\u003cvalue\u003e", + "teamName": "\u003cvalue\u003e", + "github": {}, + "gitlab": {}, + "bitbucket": {} + } + type: simple + x-speakeasy-test-group: teams + - workflowId: getTeamAccessRequest + steps: + - stepId: test + operationId: getTeamAccessRequest + parameters: + - name: userId + in: path + value: + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamSlug": "my-team", + "teamName": "My Team", + "confirmed": false, + "joinedFrom": { + "origin": "import" + }, + "accessRequestedAt": 1588720733602, + "github": {}, + "gitlab": {}, + "bitbucket": {} + } + type: simple + x-speakeasy-test-group: teams + - workflowId: joinTeam + steps: + - stepId: test + operationId: joinTeam + parameters: + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + requestBody: + contentType: application/json + payload: + inviteCode: fisdh38aejkeivn34nslfore9vjtn4ls + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teamId": "team_LLHUOMOoDlqOp8wPE4kFo9pE", + "slug": "my-team", + "name": "My Team", + "from": "email" + } + type: simple + x-speakeasy-test-group: teams + - workflowId: updateTeamMember + steps: + - stepId: test + operationId: updateTeamMember + parameters: + - name: uid + in: path + value: ndfasllgPyCtREAqxxdyFKb + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + requestBody: + contentType: application/json + payload: + confirmed: true + projects: + - projectId: prj_ndlgr43fadlPyCtREAqxxdyFK + role: ADMIN + role: '["MEMBER","VIEWER"]' + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e" + } + type: simple + x-speakeasy-test-group: teams + - workflowId: removeTeamMember + steps: + - stepId: test + operationId: removeTeamMember + parameters: + - name: uid + in: path + value: ndlgr43fadlPyCtREAqxxdyFK + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: newDefaultTeamId + in: query + value: team_nllPyCtREAqxxdyFKbbMDlxd + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e" + } + type: simple + x-speakeasy-test-group: teams + - workflowId: getTeam + steps: + - stepId: test + operationId: getTeam + parameters: + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: teams + - workflowId: patchTeam + steps: + - stepId: test + operationId: patchTeam + parameters: + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + description: Our mission is to make cloud computing accessible to everyone + emailDomain: example.com + enablePreviewFeedback: "on" + enableProductionFeedback: "on" + hideIpAddresses: false + hideIpAddressesInLogDrains: false + name: My Team + previewDeploymentSuffix: example.dev + regenerateInviteCode: true + remoteCaching: + enabled: true + saml: + enforced: true + sensitiveEnvironmentVariablePolicy: "on" + slug: my-team + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: teams + - workflowId: getTeams + steps: + - stepId: test + operationId: getTeams + parameters: + - name: limit + in: query + value: 20 + - name: since + in: query + value: 1540095775951 + - name: until + in: query + value: 1540095775951 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "teams": [ + {}, + {} + ], + "pagination": { + "count": 20, + "next": 1540095775951, + "prev": 1540095775951 + } + } + type: simple + x-speakeasy-test-group: teams + - workflowId: createTeam + steps: + - stepId: test + operationId: createTeam + requestBody: + contentType: application/json + payload: + name: A Random Team + slug: a-random-team + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "team_nLlpyC6RE1qxqglFKbrMxlud", + "slug": "\u003cvalue\u003e", + "billing": {} + } + type: simple + x-speakeasy-test-group: teams + - workflowId: deleteTeam + steps: + - stepId: test + operationId: deleteTeam + parameters: + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: newDefaultTeamId + in: query + value: team_LLHUOMOoDlqOp8wPE4kFo9pE + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: {} + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "team_LLHUOMOoDlqOp8wPE4kFo9pE", + "newDefaultTeamIdError": true + } + type: simple + x-speakeasy-test-group: teams + - workflowId: deleteTeamInviteCode + steps: + - stepId: test + operationId: deleteTeamInviteCode + parameters: + - name: inviteId + in: path + value: 2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l + - name: teamId + in: path + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e" + } + type: simple + x-speakeasy-test-group: teams + - workflowId: createWebhook + steps: + - stepId: test + operationId: createWebhook + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + events: [] + url: https://woeful-yin.biz + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "secret": "\u003cvalue\u003e", + "events": [ + "deployment.created" + ], + "id": "account_hook_GflD6EYyo7F4ViYS", + "url": "https://my-webhook.com", + "ownerId": "ZspSRT4ljIEEmMHgoDwKWDei", + "createdAt": 1567024758130, + "updatedAt": 1567024758130, + "projectIds": [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB" + ] + } + type: simple + x-speakeasy-test-group: webhooks + - workflowId: getWebhooks + steps: + - stepId: test + operationId: getWebhooks + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + [ + { + "projectsMetadata": [ + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e" + }, + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e" + }, + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e" + } + ], + "events": [ + "deployment.created" + ], + "id": "account_hook_GflD6EYyo7F4ViYS", + "url": "https://my-webhook.com", + "ownerId": "ZspSRT4ljIEEmMHgoDwKWDei", + "createdAt": 1567024758130, + "updatedAt": 1567024758130, + "projectIds": [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB" + ] + }, + { + "projectsMetadata": [ + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e" + } + ], + "events": [ + "deployment.created" + ], + "id": "account_hook_GflD6EYyo7F4ViYS", + "url": "https://my-webhook.com", + "ownerId": "ZspSRT4ljIEEmMHgoDwKWDei", + "createdAt": 1567024758130, + "updatedAt": 1567024758130, + "projectIds": [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB" + ] + }, + { + "projectsMetadata": [ + { + "id": "\u003cid\u003e", + "name": "\u003cvalue\u003e" + } + ], + "events": [ + "deployment.created" + ], + "id": "account_hook_GflD6EYyo7F4ViYS", + "url": "https://my-webhook.com", + "ownerId": "ZspSRT4ljIEEmMHgoDwKWDei", + "createdAt": 1567024758130, + "updatedAt": 1567024758130, + "projectIds": [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB" + ] + } + ] + type: simple + x-speakeasy-test-group: webhooks + - workflowId: getWebhook + steps: + - stepId: test + operationId: getWebhook + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "events": [ + "deployment.created" + ], + "id": "account_hook_GflD6EYyo7F4ViYS", + "url": "https://my-webhook.com", + "ownerId": "ZspSRT4ljIEEmMHgoDwKWDei", + "createdAt": 1567024758130, + "updatedAt": 1567024758130, + "projectIds": [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB" + ] + } + type: simple + x-speakeasy-test-group: webhooks + - workflowId: deleteWebhook + steps: + - stepId: test + operationId: deleteWebhook + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 204 + x-speakeasy-test-group: webhooks + - workflowId: listAliases + steps: + - stepId: test + operationId: listAliases + parameters: + - name: domain + in: query + value: my-test-domain.com + - name: from + in: query + value: 1540095775951 + - name: limit + in: query + value: 10 + - name: projectId + in: query + value: prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - name: since + in: query + value: 1540095775941 + - name: until + in: query + value: 1540095775951 + - name: rollbackDeploymentId + in: query + value: dpl_XXX + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "aliases": [], + "pagination": { + "count": 20, + "next": 1540095775951, + "prev": 1540095775951 + } + } + type: simple + x-speakeasy-test-group: aliases + - workflowId: getAlias + steps: + - stepId: test + operationId: getAlias + parameters: + - name: idOrAlias + in: path + value: example.vercel.app + - name: from + in: query + value: 1540095775951 + - name: projectId + in: query + value: prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB + - name: since + in: query + value: 1540095775941 + - name: until + in: query + value: 1540095775951 + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "alias": "my-alias.vercel.app", + "created": "2017-04-26T23:00:34.232Z", + "createdAt": 1540095775941, + "creator": { + "uid": "96SnxkFiMyVKsK3pnoHfx3Hz", + "email": "john-doe@gmail.com", + "username": "john-doe" + }, + "deletedAt": 1540095775941, + "deployment": { + "id": "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx", + "url": "my-instant-deployment-3ij3cxz9qr.now.sh", + "meta": "{}" + }, + "deploymentId": "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx", + "projectId": "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + "uid": "\u003cid\u003e", + "updatedAt": 1540095775941 + } + type: simple + x-speakeasy-test-group: aliases + - workflowId: deleteAlias + steps: + - stepId: test + operationId: deleteAlias + parameters: + - name: aliasId + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "status": "SUCCESS" + } + type: simple + x-speakeasy-test-group: aliases + - workflowId: listDeploymentAliases + steps: + - stepId: test + operationId: listDeploymentAliases + parameters: + - name: id + in: path + value: dpl_FjvFJncQHQcZMznrUm9EoB8sFuPa + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "aliases": [] + } + type: simple + x-speakeasy-test-group: aliases + - workflowId: assignAlias + steps: + - stepId: test + operationId: assignAlias + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + alias: my-alias.vercel.app + redirect: null + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "uid": "2WjyKQmM8ZnGcJsPWMrHRHrE", + "alias": "my-alias.vercel.app", + "created": "2017-04-26T23:00:34.232Z", + "oldDeploymentId": "dpl_FjvFJncQHQcZMznrUm9EoB8sFuPa" + } + type: simple + x-speakeasy-test-group: aliases + - workflowId: getCertById + steps: + - stepId: test + operationId: getCertById + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "createdAt": "227.13", + "expiresAt": "3995.77", + "autoRenew": false, + "cns": [ + "\u003cvalue\u003e" + ] + } + type: simple + x-speakeasy-test-group: certs + - workflowId: removeCert + steps: + - stepId: test + operationId: removeCert + parameters: + - name: id + in: path + value: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {} + type: simple + x-speakeasy-test-group: certs + - workflowId: issueCert + steps: + - stepId: test + operationId: issueCert + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: {} + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "createdAt": "1842.08", + "expiresAt": "8685.41", + "autoRenew": true, + "cns": [] + } + type: simple + x-speakeasy-test-group: certs + - workflowId: uploadCert + steps: + - stepId: test + operationId: uploadCert + parameters: + - name: teamId + in: query + value: team_1a2b3c4d5e6f7g8h9i0j1k2l + - name: slug + in: query + value: my-team-url-slug + requestBody: + contentType: application/json + payload: + ca: + cert: + key: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "id": "\u003cid\u003e", + "createdAt": "9219.92", + "expiresAt": "5530.55", + "autoRenew": true, + "cns": [ + "\u003cvalue\u003e", + "\u003cvalue\u003e" + ] + } + type: simple + x-speakeasy-test-group: certs diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index fbc349fa..b093684b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.463.1 +speakeasyVersion: 1.468.9 sources: vercel-OAS: sourceNamespace: vercel-oas - sourceRevisionDigest: sha256:97cbbce568f6b86d68c6fd972b584dd0ec7e1bbed47d7ebf2bed95aa7ae06d5b - sourceBlobDigest: sha256:90ecea7dfccdc0744d8c11d16c531a9e8a8e37506f566a9f76f743994271ec20 + sourceRevisionDigest: sha256:b1ecf899bc6cff72ea74ea064a0b814d710d7ff80a108d704b742bb9a2708510 + sourceBlobDigest: sha256:c61c89a9d086211005600c757a3ff13d67dada7d5a37cb477654683c11be03f7 tags: - latest - - speakeasy-sdk-regen-1736200310 + - speakeasy-sdk-regen-1737064716 - 0.0.1 targets: vercel: source: vercel-OAS sourceNamespace: vercel-oas - sourceRevisionDigest: sha256:97cbbce568f6b86d68c6fd972b584dd0ec7e1bbed47d7ebf2bed95aa7ae06d5b - sourceBlobDigest: sha256:90ecea7dfccdc0744d8c11d16c531a9e8a8e37506f566a9f76f743994271ec20 + sourceRevisionDigest: sha256:b1ecf899bc6cff72ea74ea064a0b814d710d7ff80a108d704b742bb9a2708510 + sourceBlobDigest: sha256:c61c89a9d086211005600c757a3ff13d67dada7d5a37cb477654683c11be03f7 codeSamplesNamespace: vercel-oas-typescript-code-samples - codeSamplesRevisionDigest: sha256:21a1dd643d957187fe51196844c5714a6b5ff12d1eac1fc36703af94c34c0075 + codeSamplesRevisionDigest: sha256:edfc4e8aaddfbbc37fd302f67a39491f591cba2a04c8e6a7a604b372b8980380 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -25,6 +25,7 @@ workflow: - location: https://openapi.vercel.sh/ overlays: - location: overlay.yaml + - location: tests-overlay.yaml output: vercel-spec.json ruleset: vercelRestAPIRuleset registry: @@ -40,3 +41,5 @@ workflow: registry: location: registry.speakeasyapi.dev/vercel/vercel-docs/vercel-oas-typescript-code-samples blocking: false + testing: + enabled: true diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 7423091a..458cf0f5 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -15,8 +15,6 @@ targets: vercel: target: typescript source: vercel-OAS - testing: - enabled: true publish: npm: token: $npm_token @@ -24,3 +22,5 @@ targets: registry: location: registry.speakeasyapi.dev/vercel/vercel-docs/vercel-oas-typescript-code-samples blocking: false + testing: + enabled: true diff --git a/README.md b/README.md index d1357e36..42d77efd 100644 --- a/README.md +++ b/README.md @@ -309,6 +309,14 @@ run(); * [getEdgeConfigBackup](docs/sdks/edgeconfig/README.md#getedgeconfigbackup) - Get Edge Config backup * [getEdgeConfigBackups](docs/sdks/edgeconfig/README.md#getedgeconfigbackups) - Get Edge Config backups +### [environment](docs/sdks/environment/README.md) + +* [postV1ProjectsIdOrNameCustomEnvironments](docs/sdks/environment/README.md#postv1projectsidornamecustomenvironments) - Create a custom environment for the current project. +* [getV9ProjectsIdOrNameCustomEnvironments](docs/sdks/environment/README.md#getv9projectsidornamecustomenvironments) - Retrieve custom environments +* [getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId](docs/sdks/environment/README.md#getv9projectsidornamecustomenvironmentsenvironmentslugorid) - Retrieve a custom environment +* [patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId](docs/sdks/environment/README.md#patchv9projectsidornamecustomenvironmentsenvironmentslugorid) - Update a custom environment +* [deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId](docs/sdks/environment/README.md#deletev9projectsidornamecustomenvironmentsenvironmentslugorid) - Remove a custom environment + ### [integrations](docs/sdks/integrations/README.md) * [getConfigurations](docs/sdks/integrations/README.md#getconfigurations) - Get configurations for the authenticated user or team @@ -336,7 +344,8 @@ run(); * [submitInvoice](docs/sdks/marketplace/README.md#submitinvoice) - Submit Invoice * [getInvoice](docs/sdks/marketplace/README.md#getinvoice) - Get Invoice * [updateInvoice](docs/sdks/marketplace/README.md#updateinvoice) - Invoice Actions -* [updateResourceSecrets](docs/sdks/marketplace/README.md#updateresourcesecrets) - Update Resource Secrets +* [updateResourceSecrets](docs/sdks/marketplace/README.md#updateresourcesecrets) - Update Resource Secrets (Deprecated) +* [updateResourceSecretsById](docs/sdks/marketplace/README.md#updateresourcesecretsbyid) - Update Resource Secrets * [exchangeSsoToken](docs/sdks/marketplace/README.md#exchangessotoken) - SSO Token Exchange ### [projectMembers](docs/sdks/projectmembers/README.md) @@ -373,6 +382,9 @@ run(); * [putFirewallConfig](docs/sdks/security/README.md#putfirewallconfig) - Put Firewall Configuration * [updateFirewallConfig](docs/sdks/security/README.md#updatefirewallconfig) - Update Firewall Configuration * [getFirewallConfig](docs/sdks/security/README.md#getfirewallconfig) - Read Firewall Configuration +* [getBypassIp](docs/sdks/security/README.md#getbypassip) - Read System Bypass +* [addBypassIp](docs/sdks/security/README.md#addbypassip) - Create System Bypass Rule +* [removeBypassIp](docs/sdks/security/README.md#removebypassip) - Remove System Bypass Rule ### [teams](docs/sdks/teams/README.md) @@ -497,6 +509,11 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`edgeConfigGetEdgeConfigTokens`](docs/sdks/edgeconfig/README.md#getedgeconfigtokens) - Get all tokens of an Edge Config - [`edgeConfigPatchEdgeConfigSchema`](docs/sdks/edgeconfig/README.md#patchedgeconfigschema) - Update Edge Config schema - [`edgeConfigUpdateEdgeConfig`](docs/sdks/edgeconfig/README.md#updateedgeconfig) - Update an Edge Config +- [`environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId`](docs/sdks/environment/README.md#deletev9projectsidornamecustomenvironmentsenvironmentslugorid) - Remove a custom environment +- [`environmentGetV9ProjectsIdOrNameCustomEnvironments`](docs/sdks/environment/README.md#getv9projectsidornamecustomenvironments) - Retrieve custom environments +- [`environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId`](docs/sdks/environment/README.md#getv9projectsidornamecustomenvironmentsenvironmentslugorid) - Retrieve a custom environment +- [`environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId`](docs/sdks/environment/README.md#patchv9projectsidornamecustomenvironmentsenvironmentslugorid) - Update a custom environment +- [`environmentPostV1ProjectsIdOrNameCustomEnvironments`](docs/sdks/environment/README.md#postv1projectsidornamecustomenvironments) - Create a custom environment for the current project. - [`integrationsDeleteConfiguration`](docs/sdks/integrations/README.md#deleteconfiguration) - Delete an integration configuration - [`integrationsGetConfiguration`](docs/sdks/integrations/README.md#getconfiguration) - Retrieve an integration configuration - [`integrationsGetConfigurations`](docs/sdks/integrations/README.md#getconfigurations) - Get configurations for the authenticated user or team @@ -517,7 +534,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`marketplaceSubmitBillingData`](docs/sdks/marketplace/README.md#submitbillingdata) - Submit Billing Data - [`marketplaceSubmitInvoice`](docs/sdks/marketplace/README.md#submitinvoice) - Submit Invoice - [`marketplaceUpdateInvoice`](docs/sdks/marketplace/README.md#updateinvoice) - Invoice Actions -- [`marketplaceUpdateResourceSecrets`](docs/sdks/marketplace/README.md#updateresourcesecrets) - Update Resource Secrets +- [`marketplaceUpdateResourceSecrets`](docs/sdks/marketplace/README.md#updateresourcesecrets) - Update Resource Secrets (Deprecated) +- [`marketplaceUpdateResourceSecretsById`](docs/sdks/marketplace/README.md#updateresourcesecretsbyid) - Update Resource Secrets - [`projectMembersAddProjectMember`](docs/sdks/projectmembers/README.md#addprojectmember) - Adds a new member to a project. - [`projectMembersGetProjectMembers`](docs/sdks/projectmembers/README.md#getprojectmembers) - List project members - [`projectMembersRemoveProjectMember`](docs/sdks/projectmembers/README.md#removeprojectmember) - Remove a Project Member @@ -540,8 +558,11 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`projectsUpdateProjectDomain`](docs/sdks/projects/README.md#updateprojectdomain) - Update a project domain - [`projectsUpdateProjectProtectionBypass`](docs/sdks/projects/README.md#updateprojectprotectionbypass) - Update Protection Bypass for Automation - [`projectsVerifyProjectDomain`](docs/sdks/projects/README.md#verifyprojectdomain) - Verify project domain +- [`securityAddBypassIp`](docs/sdks/security/README.md#addbypassip) - Create System Bypass Rule +- [`securityGetBypassIp`](docs/sdks/security/README.md#getbypassip) - Read System Bypass - [`securityGetFirewallConfig`](docs/sdks/security/README.md#getfirewallconfig) - Read Firewall Configuration - [`securityPutFirewallConfig`](docs/sdks/security/README.md#putfirewallconfig) - Put Firewall Configuration +- [`securityRemoveBypassIp`](docs/sdks/security/README.md#removebypassip) - Remove System Bypass Rule - [`securityUpdateAttackChallengeMode`](docs/sdks/security/README.md#updateattackchallengemode) - Update Attack Challenge mode - [`securityUpdateFirewallConfig`](docs/sdks/security/README.md#updatefirewallconfig) - Update Firewall Configuration - [`teamsCreateTeam`](docs/sdks/teams/README.md#createteam) - Create a Team diff --git a/RELEASES.md b/RELEASES.md index 7558805b..70bbe5dd 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -118,4 +118,14 @@ Based on: ### Generated - [typescript v1.2.2] . ### Releases -- [NPM v1.2.2] https://www.npmjs.com/package/@vercel/sdk/v/1.2.2 - . \ No newline at end of file +- [NPM v1.2.2] https://www.npmjs.com/package/@vercel/sdk/v/1.2.2 - . + +## 2025-01-16 21:58:18 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.468.9 (2.493.21) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.3.0] . +### Releases +- [NPM v1.3.0] https://www.npmjs.com/package/@vercel/sdk/v/1.3.0 - . \ No newline at end of file diff --git a/docs/models/aclaction.md b/docs/models/aclaction.md index 8b06a127..fec991c8 100644 --- a/docs/models/aclaction.md +++ b/docs/models/aclaction.md @@ -7,7 +7,7 @@ Enum containing the actions that can be performed against a resource. Group oper ```typescript import { ACLAction } from "@vercel/sdk/models/aclaction.js"; -let value: ACLAction = "update"; +let value: ACLAction = "read"; ``` ## Values diff --git a/docs/models/active.md b/docs/models/active.md index fdfe3204..f9ffadb8 100644 --- a/docs/models/active.md +++ b/docs/models/active.md @@ -9,8 +9,8 @@ let value: Active = { ownerId: "", projectKey: "", id: "", - version: 1902.61, - updatedAt: "1736204728913", + version: 3371.49, + updatedAt: "1736994841682", firewallEnabled: false, crs: { sd: { @@ -23,7 +23,7 @@ let value: Active = { }, lfi: { active: false, - action: "deny", + action: "log", }, rfi: { active: false, @@ -31,11 +31,11 @@ let value: Active = { }, rce: { active: false, - action: "log", + action: "deny", }, php: { active: false, - action: "deny", + action: "log", }, gen: { active: false, @@ -43,7 +43,7 @@ let value: Active = { }, xss: { active: false, - action: "log", + action: "deny", }, sqli: { active: false, @@ -67,8 +67,8 @@ let value: Active = { { conditions: [ { - type: "header", - op: "inc", + type: "ja3_digest", + op: "eq", }, ], }, @@ -79,9 +79,9 @@ let value: Active = { ips: [ { id: "", - hostname: "intent-cd.com", - ip: "123.64.224.83", - action: "bypass", + hostname: "far-off-hope.com", + ip: "57.123.64.224", + action: "log", }, ], changes: [ diff --git a/docs/models/addbypassiprequest.md b/docs/models/addbypassiprequest.md new file mode 100644 index 00000000..e30bd6de --- /dev/null +++ b/docs/models/addbypassiprequest.md @@ -0,0 +1,22 @@ +# AddBypassIpRequest + +## Example Usage + +```typescript +import { AddBypassIpRequest } from "@vercel/sdk/models/addbypassipop.js"; + +let value: AddBypassIpRequest = { + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `projectId` | *string* | :heavy_check_mark: | N/A | | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | +| `requestBody` | *models.AddBypassIpRequestBody* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/addbypassiprequestbody.md b/docs/models/addbypassiprequestbody.md new file mode 100644 index 00000000..27fed4a0 --- /dev/null +++ b/docs/models/addbypassiprequestbody.md @@ -0,0 +1,21 @@ +# AddBypassIpRequestBody + + +## Supported Types + +### `models.AddBypassIpRequestBody1` + +```typescript +const value: models.AddBypassIpRequestBody1 = { + domain: "concerned-bookend.com", +}; +``` + +### `models.AddBypassIpRequestBody2` + +```typescript +const value: models.AddBypassIpRequestBody2 = { + projectScope: false, +}; +``` + diff --git a/docs/models/addbypassiprequestbody1.md b/docs/models/addbypassiprequestbody1.md new file mode 100644 index 00000000..5850c2ce --- /dev/null +++ b/docs/models/addbypassiprequestbody1.md @@ -0,0 +1,21 @@ +# AddBypassIpRequestBody1 + +## Example Usage + +```typescript +import { AddBypassIpRequestBody1 } from "@vercel/sdk/models/addbypassipop.js"; + +let value: AddBypassIpRequestBody1 = { + domain: "leading-hovercraft.org", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `projectScope` | *boolean* | :heavy_minus_sign: | N/A | +| `sourceIp` | *string* | :heavy_minus_sign: | N/A | +| `allSources` | *boolean* | :heavy_minus_sign: | N/A | +| `note` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/addbypassiprequestbody2.md b/docs/models/addbypassiprequestbody2.md new file mode 100644 index 00000000..e6be94e1 --- /dev/null +++ b/docs/models/addbypassiprequestbody2.md @@ -0,0 +1,21 @@ +# AddBypassIpRequestBody2 + +## Example Usage + +```typescript +import { AddBypassIpRequestBody2 } from "@vercel/sdk/models/addbypassipop.js"; + +let value: AddBypassIpRequestBody2 = { + projectScope: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `domain` | *string* | :heavy_minus_sign: | N/A | +| `projectScope` | *boolean* | :heavy_check_mark: | N/A | +| `sourceIp` | *string* | :heavy_minus_sign: | N/A | +| `allSources` | *boolean* | :heavy_minus_sign: | N/A | +| `note` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/addbypassipresponsebody.md b/docs/models/addbypassipresponsebody.md new file mode 100644 index 00000000..64011886 --- /dev/null +++ b/docs/models/addbypassipresponsebody.md @@ -0,0 +1,31 @@ +# AddBypassIpResponseBody + + +## Supported Types + +### `models.AddBypassIpResponseBody1` + +```typescript +const value: models.AddBypassIpResponseBody1 = { + ok: false, + result: [ + { + ownerId: "", + id: "", + domain: "descriptive-waterspout.org", + projectId: "", + isProjectRule: false, + }, + ], + pagination: "", +}; +``` + +### `models.AddBypassIpResponseBody2` + +```typescript +const value: models.AddBypassIpResponseBody2 = { + ok: false, +}; +``` + diff --git a/docs/models/addbypassipresponsebody1.md b/docs/models/addbypassipresponsebody1.md new file mode 100644 index 00000000..72168e09 --- /dev/null +++ b/docs/models/addbypassipresponsebody1.md @@ -0,0 +1,29 @@ +# AddBypassIpResponseBody1 + +## Example Usage + +```typescript +import { AddBypassIpResponseBody1 } from "@vercel/sdk/models/addbypassipop.js"; + +let value: AddBypassIpResponseBody1 = { + ok: false, + result: [ + { + ownerId: "", + id: "", + domain: "jagged-duster.com", + projectId: "", + isProjectRule: false, + }, + ], + pagination: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `ok` | *boolean* | :heavy_check_mark: | N/A | +| `result` | [models.AddBypassIpResponseBodyResult](../models/addbypassipresponsebodyresult.md)[] | :heavy_check_mark: | N/A | +| `pagination` | *any* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/addbypassipresponsebody2.md b/docs/models/addbypassipresponsebody2.md new file mode 100644 index 00000000..f7c6ce05 --- /dev/null +++ b/docs/models/addbypassipresponsebody2.md @@ -0,0 +1,18 @@ +# AddBypassIpResponseBody2 + +## Example Usage + +```typescript +import { AddBypassIpResponseBody2 } from "@vercel/sdk/models/addbypassipop.js"; + +let value: AddBypassIpResponseBody2 = { + ok: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `ok` | *boolean* | :heavy_check_mark: | N/A | +| `result` | [models.AddBypassIpResponseBodySecurityResult](../models/addbypassipresponsebodysecurityresult.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/addbypassipresponsebodyaction.md b/docs/models/addbypassipresponsebodyaction.md new file mode 100644 index 00000000..0b41c28f --- /dev/null +++ b/docs/models/addbypassipresponsebodyaction.md @@ -0,0 +1,15 @@ +# AddBypassIpResponseBodyAction + +## Example Usage + +```typescript +import { AddBypassIpResponseBodyAction } from "@vercel/sdk/models/addbypassipop.js"; + +let value: AddBypassIpResponseBodyAction = "bypass"; +``` + +## Values + +```typescript +"block" | "bypass" +``` \ No newline at end of file diff --git a/docs/models/addbypassipresponsebodyresult.md b/docs/models/addbypassipresponsebodyresult.md new file mode 100644 index 00000000..7f3462b8 --- /dev/null +++ b/docs/models/addbypassipresponsebodyresult.md @@ -0,0 +1,26 @@ +# AddBypassIpResponseBodyResult + +## Example Usage + +```typescript +import { AddBypassIpResponseBodyResult } from "@vercel/sdk/models/addbypassipop.js"; + +let value: AddBypassIpResponseBodyResult = { + ownerId: "", + id: "", + domain: "shiny-story.info", + projectId: "", + isProjectRule: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ownerId` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `ip` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `isProjectRule` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/addbypassipresponsebodysecurityresult.md b/docs/models/addbypassipresponsebodysecurityresult.md new file mode 100644 index 00000000..34439606 --- /dev/null +++ b/docs/models/addbypassipresponsebodysecurityresult.md @@ -0,0 +1,36 @@ +# AddBypassIpResponseBodySecurityResult + +## Example Usage + +```typescript +import { AddBypassIpResponseBodySecurityResult } from "@vercel/sdk/models/addbypassipop.js"; + +let value: AddBypassIpResponseBodySecurityResult = { + ownerId: "", + id: "", + domain: "knotty-cinder.name", + ip: "4d75:b64d:3686:4a72:b27d:8db3:ec2a:fd26", + createdAt: "1727423979566", + updatedAt: "1736980306251", + updatedAtHour: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ownerId` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `ip` | *string* | :heavy_check_mark: | N/A | +| `action` | [models.AddBypassIpResponseBodyAction](../models/addbypassipresponsebodyaction.md) | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | +| `isProjectRule` | *boolean* | :heavy_minus_sign: | N/A | +| `note` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_check_mark: | N/A | +| `actorId` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *string* | :heavy_check_mark: | N/A | +| `updatedAtHour` | *string* | :heavy_check_mark: | N/A | +| `deletedAt` | *string* | :heavy_minus_sign: | N/A | +| `expiresAt` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/additionalroles.md b/docs/models/additionalroles.md new file mode 100644 index 00000000..0bbb96a5 --- /dev/null +++ b/docs/models/additionalroles.md @@ -0,0 +1,15 @@ +# AdditionalRoles + +## Example Usage + +```typescript +import { AdditionalRoles } from "@vercel/sdk/models/teamlimited.js"; + +let value: AdditionalRoles = "FullProductionDeployment"; +``` + +## Values + +```typescript +"CreateProject" | "FullProductionDeployment" +``` \ No newline at end of file diff --git a/docs/models/addprojectdomainverification.md b/docs/models/addprojectdomainverification.md index 1fab5fb0..4d5975b1 100644 --- a/docs/models/addprojectdomainverification.md +++ b/docs/models/addprojectdomainverification.md @@ -9,7 +9,7 @@ import { AddProjectDomainVerification } from "@vercel/sdk/models/addprojectdomai let value: AddProjectDomainVerification = { type: "", - domain: "gullible-disclosure.biz", + domain: "favorite-cauliflower.name", value: "", reason: "", }; diff --git a/docs/models/algo.md b/docs/models/algo.md index a81a4e82..75a29a7c 100644 --- a/docs/models/algo.md +++ b/docs/models/algo.md @@ -5,7 +5,7 @@ ```typescript import { Algo } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: Algo = "fixed_window"; +let value: Algo = "token_bucket"; ``` ## Values diff --git a/docs/models/aliasassigned.md b/docs/models/aliasassigned.md index 50622549..eb4957e7 100644 --- a/docs/models/aliasassigned.md +++ b/docs/models/aliasassigned.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 4314.18; +const value: number = 4358.65; ``` ### `boolean` diff --git a/docs/models/analytics.md b/docs/models/analytics.md index c1b50528..a31fae93 100644 --- a/docs/models/analytics.md +++ b/docs/models/analytics.md @@ -7,8 +7,8 @@ import { Analytics } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: Analytics = { id: "", - disabledAt: 3015.75, - enabledAt: 6601.74, + disabledAt: 6180.16, + enabledAt: 4287.69, }; ``` diff --git a/docs/models/authuser.md b/docs/models/authuser.md index 91cedaec..42d1f219 100644 --- a/docs/models/authuser.md +++ b/docs/models/authuser.md @@ -53,5 +53,5 @@ let value: AuthUser = { | `name` | *string* | :heavy_check_mark: | Name associated with the User account, or `null` if none has been provided. | John Doe | | `username` | *string* | :heavy_check_mark: | Unique username associated with the User account. | jdoe | | `avatar` | *string* | :heavy_check_mark: | SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. | 22cb30c85ff45ac4c72de8981500006b28114aa1 | -| `defaultTeamId` | *string* | :heavy_check_mark: | The user's default team. Only applies if the user's `version` is `'northstar'`. | | -| `version` | [models.Version](../models/version.md) | :heavy_check_mark: | The user's version. Will either be unset or `northstar`. | | \ No newline at end of file +| `defaultTeamId` | *string* | :heavy_check_mark: | The user's default team. | | +| `version` | [models.Version](../models/version.md) | :heavy_check_mark: | The user's version. Will always be `northstar`. | | \ No newline at end of file diff --git a/docs/models/authuserlimited.md b/docs/models/authuserlimited.md index 3881ac82..49954e88 100644 --- a/docs/models/authuserlimited.md +++ b/docs/models/authuserlimited.md @@ -29,5 +29,5 @@ let value: AuthUserLimited = { | `name` | *string* | :heavy_check_mark: | Name associated with the User account, or `null` if none has been provided. | John Doe | | `username` | *string* | :heavy_check_mark: | Unique username associated with the User account. | jdoe | | `avatar` | *string* | :heavy_check_mark: | SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. | 22cb30c85ff45ac4c72de8981500006b28114aa1 | -| `defaultTeamId` | *string* | :heavy_check_mark: | The user's default team. Only applies if the user's `version` is `'northstar'`. | | -| `version` | [models.AuthUserLimitedVersion](../models/authuserlimitedversion.md) | :heavy_check_mark: | The user's version. Will either be unset or `northstar`. | | \ No newline at end of file +| `defaultTeamId` | *string* | :heavy_check_mark: | The user's default team. | | +| `version` | [models.AuthUserLimitedVersion](../models/authuserlimitedversion.md) | :heavy_check_mark: | The user's version. Will always be `northstar`. | | \ No newline at end of file diff --git a/docs/models/authuserlimitedversion.md b/docs/models/authuserlimitedversion.md index b099cca1..c79d3ba7 100644 --- a/docs/models/authuserlimitedversion.md +++ b/docs/models/authuserlimitedversion.md @@ -1,6 +1,6 @@ # AuthUserLimitedVersion -The user's version. Will either be unset or `northstar`. +The user's version. Will always be `northstar`. ## Example Usage diff --git a/docs/models/billingitems.md b/docs/models/billingitems.md index 19982ea1..665cbddb 100644 --- a/docs/models/billingitems.md +++ b/docs/models/billingitems.md @@ -9,7 +9,7 @@ let value: BillingItems = { billingPlanId: "", name: "", price: "705.06", - quantity: 9582.79, + quantity: 9582.8, units: "", total: "", }; diff --git a/docs/models/billingplan.md b/docs/models/billingplan.md index 17cb7d34..b60dcc6e 100644 --- a/docs/models/billingplan.md +++ b/docs/models/billingplan.md @@ -7,9 +7,9 @@ import { BillingPlan } from "@vercel/sdk/models/getconfigurationsop.js"; let value: BillingPlan = { id: "", - type: "prepayment", + type: "subscription", name: "", - description: "bloom redound grounded about mature minority oh", + description: "likewise gah boohoo concerning regularly", }; ``` diff --git a/docs/models/branchmatcher.md b/docs/models/branchmatcher.md index 3c5661ff..d361ce98 100644 --- a/docs/models/branchmatcher.md +++ b/docs/models/branchmatcher.md @@ -1,9 +1,11 @@ # BranchMatcher +How we want to determine a matching branch. This is optional. + ## Example Usage ```typescript -import { BranchMatcher } from "@vercel/sdk/models/updateprojectdatacacheop.js"; +import { BranchMatcher } from "@vercel/sdk/models/postv1projectsidornamecustomenvironmentsop.js"; let value: BranchMatcher = { type: "startsWith", @@ -13,7 +15,7 @@ let value: BranchMatcher = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `type` | [models.UpdateProjectDataCacheProjectsResponse200ApplicationJSONType](../models/updateprojectdatacacheprojectsresponse200applicationjsontype.md) | :heavy_check_mark: | N/A | -| `pattern` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `type` | [models.PostV1ProjectsIdOrNameCustomEnvironmentsType](../models/postv1projectsidornamecustomenvironmentstype.md) | :heavy_check_mark: | Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". | +| `pattern` | *string* | :heavy_check_mark: | Git branch name or portion thereof. | \ No newline at end of file diff --git a/docs/models/buydomaindomainsdomain.md b/docs/models/buydomaindomainsdomain.md index dad9daa3..80cae1ac 100644 --- a/docs/models/buydomaindomainsdomain.md +++ b/docs/models/buydomaindomainsdomain.md @@ -11,7 +11,7 @@ let value: BuyDomainDomainsDomain = { "", ], verified: false, - created: 1979.83, + created: 1979.82, pending: false, }; ``` diff --git a/docs/models/buydomaindomainsresponsebody.md b/docs/models/buydomaindomainsresponsebody.md index 4eedd959..3688267a 100644 --- a/docs/models/buydomaindomainsresponsebody.md +++ b/docs/models/buydomaindomainsresponsebody.md @@ -12,7 +12,7 @@ let value: BuyDomainDomainsResponseBody = { "", ], verified: false, - created: 455.11, + created: 455.1, pending: false, }, }; diff --git a/docs/models/canceldeploymentgitrepo.md b/docs/models/canceldeploymentgitrepo.md index 707267d4..37abc8d0 100644 --- a/docs/models/canceldeploymentgitrepo.md +++ b/docs/models/canceldeploymentgitrepo.md @@ -8,7 +8,7 @@ ```typescript const value: models.CancelDeploymentGitRepo1 = { namespace: "", - projectId: 6428.03, + projectId: 6428.04, type: "gitlab", url: "https://unrealistic-feather.info/", path: "/proc", @@ -25,9 +25,9 @@ const value: models.CancelDeploymentGitRepo1 = { const value: models.CancelDeploymentGitRepo2 = { org: "", repo: "", - repoId: 7128.92, + repoId: 7128.93, type: "github", - repoOwnerId: 8304.76, + repoOwnerId: 8304.77, path: "/boot/defaults", defaultBranch: "", name: "", diff --git a/docs/models/canceldeploymentgitsource.md b/docs/models/canceldeploymentgitsource.md index 56a5f34b..e0fe36fc 100644 --- a/docs/models/canceldeploymentgitsource.md +++ b/docs/models/canceldeploymentgitsource.md @@ -8,7 +8,7 @@ ```typescript const value: models.CancelDeploymentGitSource1 = { type: "github", - repoId: 3966.10, + repoId: 3966.1, }; ``` @@ -68,7 +68,7 @@ const value: models.GitSource7 = { type: "github", ref: "", sha: "", - repoId: 4610.50, + repoId: 4610.5, }; ``` diff --git a/docs/models/canceldeploymentgitsourceprojectid.md b/docs/models/canceldeploymentgitsourceprojectid.md index 2325ab43..ebd7ce84 100644 --- a/docs/models/canceldeploymentgitsourceprojectid.md +++ b/docs/models/canceldeploymentgitsourceprojectid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 2987.50; +const value: number = 2987.5; ``` diff --git a/docs/models/canceldeploymentroutes3.md b/docs/models/canceldeploymentroutes3.md index 94041362..41b39d93 100644 --- a/docs/models/canceldeploymentroutes3.md +++ b/docs/models/canceldeploymentroutes3.md @@ -8,7 +8,7 @@ import { CancelDeploymentRoutes3 } from "@vercel/sdk/models/canceldeploymentop.j let value: CancelDeploymentRoutes3 = { src: "", continue: false, - middleware: 2848.86, + middleware: 2848.85, }; ``` diff --git a/docs/models/checks.md b/docs/models/checks.md index 9eea9fc7..171ac2db 100644 --- a/docs/models/checks.md +++ b/docs/models/checks.md @@ -6,13 +6,13 @@ import { Checks } from "@vercel/sdk/models/getallchecksop.js"; let value: Checks = { - createdAt: 6674.10, + createdAt: 2894.06, id: "", integrationId: "", name: "", rerequestable: false, status: "registered", - updatedAt: 7163.27, + updatedAt: 5865.13, }; ``` diff --git a/docs/models/conclusion.md b/docs/models/conclusion.md index c77756f4..495c354b 100644 --- a/docs/models/conclusion.md +++ b/docs/models/conclusion.md @@ -7,7 +7,7 @@ The result of the check being run ```typescript import { Conclusion } from "@vercel/sdk/models/updatecheckop.js"; -let value: Conclusion = "succeeded"; +let value: Conclusion = "failed"; ``` ## Values diff --git a/docs/models/conditiongroup.md b/docs/models/conditiongroup.md index 25dd2aee..f4c600d8 100644 --- a/docs/models/conditiongroup.md +++ b/docs/models/conditiongroup.md @@ -8,8 +8,8 @@ import { ConditionGroup } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: ConditionGroup = { conditions: [ { - type: "rate_limit_api_id", - op: "sub", + type: "user_agent", + op: "ninc", }, ], }; diff --git a/docs/models/conditions.md b/docs/models/conditions.md index 37e58743..9469eb31 100644 --- a/docs/models/conditions.md +++ b/docs/models/conditions.md @@ -6,8 +6,8 @@ import { Conditions } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Conditions = { - type: "environment", - op: "lte", + type: "cookie", + op: "gte", }; ``` diff --git a/docs/models/createaccessgroupprojectaccessgroupsrole.md b/docs/models/createaccessgroupprojectaccessgroupsrole.md index ae240e7b..71b56fe5 100644 --- a/docs/models/createaccessgroupprojectaccessgroupsrole.md +++ b/docs/models/createaccessgroupprojectaccessgroupsrole.md @@ -5,7 +5,7 @@ ```typescript import { CreateAccessGroupProjectAccessGroupsRole } from "@vercel/sdk/models/createaccessgroupprojectop.js"; -let value: CreateAccessGroupProjectAccessGroupsRole = "PROJECT_VIEWER"; +let value: CreateAccessGroupProjectAccessGroupsRole = "ADMIN"; ``` ## Values diff --git a/docs/models/createaccessgroupprojectresponsebody.md b/docs/models/createaccessgroupprojectresponsebody.md index 2ef49377..513a474a 100644 --- a/docs/models/createaccessgroupprojectresponsebody.md +++ b/docs/models/createaccessgroupprojectresponsebody.md @@ -9,9 +9,9 @@ let value: CreateAccessGroupProjectResponseBody = { teamId: "", accessGroupId: "", projectId: "", - role: "ADMIN", - createdAt: "1708735358443", - updatedAt: "1736146391543", + role: "PROJECT_DEVELOPER", + createdAt: "1723510519477", + updatedAt: "1737016289427", }; ``` diff --git a/docs/models/createaccessgroupresponsebody.md b/docs/models/createaccessgroupresponsebody.md index 26e831f1..290a9be8 100644 --- a/docs/models/createaccessgroupresponsebody.md +++ b/docs/models/createaccessgroupresponsebody.md @@ -6,8 +6,8 @@ import { CreateAccessGroupResponseBody } from "@vercel/sdk/models/createaccessgroupop.js"; let value: CreateAccessGroupResponseBody = { - membersCount: 187.90, - projectsCount: 6176.35, + membersCount: 6169.34, + projectsCount: 9437.49, name: "my-access-group", createdAt: "1588720733602", teamId: "team_123a6c5209bc3778245d011443644c8d27dc2c50", diff --git a/docs/models/createcheckcls.md b/docs/models/createcheckcls.md index 69c5c474..33e0941e 100644 --- a/docs/models/createcheckcls.md +++ b/docs/models/createcheckcls.md @@ -6,7 +6,7 @@ import { CreateCheckCLS } from "@vercel/sdk/models/createcheckop.js"; let value: CreateCheckCLS = { - value: 4686.51, + value: 7392.64, source: "web-vitals", }; ``` diff --git a/docs/models/createcheckfcp.md b/docs/models/createcheckfcp.md index 24b1fe56..ec6110bb 100644 --- a/docs/models/createcheckfcp.md +++ b/docs/models/createcheckfcp.md @@ -6,7 +6,7 @@ import { CreateCheckFCP } from "@vercel/sdk/models/createcheckop.js"; let value: CreateCheckFCP = { - value: 960.98, + value: 9767.62, source: "web-vitals", }; ``` diff --git a/docs/models/createchecklcp.md b/docs/models/createchecklcp.md index 2e04007c..c292a3c0 100644 --- a/docs/models/createchecklcp.md +++ b/docs/models/createchecklcp.md @@ -6,7 +6,7 @@ import { CreateCheckLCP } from "@vercel/sdk/models/createcheckop.js"; let value: CreateCheckLCP = { - value: 9764.59, + value: 6048.46, source: "web-vitals", }; ``` diff --git a/docs/models/createcheckmetrics.md b/docs/models/createcheckmetrics.md index e443dfac..496318f5 100644 --- a/docs/models/createcheckmetrics.md +++ b/docs/models/createcheckmetrics.md @@ -7,19 +7,19 @@ import { CreateCheckMetrics } from "@vercel/sdk/models/createcheckop.js"; let value: CreateCheckMetrics = { fcp: { - value: 7392.64, + value: 1201.96, source: "web-vitals", }, lcp: { - value: 391.88, + value: 2961.4, source: "web-vitals", }, cls: { - value: 2828.07, + value: 1187.27, source: "web-vitals", }, tbt: { - value: 1201.97, + value: 3179.83, source: "web-vitals", }, }; diff --git a/docs/models/createcheckresponsebody.md b/docs/models/createcheckresponsebody.md index e5b1222a..196e80e5 100644 --- a/docs/models/createcheckresponsebody.md +++ b/docs/models/createcheckresponsebody.md @@ -14,8 +14,8 @@ let value: CreateCheckResponseBody = { blocking: false, integrationId: "", deploymentId: "", - createdAt: 2961.40, - updatedAt: 1187.28, + createdAt: 4142.63, + updatedAt: 641.47, }; ``` diff --git a/docs/models/createchecktbt.md b/docs/models/createchecktbt.md index 8576ae9d..53df812f 100644 --- a/docs/models/createchecktbt.md +++ b/docs/models/createchecktbt.md @@ -6,7 +6,7 @@ import { CreateCheckTBT } from "@vercel/sdk/models/createcheckop.js"; let value: CreateCheckTBT = { - value: 9767.61, + value: 391.87, source: "web-vitals", }; ``` diff --git a/docs/models/createcheckvirtualexperiencescore.md b/docs/models/createcheckvirtualexperiencescore.md index 7710405a..4e0e06ea 100644 --- a/docs/models/createcheckvirtualexperiencescore.md +++ b/docs/models/createcheckvirtualexperiencescore.md @@ -6,7 +6,7 @@ import { CreateCheckVirtualExperienceScore } from "@vercel/sdk/models/createcheckop.js"; let value: CreateCheckVirtualExperienceScore = { - value: 6048.46, + value: 2828.07, source: "web-vitals", }; ``` diff --git a/docs/models/createconfigurablelogdraindisabledreason.md b/docs/models/createconfigurablelogdraindisabledreason.md index e7a0ec4d..0f953f63 100644 --- a/docs/models/createconfigurablelogdraindisabledreason.md +++ b/docs/models/createconfigurablelogdraindisabledreason.md @@ -5,7 +5,7 @@ ```typescript import { CreateConfigurableLogDrainDisabledReason } from "@vercel/sdk/models/createconfigurablelogdrainop.js"; -let value: CreateConfigurableLogDrainDisabledReason = "disabled-by-owner"; +let value: CreateConfigurableLogDrainDisabledReason = "feature-not-available"; ``` ## Values diff --git a/docs/models/createconfigurablelogdrainenvironments.md b/docs/models/createconfigurablelogdrainenvironments.md index 176490ad..96f888b9 100644 --- a/docs/models/createconfigurablelogdrainenvironments.md +++ b/docs/models/createconfigurablelogdrainenvironments.md @@ -5,7 +5,7 @@ ```typescript import { CreateConfigurableLogDrainEnvironments } from "@vercel/sdk/models/createconfigurablelogdrainop.js"; -let value: CreateConfigurableLogDrainEnvironments = "preview"; +let value: CreateConfigurableLogDrainEnvironments = "production"; ``` ## Values diff --git a/docs/models/createconfigurablelogdrainlogdrainsenvironments.md b/docs/models/createconfigurablelogdrainlogdrainsenvironments.md index b61ff54c..f218905c 100644 --- a/docs/models/createconfigurablelogdrainlogdrainsenvironments.md +++ b/docs/models/createconfigurablelogdrainlogdrainsenvironments.md @@ -5,7 +5,7 @@ ```typescript import { CreateConfigurableLogDrainLogDrainsEnvironments } from "@vercel/sdk/models/createconfigurablelogdrainop.js"; -let value: CreateConfigurableLogDrainLogDrainsEnvironments = "production"; +let value: CreateConfigurableLogDrainLogDrainsEnvironments = "preview"; ``` ## Values diff --git a/docs/models/createconfigurablelogdrainlogdrainssources.md b/docs/models/createconfigurablelogdrainlogdrainssources.md index 45a87c76..d5580c23 100644 --- a/docs/models/createconfigurablelogdrainlogdrainssources.md +++ b/docs/models/createconfigurablelogdrainlogdrainssources.md @@ -5,7 +5,7 @@ ```typescript import { CreateConfigurableLogDrainLogDrainsSources } from "@vercel/sdk/models/createconfigurablelogdrainop.js"; -let value: CreateConfigurableLogDrainLogDrainsSources = "firewall"; +let value: CreateConfigurableLogDrainLogDrainsSources = "build"; ``` ## Values diff --git a/docs/models/createconfigurablelogdrainrequest.md b/docs/models/createconfigurablelogdrainrequest.md index 9a50f23c..4fbbe739 100644 --- a/docs/models/createconfigurablelogdrainrequest.md +++ b/docs/models/createconfigurablelogdrainrequest.md @@ -10,9 +10,9 @@ let value: CreateConfigurableLogDrainRequest = { slug: "my-team-url-slug", requestBody: { deliveryFormat: "json", - url: "https://old-fashioned-declaration.org", + url: "https://quintessential-birdbath.name", sources: [ - "edge", + "build", ], }, }; diff --git a/docs/models/createconfigurablelogdrainrequestbody.md b/docs/models/createconfigurablelogdrainrequestbody.md index 9fff2917..074b759d 100644 --- a/docs/models/createconfigurablelogdrainrequestbody.md +++ b/docs/models/createconfigurablelogdrainrequestbody.md @@ -7,9 +7,9 @@ import { CreateConfigurableLogDrainRequestBody } from "@vercel/sdk/models/create let value: CreateConfigurableLogDrainRequestBody = { deliveryFormat: "json", - url: "https://natural-arcade.info", + url: "https://sweet-squid.info", sources: [ - "external", + "build", ], }; ``` diff --git a/docs/models/createconfigurablelogdrainresponsebody.md b/docs/models/createconfigurablelogdrainresponsebody.md index 096ddbfe..db8cb4f7 100644 --- a/docs/models/createconfigurablelogdrainresponsebody.md +++ b/docs/models/createconfigurablelogdrainresponsebody.md @@ -7,13 +7,13 @@ import { CreateConfigurableLogDrainResponseBody } from "@vercel/sdk/models/creat let value: CreateConfigurableLogDrainResponseBody = { id: "", - deliveryFormat: "json", - url: "https://general-digestive.biz", + deliveryFormat: "syslog", + url: "https://upbeat-aftermath.name", name: "", ownerId: "", - createdAt: 3184.03, - deletedAt: 7289.48, - updatedAt: 5691.96, + createdAt: 2946.5, + deletedAt: 8490.29, + updatedAt: 6328.5, environments: [ "preview", ], diff --git a/docs/models/createconfigurablelogdrainsources.md b/docs/models/createconfigurablelogdrainsources.md index 469c58fc..0b8e66b4 100644 --- a/docs/models/createconfigurablelogdrainsources.md +++ b/docs/models/createconfigurablelogdrainsources.md @@ -5,7 +5,7 @@ ```typescript import { CreateConfigurableLogDrainSources } from "@vercel/sdk/models/createconfigurablelogdrainop.js"; -let value: CreateConfigurableLogDrainSources = "lambda"; +let value: CreateConfigurableLogDrainSources = "external"; ``` ## Values diff --git a/docs/models/createdeploymentgitsource.md b/docs/models/createdeploymentgitsource.md index efd91733..513a2d5f 100644 --- a/docs/models/createdeploymentgitsource.md +++ b/docs/models/createdeploymentgitsource.md @@ -68,7 +68,7 @@ const value: models.CreateDeploymentGitSource7 = { type: "github", ref: "", sha: "", - repoId: 4004.49, + repoId: 4004.48, }; ``` @@ -79,7 +79,7 @@ const value: models.CreateDeploymentGitSource8 = { type: "gitlab", ref: "", sha: "", - projectId: 6658.71, + projectId: 6658.72, }; ``` diff --git a/docs/models/createdeploymentgitsource7.md b/docs/models/createdeploymentgitsource7.md index 3d2b074e..994cd2be 100644 --- a/docs/models/createdeploymentgitsource7.md +++ b/docs/models/createdeploymentgitsource7.md @@ -9,7 +9,7 @@ let value: CreateDeploymentGitSource7 = { type: "github", ref: "", sha: "", - repoId: 9665.75, + repoId: 9665.76, }; ``` diff --git a/docs/models/createdeploymentrequestbody.md b/docs/models/createdeploymentrequestbody.md index 174cefad..6c5ffa37 100644 --- a/docs/models/createdeploymentrequestbody.md +++ b/docs/models/createdeploymentrequestbody.md @@ -45,6 +45,7 @@ let value: CreateDeploymentRequestBody = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `customEnvironmentSlugOrId` | *string* | :heavy_minus_sign: | Deploy to a custom environment, which will override the default environment | | | `deploymentId` | *string* | :heavy_minus_sign: | An deployment id for an existing deployment to redeploy | dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6 | | `files` | *models.Files*[] | :heavy_minus_sign: | A list of objects with the files to be deployed | | | `gitMetadata` | [models.GitMetadata](../models/gitmetadata.md) | :heavy_minus_sign: | Populates initial git metadata for different git providers. | | diff --git a/docs/models/createdeploymentresponsebody.md b/docs/models/createdeploymentresponsebody.md index 8767d49f..af941875 100644 --- a/docs/models/createdeploymentresponsebody.md +++ b/docs/models/createdeploymentresponsebody.md @@ -33,7 +33,7 @@ let value: CreateDeploymentResponseBody = { createdAt: 5561.33, name: "", id: "", - version: 3180.29, + version: 3180.28, meta: { "key": "", }, @@ -48,7 +48,7 @@ let value: CreateDeploymentResponseBody = { { src: "", continue: false, - middleware: 7650.70, + middleware: 7650.7, }, ], plan: "pro", diff --git a/docs/models/createdtarget.md b/docs/models/createdtarget.md index dc598daa..b22599df 100644 --- a/docs/models/createdtarget.md +++ b/docs/models/createdtarget.md @@ -7,13 +7,13 @@ ```typescript const value: models.CreateProjectEnvTarget1[] = [ - "development", + "preview", ]; ``` ### `models.CreateProjectEnvTarget2` ```typescript -const value: models.CreateProjectEnvTarget2 = "development"; +const value: models.CreateProjectEnvTarget2 = "production"; ``` diff --git a/docs/models/createedgeconfigresponsebody.md b/docs/models/createedgeconfigresponsebody.md index cdad14f6..e0e3af4e 100644 --- a/docs/models/createedgeconfigresponsebody.md +++ b/docs/models/createedgeconfigresponsebody.md @@ -8,8 +8,8 @@ An Edge Config import { CreateEdgeConfigResponseBody } from "@vercel/sdk/models/createedgeconfigop.js"; let value: CreateEdgeConfigResponseBody = { - sizeInBytes: 9890.88, - itemCount: 6628.56, + sizeInBytes: 9890.89, + itemCount: 6628.57, }; ``` diff --git a/docs/models/createlogdrainsources.md b/docs/models/createlogdrainsources.md index 88f559bd..014ffc2c 100644 --- a/docs/models/createlogdrainsources.md +++ b/docs/models/createlogdrainsources.md @@ -7,7 +7,7 @@ The sources from which logs are currently being delivered to this log drain. ```typescript import { CreateLogDrainSources } from "@vercel/sdk/models/createlogdrainop.js"; -let value: CreateLogDrainSources = "lambda"; +let value: CreateLogDrainSources = "external"; ``` ## Values diff --git a/docs/models/createprojectaction.md b/docs/models/createprojectaction.md index dff746d7..1419eae4 100644 --- a/docs/models/createprojectaction.md +++ b/docs/models/createprojectaction.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectAction } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectAction = "redirect"; +let value: CreateProjectAction = "log"; ``` ## Values diff --git a/docs/models/createprojectalgo.md b/docs/models/createprojectalgo.md index 43e23641..e99a26de 100644 --- a/docs/models/createprojectalgo.md +++ b/docs/models/createprojectalgo.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectAlgo } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectAlgo = "token_bucket"; +let value: CreateProjectAlgo = "fixed_window"; ``` ## Values diff --git a/docs/models/createprojectaliasassigned.md b/docs/models/createprojectaliasassigned.md index b90d9491..153bed3d 100644 --- a/docs/models/createprojectaliasassigned.md +++ b/docs/models/createprojectaliasassigned.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 3679.28; +const value: number = 3374.77; ``` ### `boolean` diff --git a/docs/models/createprojectanalytics.md b/docs/models/createprojectanalytics.md index 2bb7c1a0..236ea1be 100644 --- a/docs/models/createprojectanalytics.md +++ b/docs/models/createprojectanalytics.md @@ -7,8 +7,8 @@ import { CreateProjectAnalytics } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectAnalytics = { id: "", - disabledAt: 9795.27, - enabledAt: 1746.58, + disabledAt: 3279.88, + enabledAt: 6803.49, }; ``` diff --git a/docs/models/createprojectbranchmatcher.md b/docs/models/createprojectbranchmatcher.md index ec45db85..7db86a07 100644 --- a/docs/models/createprojectbranchmatcher.md +++ b/docs/models/createprojectbranchmatcher.md @@ -6,7 +6,7 @@ import { CreateProjectBranchMatcher } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectBranchMatcher = { - type: "startsWith", + type: "endsWith", pattern: "", }; ``` diff --git a/docs/models/createprojectchecksconclusion.md b/docs/models/createprojectchecksconclusion.md index 10e13020..cde28333 100644 --- a/docs/models/createprojectchecksconclusion.md +++ b/docs/models/createprojectchecksconclusion.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectChecksConclusion } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectChecksConclusion = "canceled"; +let value: CreateProjectChecksConclusion = "succeeded"; ``` ## Values diff --git a/docs/models/createprojectchecksstate.md b/docs/models/createprojectchecksstate.md index f981e907..5fca08d0 100644 --- a/docs/models/createprojectchecksstate.md +++ b/docs/models/createprojectchecksstate.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectChecksState } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectChecksState = "registered"; +let value: CreateProjectChecksState = "running"; ``` ## Values diff --git a/docs/models/createprojectcreator.md b/docs/models/createprojectcreator.md index b1a1c7fd..d4de5a3d 100644 --- a/docs/models/createprojectcreator.md +++ b/docs/models/createprojectcreator.md @@ -6,9 +6,9 @@ import { CreateProjectCreator } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectCreator = { - email: "Everardo.Okuneva@gmail.com", + email: "Magali.Zulauf@yahoo.com", uid: "", - username: "Miracle88", + username: "Raphael_Towne-Runolfsdottir33", }; ``` diff --git a/docs/models/createprojectcrons.md b/docs/models/createprojectcrons.md index 606e868a..9db17af7 100644 --- a/docs/models/createprojectcrons.md +++ b/docs/models/createprojectcrons.md @@ -6,9 +6,9 @@ import { CreateProjectCrons } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectCrons = { - enabledAt: 3279.88, - disabledAt: 6803.49, - updatedAt: 632.08, + enabledAt: 632.07, + disabledAt: 6072.49, + updatedAt: 4776.46, deploymentId: "", definitions: [ { diff --git a/docs/models/createprojectdeploymenttype.md b/docs/models/createprojectdeploymenttype.md index dfc4f456..301986d1 100644 --- a/docs/models/createprojectdeploymenttype.md +++ b/docs/models/createprojectdeploymenttype.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectDeploymentType } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectDeploymentType = "preview"; +let value: CreateProjectDeploymentType = "all"; ``` ## Values diff --git a/docs/models/createprojectenv1target.md b/docs/models/createprojectenv1target.md index 2a5d36db..737020ce 100644 --- a/docs/models/createprojectenv1target.md +++ b/docs/models/createprojectenv1target.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectEnv1Target } from "@vercel/sdk/models/createprojectenvop.js"; -let value: CreateProjectEnv1Target = "production"; +let value: CreateProjectEnv1Target = "development"; ``` ## Values diff --git a/docs/models/createprojectenvcreatedtarget.md b/docs/models/createprojectenvcreatedtarget.md index 9f869165..b8d5c179 100644 --- a/docs/models/createprojectenvcreatedtarget.md +++ b/docs/models/createprojectenvcreatedtarget.md @@ -14,6 +14,6 @@ const value: string[] = [ ### `models.CreateProjectEnvTargetProjects2` ```typescript -const value: models.CreateProjectEnvTargetProjects2 = "preview"; +const value: models.CreateProjectEnvTargetProjects2 = "development"; ``` diff --git a/docs/models/createprojectenvcreatedtype.md b/docs/models/createprojectenvcreatedtype.md index 1705b355..7901b4e9 100644 --- a/docs/models/createprojectenvcreatedtype.md +++ b/docs/models/createprojectenvcreatedtype.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectEnvCreatedType } from "@vercel/sdk/models/createprojectenvop.js"; -let value: CreateProjectEnvCreatedType = "encrypted"; +let value: CreateProjectEnvCreatedType = "system"; ``` ## Values diff --git a/docs/models/createprojectenvrequest.md b/docs/models/createprojectenvrequest.md index d2016c1d..ee329ec5 100644 --- a/docs/models/createprojectenvrequest.md +++ b/docs/models/createprojectenvrequest.md @@ -10,16 +10,18 @@ let value: CreateProjectEnvRequest = { upsert: "true", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", - requestBody: { - key: "API_URL", - value: "https://api.vercel.com", - type: "plain", - target: [ - "preview", - ], - gitBranch: "feature-1", - comment: "database connection string for production", - }, + requestBody: [ + { + key: "API_URL", + value: "https://api.vercel.com", + type: "plain", + target: [ + "preview", + ], + gitBranch: "feature-1", + comment: "database connection string for production", + }, + ], }; ``` diff --git a/docs/models/createprojectenvresponsebody.md b/docs/models/createprojectenvresponsebody.md index 87027e0d..b9d14cdf 100644 --- a/docs/models/createprojectenvresponsebody.md +++ b/docs/models/createprojectenvresponsebody.md @@ -8,9 +8,7 @@ The environment variable was created successfully import { CreateProjectEnvResponseBody } from "@vercel/sdk/models/createprojectenvop.js"; let value: CreateProjectEnvResponseBody = { - created: [ - {}, - ], + created: {}, failed: [ { error: { diff --git a/docs/models/createprojectenvtarget.md b/docs/models/createprojectenvtarget.md index 003019db..c70115fb 100644 --- a/docs/models/createprojectenvtarget.md +++ b/docs/models/createprojectenvtarget.md @@ -7,13 +7,13 @@ ```typescript const value: models.CreateProjectEnvTargetProjects1[] = [ - "preview", + "development", ]; ``` ### `models.CreateProjectEnvTargetProjectsResponse2` ```typescript -const value: models.CreateProjectEnvTargetProjectsResponse2 = "production"; +const value: models.CreateProjectEnvTargetProjectsResponse2 = "development"; ``` diff --git a/docs/models/createprojectenvtarget1.md b/docs/models/createprojectenvtarget1.md index d114b8fd..8eabedc1 100644 --- a/docs/models/createprojectenvtarget1.md +++ b/docs/models/createprojectenvtarget1.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectEnvTarget1 } from "@vercel/sdk/models/createprojectenvop.js"; -let value: CreateProjectEnvTarget1 = "production"; +let value: CreateProjectEnvTarget1 = "development"; ``` ## Values diff --git a/docs/models/createprojectenvtargetprojects1.md b/docs/models/createprojectenvtargetprojects1.md index ec7aca8b..af123dc3 100644 --- a/docs/models/createprojectenvtargetprojects1.md +++ b/docs/models/createprojectenvtargetprojects1.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectEnvTargetProjects1 } from "@vercel/sdk/models/createprojectenvop.js"; -let value: CreateProjectEnvTargetProjects1 = "preview"; +let value: CreateProjectEnvTargetProjects1 = "production"; ``` ## Values diff --git a/docs/models/createprojectenvtargetprojectsresponse2.md b/docs/models/createprojectenvtargetprojectsresponse2.md index c074e528..dc4597f2 100644 --- a/docs/models/createprojectenvtargetprojectsresponse2.md +++ b/docs/models/createprojectenvtargetprojectsresponse2.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectEnvTargetProjectsResponse2 } from "@vercel/sdk/models/createprojectenvop.js"; -let value: CreateProjectEnvTargetProjectsResponse2 = "development"; +let value: CreateProjectEnvTargetProjectsResponse2 = "preview"; ``` ## Values diff --git a/docs/models/createprojectenvvalue.md b/docs/models/createprojectenvvalue.md index 1b48db5a..05dbdbcf 100644 --- a/docs/models/createprojectenvvalue.md +++ b/docs/models/createprojectenvvalue.md @@ -13,7 +13,7 @@ const value: string = ""; ```typescript const value: models.CreateProjectEnvValue2[] = [ - "development", + "preview", ]; ``` diff --git a/docs/models/createprojectenvvalue2.md b/docs/models/createprojectenvvalue2.md index e4b11587..f24bb9d3 100644 --- a/docs/models/createprojectenvvalue2.md +++ b/docs/models/createprojectenvvalue2.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectEnvValue2 } from "@vercel/sdk/models/createprojectenvop.js"; -let value: CreateProjectEnvValue2 = "production"; +let value: CreateProjectEnvValue2 = "development"; ``` ## Values diff --git a/docs/models/createprojecterl.md b/docs/models/createprojecterl.md index 804814d4..fb8b5d44 100644 --- a/docs/models/createprojecterl.md +++ b/docs/models/createprojecterl.md @@ -7,8 +7,8 @@ import { CreateProjectErl } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectErl = { algo: "fixed_window", - window: 8773.99, - limit: 3719.19, + window: 3182.33, + limit: 8587.78, keys: [ "", ], diff --git a/docs/models/createprojectframework.md b/docs/models/createprojectframework.md index e3a1eea3..01b90ff8 100644 --- a/docs/models/createprojectframework.md +++ b/docs/models/createprojectframework.md @@ -7,7 +7,7 @@ The framework that is being used for this project. When `null` is used no framew ```typescript import { CreateProjectFramework } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectFramework = "storybook"; +let value: CreateProjectFramework = "sveltekit-1"; ``` ## Values diff --git a/docs/models/createprojectfunctiondefaultmemorytype.md b/docs/models/createprojectfunctiondefaultmemorytype.md index 35e3fa83..08508fd4 100644 --- a/docs/models/createprojectfunctiondefaultmemorytype.md +++ b/docs/models/createprojectfunctiondefaultmemorytype.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectFunctionDefaultMemoryType } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectFunctionDefaultMemoryType = "performance"; +let value: CreateProjectFunctionDefaultMemoryType = "standard"; ``` ## Values diff --git a/docs/models/createprojectlastaliasrequest.md b/docs/models/createprojectlastaliasrequest.md index ccec5ce1..095e25b9 100644 --- a/docs/models/createprojectlastaliasrequest.md +++ b/docs/models/createprojectlastaliasrequest.md @@ -8,8 +8,8 @@ import { CreateProjectLastAliasRequest } from "@vercel/sdk/models/createprojecto let value: CreateProjectLastAliasRequest = { fromDeploymentId: "", toDeploymentId: "", - jobStatus: "skipped", - requestedAt: 6817.40, + jobStatus: "succeeded", + requestedAt: 1598.45, type: "promote", }; ``` diff --git a/docs/models/createprojectlatestdeployments.md b/docs/models/createprojectlatestdeployments.md index 984c25b1..d3260fd4 100644 --- a/docs/models/createprojectlatestdeployments.md +++ b/docs/models/createprojectlatestdeployments.md @@ -7,21 +7,21 @@ import { CreateProjectLatestDeployments } from "@vercel/sdk/models/createproject let value: CreateProjectLatestDeployments = { id: "", - createdAt: 626.36, + createdAt: 5219.96, createdIn: "", creator: { - email: "Holly_Rutherford11@gmail.com", + email: "Veronica74@hotmail.com", uid: "", - username: "Lambert_Stanton", + username: "Tremaine.Jacobs-Hoeger", }, deploymentHostname: "", name: "", - plan: "enterprise", + plan: "hobby", previewCommentsEnabled: false, private: false, readyState: "BUILDING", type: "LAMBDAS", - url: "https://querulous-stump.com", + url: "https://other-desk.biz/", userId: "", }; ``` diff --git a/docs/models/createprojectlink.md b/docs/models/createprojectlink.md index e8786d7a..dd97af79 100644 --- a/docs/models/createprojectlink.md +++ b/docs/models/createprojectlink.md @@ -12,7 +12,7 @@ const value: models.CreateProjectLink1 = { id: "", name: "", ref: "", - url: "https://quarrelsome-quit.name", + url: "https://impressive-haircut.biz/", }, ], }; @@ -27,7 +27,7 @@ const value: models.CreateProjectLink2 = { id: "", name: "", ref: "", - url: "https://impressive-haircut.biz/", + url: "https://short-cake.name/", }, ], }; @@ -42,7 +42,7 @@ const value: models.CreateProjectLink3 = { id: "", name: "", ref: "", - url: "https://short-cake.name/", + url: "https://prickly-venom.com", }, ], }; diff --git a/docs/models/createprojectlink1.md b/docs/models/createprojectlink1.md index 6b585aec..ebe7bc4d 100644 --- a/docs/models/createprojectlink1.md +++ b/docs/models/createprojectlink1.md @@ -11,7 +11,7 @@ let value: CreateProjectLink1 = { id: "", name: "", ref: "", - url: "https://intrepid-obesity.com/", + url: "https://quarrelsome-quit.name", }, ], }; diff --git a/docs/models/createprojectlink2.md b/docs/models/createprojectlink2.md index 171d48f2..8d66b646 100644 --- a/docs/models/createprojectlink2.md +++ b/docs/models/createprojectlink2.md @@ -11,7 +11,7 @@ let value: CreateProjectLink2 = { id: "", name: "", ref: "", - url: "https://firm-gymnast.info/", + url: "https://grown-pronoun.name", }, ], }; diff --git a/docs/models/createprojectlink3.md b/docs/models/createprojectlink3.md index 73a170cf..b26545fd 100644 --- a/docs/models/createprojectlink3.md +++ b/docs/models/createprojectlink3.md @@ -11,7 +11,7 @@ let value: CreateProjectLink3 = { id: "", name: "", ref: "", - url: "https://baggy-instruction.com", + url: "https://wordy-hierarchy.org/", }, ], }; diff --git a/docs/models/createprojectlinkdeployhooks.md b/docs/models/createprojectlinkdeployhooks.md index f6ac9e53..0ba98065 100644 --- a/docs/models/createprojectlinkdeployhooks.md +++ b/docs/models/createprojectlinkdeployhooks.md @@ -9,7 +9,7 @@ let value: CreateProjectLinkDeployHooks = { id: "", name: "", ref: "", - url: "https://grown-pronoun.name", + url: "https://intrepid-obesity.com/", }; ``` diff --git a/docs/models/createprojectlinkprojectsdeployhooks.md b/docs/models/createprojectlinkprojectsdeployhooks.md index 994bc2fb..664191e5 100644 --- a/docs/models/createprojectlinkprojectsdeployhooks.md +++ b/docs/models/createprojectlinkprojectsdeployhooks.md @@ -9,7 +9,7 @@ let value: CreateProjectLinkProjectsDeployHooks = { id: "", name: "", ref: "", - url: "https://wordy-hierarchy.org/", + url: "https://firm-gymnast.info/", }; ``` diff --git a/docs/models/createprojectlinkprojectsresponsedeployhooks.md b/docs/models/createprojectlinkprojectsresponsedeployhooks.md index b120552b..2493d781 100644 --- a/docs/models/createprojectlinkprojectsresponsedeployhooks.md +++ b/docs/models/createprojectlinkprojectsresponsedeployhooks.md @@ -9,7 +9,7 @@ let value: CreateProjectLinkProjectsResponseDeployHooks = { id: "", name: "", ref: "", - url: "https://other-desk.biz/", + url: "https://baggy-instruction.com", }; ``` diff --git a/docs/models/createprojectmicrofrontends.md b/docs/models/createprojectmicrofrontends.md index 00469b9e..e777a0d7 100644 --- a/docs/models/createprojectmicrofrontends.md +++ b/docs/models/createprojectmicrofrontends.md @@ -6,7 +6,7 @@ import { CreateProjectMicrofrontends } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectMicrofrontends = { - updatedAt: 7032.17, + updatedAt: 8671.68, groupIds: [ "", ], diff --git a/docs/models/createprojectmitigate.md b/docs/models/createprojectmitigate.md index af85f761..b054d1e7 100644 --- a/docs/models/createprojectmitigate.md +++ b/docs/models/createprojectmitigate.md @@ -6,7 +6,7 @@ import { CreateProjectMitigate } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectMitigate = { - action: "deny", + action: "log", ruleId: "", }; ``` diff --git a/docs/models/createprojectnodeversion.md b/docs/models/createprojectnodeversion.md index fcab5c64..2163ed5b 100644 --- a/docs/models/createprojectnodeversion.md +++ b/docs/models/createprojectnodeversion.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectNodeVersion } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectNodeVersion = "12.x"; +let value: CreateProjectNodeVersion = "22.x"; ``` ## Values diff --git a/docs/models/createprojectplan.md b/docs/models/createprojectplan.md index 9f8d4285..1f864d1c 100644 --- a/docs/models/createprojectplan.md +++ b/docs/models/createprojectplan.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectPlan } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectPlan = "hobby"; +let value: CreateProjectPlan = "pro"; ``` ## Values diff --git a/docs/models/createprojectprojectsaliasassigned.md b/docs/models/createprojectprojectsaliasassigned.md index 12b5db68..a4253403 100644 --- a/docs/models/createprojectprojectsaliasassigned.md +++ b/docs/models/createprojectprojectsaliasassigned.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 291.90; +const value: number = 3651; ``` ### `boolean` diff --git a/docs/models/createprojectprojectsbranchmatcher.md b/docs/models/createprojectprojectsbranchmatcher.md index 1ce1c5f5..990ff197 100644 --- a/docs/models/createprojectprojectsbranchmatcher.md +++ b/docs/models/createprojectprojectsbranchmatcher.md @@ -6,7 +6,7 @@ import { CreateProjectProjectsBranchMatcher } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectProjectsBranchMatcher = { - type: "startsWith", + type: "endsWith", pattern: "", }; ``` diff --git a/docs/models/createprojectprojectschecksstate.md b/docs/models/createprojectprojectschecksstate.md index 6efbfd7a..c5e0e001 100644 --- a/docs/models/createprojectprojectschecksstate.md +++ b/docs/models/createprojectprojectschecksstate.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectProjectsChecksState } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectProjectsChecksState = "running"; +let value: CreateProjectProjectsChecksState = "completed"; ``` ## Values diff --git a/docs/models/createprojectprojectscreator.md b/docs/models/createprojectprojectscreator.md index 8fd20cdc..784371bc 100644 --- a/docs/models/createprojectprojectscreator.md +++ b/docs/models/createprojectprojectscreator.md @@ -6,9 +6,9 @@ import { CreateProjectProjectsCreator } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectProjectsCreator = { - email: "Aileen.Spinka22@gmail.com", + email: "Damian.Bogan10@yahoo.com", uid: "", - username: "Arvid.Bradtke6", + username: "Annabel55", }; ``` diff --git a/docs/models/createprojectprojectsframework.md b/docs/models/createprojectprojectsframework.md index 7d277cdd..f9245133 100644 --- a/docs/models/createprojectprojectsframework.md +++ b/docs/models/createprojectprojectsframework.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectProjectsFramework } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectProjectsFramework = "create-react-app"; +let value: CreateProjectProjectsFramework = "sveltekit"; ``` ## Values diff --git a/docs/models/createprojectprojectsplan.md b/docs/models/createprojectprojectsplan.md index c1c566a1..8aec0105 100644 --- a/docs/models/createprojectprojectsplan.md +++ b/docs/models/createprojectprojectsplan.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectProjectsPlan } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectProjectsPlan = "hobby"; +let value: CreateProjectProjectsPlan = "enterprise"; ``` ## Values diff --git a/docs/models/createprojectprojectsreadysubstate.md b/docs/models/createprojectprojectsreadysubstate.md index 1d19185c..7ef7bb89 100644 --- a/docs/models/createprojectprojectsreadysubstate.md +++ b/docs/models/createprojectprojectsreadysubstate.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectProjectsReadySubstate } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectProjectsReadySubstate = "PROMOTED"; +let value: CreateProjectProjectsReadySubstate = "STAGED"; ``` ## Values diff --git a/docs/models/createprojectprojectsresponse200applicationjsonresponsebodylatestdeploymentstype.md b/docs/models/createprojectprojectsresponse200applicationjsonresponsebodylatestdeploymentstype.md index 63b7c4cf..a8531bfc 100644 --- a/docs/models/createprojectprojectsresponse200applicationjsonresponsebodylatestdeploymentstype.md +++ b/docs/models/createprojectprojectsresponse200applicationjsonresponsebodylatestdeploymentstype.md @@ -7,7 +7,7 @@ import { CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploy let value: CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType = - "startsWith"; + "equals"; ``` ## Values diff --git a/docs/models/createprojectprojectsresponse200applicationjsonresponsebodysecuritytype.md b/docs/models/createprojectprojectsresponse200applicationjsonresponsebodysecuritytype.md index 012ade6e..74654fcd 100644 --- a/docs/models/createprojectprojectsresponse200applicationjsonresponsebodysecuritytype.md +++ b/docs/models/createprojectprojectsresponse200applicationjsonresponsebodysecuritytype.md @@ -7,7 +7,7 @@ import { CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType let value: CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = - "scheme"; + "ip_address"; ``` ## Values diff --git a/docs/models/createprojectprojectsresponse200applicationjsonresponsebodytargetstype.md b/docs/models/createprojectprojectsresponse200applicationjsonresponsebodytargetstype.md index d637612a..f10c017f 100644 --- a/docs/models/createprojectprojectsresponse200applicationjsonresponsebodytargetstype.md +++ b/docs/models/createprojectprojectsresponse200applicationjsonresponsebodytargetstype.md @@ -7,7 +7,7 @@ import { CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType let value: CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType = - "startsWith"; + "endsWith"; ``` ## Values diff --git a/docs/models/createprojectprojectsresponse200applicationjsonresponsebodytype.md b/docs/models/createprojectprojectsresponse200applicationjsonresponsebodytype.md index 010e9ce1..78b88fe2 100644 --- a/docs/models/createprojectprojectsresponse200applicationjsonresponsebodytype.md +++ b/docs/models/createprojectprojectsresponse200applicationjsonresponsebodytype.md @@ -6,7 +6,7 @@ import { CreateProjectProjectsResponse200ApplicationJSONResponseBodyType } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectProjectsResponse200ApplicationJSONResponseBodyType = - "promote"; + "rollback"; ``` ## Values diff --git a/docs/models/createprojectprojectsresponsetype.md b/docs/models/createprojectprojectsresponsetype.md index 46bb40c6..1c4e9784 100644 --- a/docs/models/createprojectprojectsresponsetype.md +++ b/docs/models/createprojectprojectsresponsetype.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectProjectsResponseType } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectProjectsResponseType = "encrypted"; +let value: CreateProjectProjectsResponseType = "plain"; ``` ## Values diff --git a/docs/models/createprojectprojectstarget.md b/docs/models/createprojectprojectstarget.md index dc7e9aec..e0312c77 100644 --- a/docs/models/createprojectprojectstarget.md +++ b/docs/models/createprojectprojectstarget.md @@ -14,6 +14,6 @@ const value: string[] = [ ### `models.CreateProjectTarget2` ```typescript -const value: models.CreateProjectTarget2 = "preview"; +const value: models.CreateProjectTarget2 = "production"; ``` diff --git a/docs/models/createprojectprotectionbypass.md b/docs/models/createprojectprotectionbypass.md index 1ba55ccf..be6022dc 100644 --- a/docs/models/createprojectprotectionbypass.md +++ b/docs/models/createprojectprotectionbypass.md @@ -6,7 +6,7 @@ import { CreateProjectProtectionBypass } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectProtectionBypass = { - createdAt: 5243.80, + createdAt: 9707.32, createdBy: "", scope: "automation-bypass", }; diff --git a/docs/models/createprojectreadystate.md b/docs/models/createprojectreadystate.md index b291be5e..404991c9 100644 --- a/docs/models/createprojectreadystate.md +++ b/docs/models/createprojectreadystate.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectReadyState } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectReadyState = "INITIALIZING"; +let value: CreateProjectReadyState = "ERROR"; ``` ## Values diff --git a/docs/models/createprojectresourceconfig.md b/docs/models/createprojectresourceconfig.md index 117a87f8..a7a5693c 100644 --- a/docs/models/createprojectresourceconfig.md +++ b/docs/models/createprojectresourceconfig.md @@ -12,7 +12,9 @@ let value: CreateProjectResourceConfig = {}; | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `functionDefaultRegion` | *string* | :heavy_minus_sign: | N/A | | `functionDefaultTimeout` | *number* | :heavy_minus_sign: | N/A | | `functionDefaultMemoryType` | [models.CreateProjectFunctionDefaultMemoryType](../models/createprojectfunctiondefaultmemorytype.md) | :heavy_minus_sign: | N/A | +| `functionZeroConfigFailover` | *boolean* | :heavy_minus_sign: | N/A | | `allowServerlessConcurrency` | *boolean* | :heavy_minus_sign: | N/A | | `elasticConcurrencyEnabled` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createprojectresponsebody.md b/docs/models/createprojectresponsebody.md index 4733115d..00ac8db1 100644 --- a/docs/models/createprojectresponsebody.md +++ b/docs/models/createprojectresponsebody.md @@ -10,9 +10,9 @@ import { CreateProjectResponseBody } from "@vercel/sdk/models/createprojectop.js let value: CreateProjectResponseBody = { accountId: "", crons: { - enabledAt: 8587.77, - disabledAt: 4585.03, - updatedAt: 4445.87, + enabledAt: 8806.79, + disabledAt: 9450.27, + updatedAt: 9918.91, deploymentId: "", definitions: [ { @@ -27,21 +27,21 @@ let value: CreateProjectResponseBody = { latestDeployments: [ { id: "", - createdAt: 3361.02, + createdAt: 3767.41, createdIn: "", creator: { - email: "Tyrell_Hodkiewicz-Wintheiser67@hotmail.com", + email: "Paxton16@hotmail.com", uid: "", - username: "Cullen.Walker", + username: "Eldred_Kunde84", }, deploymentHostname: "", name: "", - plan: "hobby", + plan: "enterprise", previewCommentsEnabled: false, private: false, readyState: "CANCELED", type: "LAMBDAS", - url: "https://intelligent-squid.net/", + url: "https://carefree-cleaner.biz", userId: "", }, ], @@ -50,21 +50,21 @@ let value: CreateProjectResponseBody = { targets: { "key": { id: "", - createdAt: 1563.83, + createdAt: 4246.63, createdIn: "", creator: { - email: "Arch_Breitenberg@gmail.com", + email: "Keon97@gmail.com", uid: "", - username: "Bill.Watsica-Huel", + username: "Giuseppe.Friesen", }, deploymentHostname: "", name: "", - plan: "pro", + plan: "enterprise", previewCommentsEnabled: false, private: false, - readyState: "QUEUED", + readyState: "INITIALIZING", type: "LAMBDAS", - url: "https://humble-sideboard.net/", + url: "https://scared-valley.info", userId: "", }, }, diff --git a/docs/models/createprojectssoprotection.md b/docs/models/createprojectssoprotection.md index a6939adc..81d1e2c9 100644 --- a/docs/models/createprojectssoprotection.md +++ b/docs/models/createprojectssoprotection.md @@ -6,7 +6,7 @@ import { CreateProjectSsoProtection } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectSsoProtection = { - deploymentType: "prod_deployment_urls_and_all_previews", + deploymentType: "all", }; ``` diff --git a/docs/models/createprojecttarget.md b/docs/models/createprojecttarget.md index 5cefaec5..8c5c9503 100644 --- a/docs/models/createprojecttarget.md +++ b/docs/models/createprojecttarget.md @@ -15,7 +15,7 @@ const value: models.Target1 = "development"; ```typescript const value: models.Target2[] = [ - "development", + "preview", ]; ``` diff --git a/docs/models/createprojecttarget2.md b/docs/models/createprojecttarget2.md index f2fe0f38..9bc443cf 100644 --- a/docs/models/createprojecttarget2.md +++ b/docs/models/createprojecttarget2.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectTarget2 } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectTarget2 = "preview"; +let value: CreateProjectTarget2 = "production"; ``` ## Values diff --git a/docs/models/createprojecttargets.md b/docs/models/createprojecttargets.md index 3c96e680..dad14b80 100644 --- a/docs/models/createprojecttargets.md +++ b/docs/models/createprojecttargets.md @@ -7,21 +7,21 @@ import { CreateProjectTargets } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectTargets = { id: "", - createdAt: 7734.56, + createdAt: 4329.84, createdIn: "", creator: { - email: "Candice34@yahoo.com", + email: "Fay2@yahoo.com", uid: "", - username: "Nettie39", + username: "Gladys_Pollich", }, deploymentHostname: "", name: "", - plan: "hobby", + plan: "enterprise", previewCommentsEnabled: false, private: false, - readyState: "CANCELED", + readyState: "INITIALIZING", type: "LAMBDAS", - url: "https://hefty-knight.info", + url: "https://faraway-kielbasa.net/", userId: "", }; ``` diff --git a/docs/models/createprojecttier.md b/docs/models/createprojecttier.md index 4410e48a..e973edc4 100644 --- a/docs/models/createprojecttier.md +++ b/docs/models/createprojecttier.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectTier } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectTier = "standard"; +let value: CreateProjectTier = "advanced"; ``` ## Values diff --git a/docs/models/createprojecttrustedips.md b/docs/models/createprojecttrustedips.md index a0efe5ab..54d25c2a 100644 --- a/docs/models/createprojecttrustedips.md +++ b/docs/models/createprojecttrustedips.md @@ -7,13 +7,13 @@ ```typescript const value: models.CreateProjectTrustedIps1 = { - deploymentType: "all", + deploymentType: "prod_deployment_urls_and_all_previews", addresses: [ { value: "", }, ], - protectionMode: "additional", + protectionMode: "exclusive", }; ``` @@ -21,7 +21,7 @@ const value: models.CreateProjectTrustedIps1 = { ```typescript const value: models.CreateProjectTrustedIps2 = { - deploymentType: "prod_deployment_urls_and_all_previews", + deploymentType: "preview", }; ``` diff --git a/docs/models/createprojecttrustedips1.md b/docs/models/createprojecttrustedips1.md index 4aa4a575..2dee1e48 100644 --- a/docs/models/createprojecttrustedips1.md +++ b/docs/models/createprojecttrustedips1.md @@ -6,13 +6,13 @@ import { CreateProjectTrustedIps1 } from "@vercel/sdk/models/createprojectop.js"; let value: CreateProjectTrustedIps1 = { - deploymentType: "production", + deploymentType: "prod_deployment_urls_and_all_previews", addresses: [ { value: "", }, ], - protectionMode: "additional", + protectionMode: "exclusive", }; ``` diff --git a/docs/models/createprojecttrustedipsdeploymenttype.md b/docs/models/createprojecttrustedipsdeploymenttype.md index 32d01840..dc3b2565 100644 --- a/docs/models/createprojecttrustedipsdeploymenttype.md +++ b/docs/models/createprojecttrustedipsdeploymenttype.md @@ -5,7 +5,7 @@ ```typescript import { CreateProjectTrustedIpsDeploymentType } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectTrustedIpsDeploymentType = "production"; +let value: CreateProjectTrustedIpsDeploymentType = "all"; ``` ## Values diff --git a/docs/models/createprojecttype.md b/docs/models/createprojecttype.md index f24c0c89..4eb6a0ba 100644 --- a/docs/models/createprojecttype.md +++ b/docs/models/createprojecttype.md @@ -7,7 +7,7 @@ Type of the ENV variable ```typescript import { CreateProjectType } from "@vercel/sdk/models/createprojectop.js"; -let value: CreateProjectType = "plain"; +let value: CreateProjectType = "secret"; ``` ## Values diff --git a/docs/models/createrecordresponsebody.md b/docs/models/createrecordresponsebody.md index 99f5b494..56810525 100644 --- a/docs/models/createrecordresponsebody.md +++ b/docs/models/createrecordresponsebody.md @@ -10,7 +10,7 @@ Successful response showing the uid of the newly created DNS record. ```typescript const value: models.CreateRecordResponseBody1 = { uid: "", - updated: 4526.54, + updated: 4526.53, }; ``` diff --git a/docs/models/createwebhookevents.md b/docs/models/createwebhookevents.md index c324d734..27d6bad9 100644 --- a/docs/models/createwebhookevents.md +++ b/docs/models/createwebhookevents.md @@ -13,5 +13,5 @@ let value: CreateWebhookEvents = "deployment.created"; ## Values ```typescript -"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" +"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "integration-resource.project-connected" | "integration-resource.project-disconnected" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" ``` \ No newline at end of file diff --git a/docs/models/createwebhookrequest.md b/docs/models/createwebhookrequest.md index 1fc51b10..497a5f7b 100644 --- a/docs/models/createwebhookrequest.md +++ b/docs/models/createwebhookrequest.md @@ -9,9 +9,9 @@ let value: CreateWebhookRequest = { teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", requestBody: { - url: "https://variable-chainstay.com/", + url: "https://wilted-publication.name/", events: [ - "deployment.created", + "deployment-canceled", ], }, }; diff --git a/docs/models/createwebhookrequestbody.md b/docs/models/createwebhookrequestbody.md index e655c30e..28f055d3 100644 --- a/docs/models/createwebhookrequestbody.md +++ b/docs/models/createwebhookrequestbody.md @@ -6,9 +6,9 @@ import { CreateWebhookRequestBody } from "@vercel/sdk/models/createwebhookop.js"; let value: CreateWebhookRequestBody = { - url: "https://zesty-expense.com/", + url: "https://watery-receptor.com", events: [ - "integration-configuration.removed", + "deployment-checks-completed", ], }; ``` diff --git a/docs/models/crons.md b/docs/models/crons.md index 43bf3104..aa25fa68 100644 --- a/docs/models/crons.md +++ b/docs/models/crons.md @@ -6,9 +6,9 @@ import { Crons } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: Crons = { - enabledAt: 2900.78, - disabledAt: 6180.15, - updatedAt: 4287.69, + enabledAt: 1354.74, + disabledAt: 2982.82, + updatedAt: 5699.65, deploymentId: "", definitions: [ { diff --git a/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md b/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md new file mode 100644 index 00000000..a82ae4ec --- /dev/null +++ b/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md @@ -0,0 +1,25 @@ +# DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest + +## Example Usage + +```typescript +import { DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest } from "@vercel/sdk/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest = { + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `idOrName` | *string* | :heavy_check_mark: | The unique project identifier or the project name | | +| `environmentSlugOrId` | *string* | :heavy_check_mark: | The unique custom environment identifier within the project | | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | +| `requestBody` | [models.DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody](../models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md b/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md new file mode 100644 index 00000000..f8d62f08 --- /dev/null +++ b/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md @@ -0,0 +1,16 @@ +# DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody + +## Example Usage + +```typescript +import { DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody } from "@vercel/sdk/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `deleteUnassignedEnvironmentVariables` | *boolean* | :heavy_minus_sign: | Delete Environment Variables that are not assigned to any environments. | \ No newline at end of file diff --git a/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md b/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md new file mode 100644 index 00000000..71d55566 --- /dev/null +++ b/docs/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md @@ -0,0 +1,16 @@ +# DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + +## Example Usage + +```typescript +import { DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody } from "@vercel/sdk/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody = + {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/deployhooks.md b/docs/models/deployhooks.md index 06bbf4e6..54cb3f51 100644 --- a/docs/models/deployhooks.md +++ b/docs/models/deployhooks.md @@ -9,7 +9,7 @@ let value: DeployHooks = { id: "", name: "", ref: "", - url: "https://fake-backburn.info/", + url: "https://rubbery-gift.biz/", }; ``` diff --git a/docs/models/deploymenttype.md b/docs/models/deploymenttype.md index d2a03059..d043d83a 100644 --- a/docs/models/deploymenttype.md +++ b/docs/models/deploymenttype.md @@ -7,7 +7,7 @@ Specify if the password will apply to every Deployment Target or just Preview ```typescript import { DeploymentType } from "@vercel/sdk/models/updateprojectop.js"; -let value: DeploymentType = "prod_deployment_urls_and_all_previews"; +let value: DeploymentType = "preview"; ``` ## Values diff --git a/docs/models/disabledreason.md b/docs/models/disabledreason.md index 3fc30c0f..9793b53f 100644 --- a/docs/models/disabledreason.md +++ b/docs/models/disabledreason.md @@ -5,7 +5,7 @@ ```typescript import { DisabledReason } from "@vercel/sdk/models/getconfigurablelogdrainop.js"; -let value: DisabledReason = "disabled-by-owner"; +let value: DisabledReason = "account-plan-downgrade"; ``` ## Values diff --git a/docs/models/dismissals.md b/docs/models/dismissals.md index 91cd5fa0..bfbb8e8d 100644 --- a/docs/models/dismissals.md +++ b/docs/models/dismissals.md @@ -7,7 +7,7 @@ import { Dismissals } from "@vercel/sdk/models/authuser.js"; let value: Dismissals = { scopeId: "", - createdAt: 2863.30, + createdAt: 2863.29, }; ``` diff --git a/docs/models/dismissedtoasts.md b/docs/models/dismissedtoasts.md index de37fb68..e2f53592 100644 --- a/docs/models/dismissedtoasts.md +++ b/docs/models/dismissedtoasts.md @@ -12,7 +12,7 @@ let value: DismissedToasts = { dismissals: [ { scopeId: "", - createdAt: 1667.42, + createdAt: 1667.41, }, ], }; diff --git a/docs/models/edgeconfigitem.md b/docs/models/edgeconfigitem.md index 9e79ada5..15c78ef5 100644 --- a/docs/models/edgeconfigitem.md +++ b/docs/models/edgeconfigitem.md @@ -11,8 +11,8 @@ let value: EdgeConfigItem = { key: "", value: {}, edgeConfigId: "", - createdAt: 1017.70, - updatedAt: 6730.10, + createdAt: 1017.7, + updatedAt: 6730.1, }; ``` diff --git a/docs/models/editprojectenvresponsebody1.md b/docs/models/editprojectenvresponsebody1.md index 2c93f537..c43c8586 100644 --- a/docs/models/editprojectenvresponsebody1.md +++ b/docs/models/editprojectenvresponsebody1.md @@ -6,7 +6,7 @@ import { EditProjectEnvResponseBody1 } from "@vercel/sdk/models/editprojectenvop.js"; let value: EditProjectEnvResponseBody1 = { - type: "secret", + type: "plain", key: "", value: "", }; diff --git a/docs/models/editprojectenvresponsebodytarget.md b/docs/models/editprojectenvresponsebodytarget.md index 94c09ee9..47baafcc 100644 --- a/docs/models/editprojectenvresponsebodytarget.md +++ b/docs/models/editprojectenvresponsebodytarget.md @@ -14,6 +14,6 @@ const value: string[] = [ ### `models.EditProjectEnvTarget2` ```typescript -const value: models.EditProjectEnvTarget2 = "preview"; +const value: models.EditProjectEnvTarget2 = "development"; ``` diff --git a/docs/models/editprojectenvresponsebodytype.md b/docs/models/editprojectenvresponsebodytype.md index 2b9127ee..794d68dc 100644 --- a/docs/models/editprojectenvresponsebodytype.md +++ b/docs/models/editprojectenvresponsebodytype.md @@ -5,7 +5,7 @@ ```typescript import { EditProjectEnvResponseBodyType } from "@vercel/sdk/models/editprojectenvop.js"; -let value: EditProjectEnvResponseBodyType = "system"; +let value: EditProjectEnvResponseBodyType = "secret"; ``` ## Values diff --git a/docs/models/env.md b/docs/models/env.md index d911494c..9dcf0f14 100644 --- a/docs/models/env.md +++ b/docs/models/env.md @@ -6,7 +6,7 @@ import { Env } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: Env = { - type: "plain", + type: "sensitive", key: "", value: "", }; diff --git a/docs/models/environments.md b/docs/models/environments.md index c99511e9..9dbc0937 100644 --- a/docs/models/environments.md +++ b/docs/models/environments.md @@ -5,7 +5,7 @@ ```typescript import { Environments } from "@vercel/sdk/models/createlogdrainop.js"; -let value: Environments = "production"; +let value: Environments = "preview"; ``` ## Values diff --git a/docs/models/environmentvariables.md b/docs/models/environmentvariables.md index 5818d634..1cec649b 100644 --- a/docs/models/environmentvariables.md +++ b/docs/models/environmentvariables.md @@ -8,7 +8,7 @@ import { EnvironmentVariables } from "@vercel/sdk/models/createprojectop.js"; let value: EnvironmentVariables = { key: "", target: [ - "production", + "preview", ], value: "", }; diff --git a/docs/models/erl.md b/docs/models/erl.md index ef844443..733b5a2e 100644 --- a/docs/models/erl.md +++ b/docs/models/erl.md @@ -7,8 +7,8 @@ import { Erl } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: Erl = { algo: "fixed_window", - window: 1481.41, - limit: 9818.29, + window: 6394.73, + limit: 3685.84, keys: [ "", ], diff --git a/docs/models/events.md b/docs/models/events.md index f0883be5..2516e693 100644 --- a/docs/models/events.md +++ b/docs/models/events.md @@ -5,11 +5,11 @@ ```typescript import { Events } from "@vercel/sdk/models/createwebhookop.js"; -let value: Events = "deployment.integration.action.cancel"; +let value: Events = "deployment"; ``` ## Values ```typescript -"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" +"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "integration-resource.project-connected" | "integration-resource.project-disconnected" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" ``` \ No newline at end of file diff --git a/docs/models/filterprojectenvsrequest.md b/docs/models/filterprojectenvsrequest.md index c573d5e5..387e59da 100644 --- a/docs/models/filterprojectenvsrequest.md +++ b/docs/models/filterprojectenvsrequest.md @@ -9,6 +9,8 @@ let value: FilterProjectEnvsRequest = { idOrName: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA", gitBranch: "feature-1", source: "vercel-cli:pull", + customEnvironmentId: "env_123abc4567", + customEnvironmentSlug: "my-custom-env", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", }; @@ -22,5 +24,7 @@ let value: FilterProjectEnvsRequest = { | `gitBranch` | *string* | :heavy_minus_sign: | If defined, the git branch of the environment variable to filter the results (must have target=preview) | feature-1 | | `decrypt` | [models.Decrypt](../models/decrypt.md) | :heavy_minus_sign: | If true, the environment variable value will be decrypted | true | | `source` | *string* | :heavy_minus_sign: | The source that is calling the endpoint. | vercel-cli:pull | +| `customEnvironmentId` | *string* | :heavy_minus_sign: | The unique custom environment identifier within the project | env_123abc4567 | +| `customEnvironmentSlug` | *string* | :heavy_minus_sign: | The custom environment slug (name) within the project | my-custom-env | | `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | | `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | \ No newline at end of file diff --git a/docs/models/filterprojectenvsresponsebodyprojectsresponse200type.md b/docs/models/filterprojectenvsresponsebodyprojectsresponse200type.md index 2144d447..bf6d4c6f 100644 --- a/docs/models/filterprojectenvsresponsebodyprojectsresponse200type.md +++ b/docs/models/filterprojectenvsresponsebodyprojectsresponse200type.md @@ -5,7 +5,7 @@ ```typescript import { FilterProjectEnvsResponseBodyProjectsResponse200Type } from "@vercel/sdk/models/filterprojectenvsop.js"; -let value: FilterProjectEnvsResponseBodyProjectsResponse200Type = "sensitive"; +let value: FilterProjectEnvsResponseBodyProjectsResponse200Type = "system"; ``` ## Values diff --git a/docs/models/filterprojectenvsresponsebodyprojectsresponsetarget.md b/docs/models/filterprojectenvsresponsebodyprojectsresponsetarget.md index 0961a5c8..85b0ea3e 100644 --- a/docs/models/filterprojectenvsresponsebodyprojectsresponsetarget.md +++ b/docs/models/filterprojectenvsresponsebodyprojectsresponsetarget.md @@ -7,13 +7,13 @@ ```typescript const value: models.FilterProjectEnvsTargetProjects1[] = [ - "production", + "preview", ]; ``` ### `models.FilterProjectEnvsTargetProjectsResponse2` ```typescript -const value: models.FilterProjectEnvsTargetProjectsResponse2 = "production"; +const value: models.FilterProjectEnvsTargetProjectsResponse2 = "development"; ``` diff --git a/docs/models/filterprojectenvsresponsebodyprojectstarget.md b/docs/models/filterprojectenvsresponsebodyprojectstarget.md index e5dec902..b702158b 100644 --- a/docs/models/filterprojectenvsresponsebodyprojectstarget.md +++ b/docs/models/filterprojectenvsresponsebodyprojectstarget.md @@ -7,7 +7,7 @@ ```typescript const value: models.FilterProjectEnvsTarget1[] = [ - "preview", + "development", ]; ``` diff --git a/docs/models/filterprojectenvsresponsebodytarget.md b/docs/models/filterprojectenvsresponsebodytarget.md index 50dc5671..2c7b191e 100644 --- a/docs/models/filterprojectenvsresponsebodytarget.md +++ b/docs/models/filterprojectenvsresponsebodytarget.md @@ -14,6 +14,6 @@ const value: string[] = [ ### `models.FilterProjectEnvsTarget2` ```typescript -const value: models.FilterProjectEnvsTarget2 = "development"; +const value: models.FilterProjectEnvsTarget2 = "production"; ``` diff --git a/docs/models/filterprojectenvsresponsebodytype.md b/docs/models/filterprojectenvsresponsebodytype.md index c7b66381..ebbfa231 100644 --- a/docs/models/filterprojectenvsresponsebodytype.md +++ b/docs/models/filterprojectenvsresponsebodytype.md @@ -5,7 +5,7 @@ ```typescript import { FilterProjectEnvsResponseBodyType } from "@vercel/sdk/models/filterprojectenvsop.js"; -let value: FilterProjectEnvsResponseBodyType = "encrypted"; +let value: FilterProjectEnvsResponseBodyType = "plain"; ``` ## Values diff --git a/docs/models/filterprojectenvstarget1.md b/docs/models/filterprojectenvstarget1.md index 72d5a3c6..572ca6cb 100644 --- a/docs/models/filterprojectenvstarget1.md +++ b/docs/models/filterprojectenvstarget1.md @@ -5,7 +5,7 @@ ```typescript import { FilterProjectEnvsTarget1 } from "@vercel/sdk/models/filterprojectenvsop.js"; -let value: FilterProjectEnvsTarget1 = "production"; +let value: FilterProjectEnvsTarget1 = "preview"; ``` ## Values diff --git a/docs/models/filterprojectenvstarget2.md b/docs/models/filterprojectenvstarget2.md index f2c3adcb..9b024171 100644 --- a/docs/models/filterprojectenvstarget2.md +++ b/docs/models/filterprojectenvstarget2.md @@ -5,7 +5,7 @@ ```typescript import { FilterProjectEnvsTarget2 } from "@vercel/sdk/models/filterprojectenvsop.js"; -let value: FilterProjectEnvsTarget2 = "preview"; +let value: FilterProjectEnvsTarget2 = "production"; ``` ## Values diff --git a/docs/models/filterprojectenvstargetprojects1.md b/docs/models/filterprojectenvstargetprojects1.md index 777b5aa8..2fcd1784 100644 --- a/docs/models/filterprojectenvstargetprojects1.md +++ b/docs/models/filterprojectenvstargetprojects1.md @@ -5,7 +5,7 @@ ```typescript import { FilterProjectEnvsTargetProjects1 } from "@vercel/sdk/models/filterprojectenvsop.js"; -let value: FilterProjectEnvsTargetProjects1 = "preview"; +let value: FilterProjectEnvsTargetProjects1 = "production"; ``` ## Values diff --git a/docs/models/filterprojectenvstargetprojects2.md b/docs/models/filterprojectenvstargetprojects2.md index 804d9ca2..e7492cf3 100644 --- a/docs/models/filterprojectenvstargetprojects2.md +++ b/docs/models/filterprojectenvstargetprojects2.md @@ -5,7 +5,7 @@ ```typescript import { FilterProjectEnvsTargetProjects2 } from "@vercel/sdk/models/filterprojectenvsop.js"; -let value: FilterProjectEnvsTargetProjects2 = "development"; +let value: FilterProjectEnvsTargetProjects2 = "preview"; ``` ## Values diff --git a/docs/models/functiondefaultmemorytype.md b/docs/models/functiondefaultmemorytype.md index 95c7c299..be2b3b80 100644 --- a/docs/models/functiondefaultmemorytype.md +++ b/docs/models/functiondefaultmemorytype.md @@ -5,7 +5,7 @@ ```typescript import { FunctionDefaultMemoryType } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: FunctionDefaultMemoryType = "standard"; +let value: FunctionDefaultMemoryType = "standard_legacy"; ``` ## Values diff --git a/docs/models/getaliasprotectionbypass.md b/docs/models/getaliasprotectionbypass.md index 67b0e498..806bd4b8 100644 --- a/docs/models/getaliasprotectionbypass.md +++ b/docs/models/getaliasprotectionbypass.md @@ -7,7 +7,7 @@ ```typescript const value: models.ProtectionBypass1 = { - createdAt: 8818.27, + createdAt: 9668.01, createdBy: "", scope: "shareable-link", }; @@ -17,10 +17,10 @@ const value: models.ProtectionBypass1 = { ```typescript const value: models.ProtectionBypass2 = { - createdAt: 3691.61, - lastUpdatedAt: 6325.09, + createdAt: 9345.61, + lastUpdatedAt: 9215.48, lastUpdatedBy: "", - access: "granted", + access: "requested", scope: "user", }; ``` @@ -29,7 +29,7 @@ const value: models.ProtectionBypass2 = { ```typescript const value: models.ProtectionBypass3 = { - createdAt: 1377.25, + createdAt: 5890.14, createdBy: "", scope: "alias-protection-override", }; @@ -39,8 +39,8 @@ const value: models.ProtectionBypass3 = { ```typescript const value: models.ProtectionBypass4 = { - createdAt: 6490.70, - lastUpdatedAt: 8560.35, + createdAt: 2566.32, + lastUpdatedAt: 5646.47, lastUpdatedBy: "", scope: "email_invite", }; diff --git a/docs/models/getallcheckscls.md b/docs/models/getallcheckscls.md index 31107f8c..3dd3e187 100644 --- a/docs/models/getallcheckscls.md +++ b/docs/models/getallcheckscls.md @@ -6,7 +6,7 @@ import { GetAllChecksCLS } from "@vercel/sdk/models/getallchecksop.js"; let value: GetAllChecksCLS = { - value: 6924.72, + value: 5232.48, source: "web-vitals", }; ``` diff --git a/docs/models/getallchecksconclusion.md b/docs/models/getallchecksconclusion.md index d7706154..b2956809 100644 --- a/docs/models/getallchecksconclusion.md +++ b/docs/models/getallchecksconclusion.md @@ -5,7 +5,7 @@ ```typescript import { GetAllChecksConclusion } from "@vercel/sdk/models/getallchecksop.js"; -let value: GetAllChecksConclusion = "failed"; +let value: GetAllChecksConclusion = "skipped"; ``` ## Values diff --git a/docs/models/getallchecksfcp.md b/docs/models/getallchecksfcp.md index 73bbfd74..246f4226 100644 --- a/docs/models/getallchecksfcp.md +++ b/docs/models/getallchecksfcp.md @@ -6,7 +6,7 @@ import { GetAllChecksFCP } from "@vercel/sdk/models/getallchecksop.js"; let value: GetAllChecksFCP = { - value: 4142.63, + value: 5666.02, source: "web-vitals", }; ``` diff --git a/docs/models/getallcheckslcp.md b/docs/models/getallcheckslcp.md index ae61a4c2..bb88b7a9 100644 --- a/docs/models/getallcheckslcp.md +++ b/docs/models/getallcheckslcp.md @@ -6,7 +6,7 @@ import { GetAllChecksLCP } from "@vercel/sdk/models/getallchecksop.js"; let value: GetAllChecksLCP = { - value: 641.47, + value: 2653.89, source: "web-vitals", }; ``` diff --git a/docs/models/getallchecksmetrics.md b/docs/models/getallchecksmetrics.md index 93894cc9..b031c800 100644 --- a/docs/models/getallchecksmetrics.md +++ b/docs/models/getallchecksmetrics.md @@ -7,19 +7,19 @@ import { GetAllChecksMetrics } from "@vercel/sdk/models/getallchecksop.js"; let value: GetAllChecksMetrics = { fcp: { - value: 5232.48, + value: 9292.97, source: "web-vitals", }, lcp: { - value: 939.41, + value: 3185.69, source: "web-vitals", }, cls: { - value: 5759.46, + value: 6674.11, source: "web-vitals", }, tbt: { - value: 9292.96, + value: 1317.97, source: "web-vitals", }, }; diff --git a/docs/models/getallchecksresponsebody.md b/docs/models/getallchecksresponsebody.md index 0c7b306a..3af25170 100644 --- a/docs/models/getallchecksresponsebody.md +++ b/docs/models/getallchecksresponsebody.md @@ -8,13 +8,13 @@ import { GetAllChecksResponseBody } from "@vercel/sdk/models/getallchecksop.js"; let value: GetAllChecksResponseBody = { checks: [ { - createdAt: 2894.06, + createdAt: 201.07, id: "", integrationId: "", name: "", rerequestable: false, - status: "registered", - updatedAt: 5865.13, + status: "completed", + updatedAt: 46.95, }, ], }; diff --git a/docs/models/getallchecksstatus.md b/docs/models/getallchecksstatus.md index 75759bc8..9505057e 100644 --- a/docs/models/getallchecksstatus.md +++ b/docs/models/getallchecksstatus.md @@ -5,7 +5,7 @@ ```typescript import { GetAllChecksStatus } from "@vercel/sdk/models/getallchecksop.js"; -let value: GetAllChecksStatus = "registered"; +let value: GetAllChecksStatus = "completed"; ``` ## Values diff --git a/docs/models/getallcheckstbt.md b/docs/models/getallcheckstbt.md index 0b472bbd..ebc8e906 100644 --- a/docs/models/getallcheckstbt.md +++ b/docs/models/getallcheckstbt.md @@ -6,7 +6,7 @@ import { GetAllChecksTBT } from "@vercel/sdk/models/getallchecksop.js"; let value: GetAllChecksTBT = { - value: 5666.01, + value: 939.4, source: "web-vitals", }; ``` diff --git a/docs/models/getallchecksvirtualexperiencescore.md b/docs/models/getallchecksvirtualexperiencescore.md index 40194762..528c5b43 100644 --- a/docs/models/getallchecksvirtualexperiencescore.md +++ b/docs/models/getallchecksvirtualexperiencescore.md @@ -6,7 +6,7 @@ import { GetAllChecksVirtualExperienceScore } from "@vercel/sdk/models/getallchecksop.js"; let value: GetAllChecksVirtualExperienceScore = { - value: 2653.89, + value: 5759.47, source: "web-vitals", }; ``` diff --git a/docs/models/getalllogdrainsdisabledreason.md b/docs/models/getalllogdrainsdisabledreason.md index 16496e5a..206291e6 100644 --- a/docs/models/getalllogdrainsdisabledreason.md +++ b/docs/models/getalllogdrainsdisabledreason.md @@ -5,7 +5,7 @@ ```typescript import { GetAllLogDrainsDisabledReason } from "@vercel/sdk/models/getalllogdrainsop.js"; -let value: GetAllLogDrainsDisabledReason = "disabled-by-admin"; +let value: GetAllLogDrainsDisabledReason = "account-plan-downgrade"; ``` ## Values diff --git a/docs/models/getalllogdrainsenvironments.md b/docs/models/getalllogdrainsenvironments.md index a81172aa..c49c6605 100644 --- a/docs/models/getalllogdrainsenvironments.md +++ b/docs/models/getalllogdrainsenvironments.md @@ -5,7 +5,7 @@ ```typescript import { GetAllLogDrainsEnvironments } from "@vercel/sdk/models/getalllogdrainsop.js"; -let value: GetAllLogDrainsEnvironments = "production"; +let value: GetAllLogDrainsEnvironments = "preview"; ``` ## Values diff --git a/docs/models/getalllogdrainsresponsebody.md b/docs/models/getalllogdrainsresponsebody.md index 10399f75..0d1b9ccc 100644 --- a/docs/models/getalllogdrainsresponsebody.md +++ b/docs/models/getalllogdrainsresponsebody.md @@ -8,12 +8,12 @@ import { GetAllLogDrainsResponseBody } from "@vercel/sdk/models/getalllogdrainso let value: GetAllLogDrainsResponseBody = { id: "", deliveryFormat: "ndjson", - url: "https://splendid-procurement.org/", + url: "https://acidic-almighty.name", name: "", ownerId: "", - createdAt: 2172.76, - deletedAt: 1149.24, - updatedAt: 7240.73, + createdAt: 3114.49, + deletedAt: 2482.76, + updatedAt: 2779.35, environments: [ "production", ], diff --git a/docs/models/getalllogdrainssources.md b/docs/models/getalllogdrainssources.md index a51ae712..00378575 100644 --- a/docs/models/getalllogdrainssources.md +++ b/docs/models/getalllogdrainssources.md @@ -5,7 +5,7 @@ ```typescript import { GetAllLogDrainsSources } from "@vercel/sdk/models/getalllogdrainsop.js"; -let value: GetAllLogDrainsSources = "firewall"; +let value: GetAllLogDrainsSources = "edge"; ``` ## Values diff --git a/docs/models/getalllogdrainsstatus.md b/docs/models/getalllogdrainsstatus.md index 8b1f5700..6bf6f429 100644 --- a/docs/models/getalllogdrainsstatus.md +++ b/docs/models/getalllogdrainsstatus.md @@ -5,7 +5,7 @@ ```typescript import { GetAllLogDrainsStatus } from "@vercel/sdk/models/getalllogdrainsop.js"; -let value: GetAllLogDrainsStatus = "enabled"; +let value: GetAllLogDrainsStatus = "disabled"; ``` ## Values diff --git a/docs/models/getbypassiprequest.md b/docs/models/getbypassiprequest.md new file mode 100644 index 00000000..cd4b7c27 --- /dev/null +++ b/docs/models/getbypassiprequest.md @@ -0,0 +1,27 @@ +# GetBypassIpRequest + +## Example Usage + +```typescript +import { GetBypassIpRequest } from "@vercel/sdk/models/getbypassipop.js"; + +let value: GetBypassIpRequest = { + projectId: "", + limit: 10, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `projectId` | *string* | :heavy_check_mark: | N/A | | +| `limit` | *number* | :heavy_minus_sign: | N/A | 10 | +| `sourceIp` | *string* | :heavy_minus_sign: | Filter by source IP | | +| `domain` | *string* | :heavy_minus_sign: | Filter by domain | | +| `projectScope` | *boolean* | :heavy_minus_sign: | Filter by project scoped rules | | +| `offset` | *string* | :heavy_minus_sign: | Used for pagination. Retrieves results after the provided id | | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | \ No newline at end of file diff --git a/docs/models/getbypassipresponsebody.md b/docs/models/getbypassipresponsebody.md new file mode 100644 index 00000000..ce6e592b --- /dev/null +++ b/docs/models/getbypassipresponsebody.md @@ -0,0 +1,29 @@ +# GetBypassIpResponseBody + + +## Supported Types + +### `models.GetBypassIpResponseBody1` + +```typescript +const value: models.GetBypassIpResponseBody1 = { + result: [ + { + ownerId: "", + id: "", + domain: "dramatic-coast.org", + ip: "45.255.79.31", + projectId: "", + isProjectRule: false, + }, + ], + pagination: "", +}; +``` + +### `models.GetBypassIpResponseBody2` + +```typescript +const value: models.GetBypassIpResponseBody2 = {}; +``` + diff --git a/docs/models/getbypassipresponsebody1.md b/docs/models/getbypassipresponsebody1.md new file mode 100644 index 00000000..3da7d217 --- /dev/null +++ b/docs/models/getbypassipresponsebody1.md @@ -0,0 +1,28 @@ +# GetBypassIpResponseBody1 + +## Example Usage + +```typescript +import { GetBypassIpResponseBody1 } from "@vercel/sdk/models/getbypassipop.js"; + +let value: GetBypassIpResponseBody1 = { + result: [ + { + ownerId: "", + id: "", + domain: "perky-mouser.name", + ip: "2135:dd5a:a9ba:a3bc:3ad4:a1ea:729e:26ce", + projectId: "", + isProjectRule: false, + }, + ], + pagination: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `result` | [models.ResponseBodyResult](../models/responsebodyresult.md)[] | :heavy_check_mark: | N/A | +| `pagination` | *any* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getbypassipresponsebody2.md b/docs/models/getbypassipresponsebody2.md new file mode 100644 index 00000000..6b1ed117 --- /dev/null +++ b/docs/models/getbypassipresponsebody2.md @@ -0,0 +1,16 @@ +# GetBypassIpResponseBody2 + +## Example Usage + +```typescript +import { GetBypassIpResponseBody2 } from "@vercel/sdk/models/getbypassipop.js"; + +let value: GetBypassIpResponseBody2 = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `result` | [models.GetBypassIpResponseBodyResult](../models/getbypassipresponsebodyresult.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [models.GetBypassIpResponseBodyPagination](../models/getbypassipresponsebodypagination.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getbypassipresponsebodypagination.md b/docs/models/getbypassipresponsebodypagination.md new file mode 100644 index 00000000..48dbfb1e --- /dev/null +++ b/docs/models/getbypassipresponsebodypagination.md @@ -0,0 +1,19 @@ +# GetBypassIpResponseBodyPagination + +## Example Usage + +```typescript +import { GetBypassIpResponseBodyPagination } from "@vercel/sdk/models/getbypassipop.js"; + +let value: GetBypassIpResponseBodyPagination = { + ownerId: "", + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ownerId` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getbypassipresponsebodyresult.md b/docs/models/getbypassipresponsebodyresult.md new file mode 100644 index 00000000..e086ab5f --- /dev/null +++ b/docs/models/getbypassipresponsebodyresult.md @@ -0,0 +1,36 @@ +# GetBypassIpResponseBodyResult + +## Example Usage + +```typescript +import { GetBypassIpResponseBodyResult } from "@vercel/sdk/models/getbypassipop.js"; + +let value: GetBypassIpResponseBodyResult = { + ownerId: "", + id: "", + domain: "glaring-obesity.info", + ip: "168.95.200.106", + createdAt: "1721557649449", + updatedAt: "1737046440191", + updatedAtHour: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `ownerId` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `ip` | *string* | :heavy_check_mark: | N/A | +| `action` | [models.ResponseBodyAction](../models/responsebodyaction.md) | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | +| `isProjectRule` | *boolean* | :heavy_minus_sign: | N/A | +| `note` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_check_mark: | N/A | +| `actorId` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *string* | :heavy_check_mark: | N/A | +| `updatedAtHour` | *string* | :heavy_check_mark: | N/A | +| `deletedAt` | *string* | :heavy_minus_sign: | N/A | +| `expiresAt` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getcertbyidresponsebody.md b/docs/models/getcertbyidresponsebody.md index 9be8183e..136a7893 100644 --- a/docs/models/getcertbyidresponsebody.md +++ b/docs/models/getcertbyidresponsebody.md @@ -7,8 +7,8 @@ import { GetCertByIdResponseBody } from "@vercel/sdk/models/getcertbyidop.js"; let value: GetCertByIdResponseBody = { id: "", - createdAt: 9798.64, - expiresAt: 8672.86, + createdAt: 5678.21, + expiresAt: 1395.05, autoRenew: false, cns: [ "", diff --git a/docs/models/getcheckcls.md b/docs/models/getcheckcls.md index efa14651..7a78c185 100644 --- a/docs/models/getcheckcls.md +++ b/docs/models/getcheckcls.md @@ -6,7 +6,7 @@ import { GetCheckCLS } from "@vercel/sdk/models/getcheckop.js"; let value: GetCheckCLS = { - value: 2700.08, + value: 2487.53, source: "web-vitals", }; ``` diff --git a/docs/models/getcheckconclusion.md b/docs/models/getcheckconclusion.md index bf609889..eb69add4 100644 --- a/docs/models/getcheckconclusion.md +++ b/docs/models/getcheckconclusion.md @@ -5,7 +5,7 @@ ```typescript import { GetCheckConclusion } from "@vercel/sdk/models/getcheckop.js"; -let value: GetCheckConclusion = "skipped"; +let value: GetCheckConclusion = "failed"; ``` ## Values diff --git a/docs/models/getcheckfcp.md b/docs/models/getcheckfcp.md index a420bc65..10514602 100644 --- a/docs/models/getcheckfcp.md +++ b/docs/models/getcheckfcp.md @@ -6,7 +6,7 @@ import { GetCheckFCP } from "@vercel/sdk/models/getcheckop.js"; let value: GetCheckFCP = { - value: 46.95, + value: 7351.94, source: "web-vitals", }; ``` diff --git a/docs/models/getchecklcp.md b/docs/models/getchecklcp.md index 32f25197..c18b8f38 100644 --- a/docs/models/getchecklcp.md +++ b/docs/models/getchecklcp.md @@ -6,7 +6,7 @@ import { GetCheckLCP } from "@vercel/sdk/models/getcheckop.js"; let value: GetCheckLCP = { - value: 6778.17, + value: 9621.89, source: "web-vitals", }; ``` diff --git a/docs/models/getcheckmetrics.md b/docs/models/getcheckmetrics.md index ceebdca5..9909fd00 100644 --- a/docs/models/getcheckmetrics.md +++ b/docs/models/getcheckmetrics.md @@ -7,19 +7,19 @@ import { GetCheckMetrics } from "@vercel/sdk/models/getcheckop.js"; let value: GetCheckMetrics = { fcp: { - value: 2487.53, + value: 5722.52, source: "web-vitals", }, lcp: { - value: 5761.57, + value: 2230.81, source: "web-vitals", }, cls: { - value: 5920.42, + value: 9527.49, source: "web-vitals", }, tbt: { - value: 5722.52, + value: 4471.25, source: "web-vitals", }, }; diff --git a/docs/models/getcheckresponsebody.md b/docs/models/getcheckresponsebody.md index 2460b54a..4e10df46 100644 --- a/docs/models/getcheckresponsebody.md +++ b/docs/models/getcheckresponsebody.md @@ -8,12 +8,12 @@ import { GetCheckResponseBody } from "@vercel/sdk/models/getcheckop.js"; let value: GetCheckResponseBody = { id: "", name: "", - status: "registered", + status: "completed", blocking: false, integrationId: "", deploymentId: "", - createdAt: 9527.49, - updatedAt: 4471.25, + createdAt: 6994.79, + updatedAt: 2974.37, }; ``` diff --git a/docs/models/getcheckstatus.md b/docs/models/getcheckstatus.md index aa38b59d..3114c64a 100644 --- a/docs/models/getcheckstatus.md +++ b/docs/models/getcheckstatus.md @@ -5,7 +5,7 @@ ```typescript import { GetCheckStatus } from "@vercel/sdk/models/getcheckop.js"; -let value: GetCheckStatus = "registered"; +let value: GetCheckStatus = "completed"; ``` ## Values diff --git a/docs/models/getchecktbt.md b/docs/models/getchecktbt.md index 1d671a0b..8d2fb1c8 100644 --- a/docs/models/getchecktbt.md +++ b/docs/models/getchecktbt.md @@ -6,7 +6,7 @@ import { GetCheckTBT } from "@vercel/sdk/models/getcheckop.js"; let value: GetCheckTBT = { - value: 7351.94, + value: 5761.57, source: "web-vitals", }; ``` diff --git a/docs/models/getcheckvirtualexperiencescore.md b/docs/models/getcheckvirtualexperiencescore.md index a25912f2..9e9306ac 100644 --- a/docs/models/getcheckvirtualexperiencescore.md +++ b/docs/models/getcheckvirtualexperiencescore.md @@ -6,7 +6,7 @@ import { GetCheckVirtualExperienceScore } from "@vercel/sdk/models/getcheckop.js"; let value: GetCheckVirtualExperienceScore = { - value: 9621.89, + value: 5920.42, source: "web-vitals", }; ``` diff --git a/docs/models/getconfigurablelogdraindeliveryformat.md b/docs/models/getconfigurablelogdraindeliveryformat.md index 22c41d29..93d86d4d 100644 --- a/docs/models/getconfigurablelogdraindeliveryformat.md +++ b/docs/models/getconfigurablelogdraindeliveryformat.md @@ -5,7 +5,7 @@ ```typescript import { GetConfigurableLogDrainDeliveryFormat } from "@vercel/sdk/models/getconfigurablelogdrainop.js"; -let value: GetConfigurableLogDrainDeliveryFormat = "ndjson"; +let value: GetConfigurableLogDrainDeliveryFormat = "syslog"; ``` ## Values diff --git a/docs/models/getconfigurablelogdrainresponsebody.md b/docs/models/getconfigurablelogdrainresponsebody.md index a6976ed1..627c78f7 100644 --- a/docs/models/getconfigurablelogdrainresponsebody.md +++ b/docs/models/getconfigurablelogdrainresponsebody.md @@ -7,15 +7,15 @@ import { GetConfigurableLogDrainResponseBody } from "@vercel/sdk/models/getconfi let value: GetConfigurableLogDrainResponseBody = { id: "", - deliveryFormat: "syslog", - url: "https://raw-slide.biz", + deliveryFormat: "json", + url: "https://gleaming-skean.name/", name: "", ownerId: "", - createdAt: 3259.24, - deletedAt: 7083.60, - updatedAt: 3927.59, + createdAt: 458.5, + deletedAt: 4638.95, + updatedAt: 6839.8, environments: [ - "production", + "preview", ], secret: "", }; diff --git a/docs/models/getconfigurablelogdrainsources.md b/docs/models/getconfigurablelogdrainsources.md index 433193bf..ab71d63c 100644 --- a/docs/models/getconfigurablelogdrainsources.md +++ b/docs/models/getconfigurablelogdrainsources.md @@ -5,7 +5,7 @@ ```typescript import { GetConfigurableLogDrainSources } from "@vercel/sdk/models/getconfigurablelogdrainop.js"; -let value: GetConfigurableLogDrainSources = "build"; +let value: GetConfigurableLogDrainSources = "firewall"; ``` ## Values diff --git a/docs/models/getconfigurationresponsebodybillingplan.md b/docs/models/getconfigurationresponsebodybillingplan.md index 8670c273..9b17535f 100644 --- a/docs/models/getconfigurationresponsebodybillingplan.md +++ b/docs/models/getconfigurationresponsebodybillingplan.md @@ -9,7 +9,7 @@ let value: GetConfigurationResponseBodyBillingPlan = { id: "", type: "subscription", name: "", - description: "bar successfully best", + description: "anti oh conservation throughout shoulder lest blah pfft pigpen", }; ``` diff --git a/docs/models/getconfigurationresponsebodydisabledreason.md b/docs/models/getconfigurationresponsebodydisabledreason.md index 17e16000..82f2032c 100644 --- a/docs/models/getconfigurationresponsebodydisabledreason.md +++ b/docs/models/getconfigurationresponsebodydisabledreason.md @@ -5,7 +5,8 @@ ```typescript import { GetConfigurationResponseBodyDisabledReason } from "@vercel/sdk/models/getconfigurationop.js"; -let value: GetConfigurationResponseBodyDisabledReason = "disabled-by-admin"; +let value: GetConfigurationResponseBodyDisabledReason = + "original-owner-role-downgraded"; ``` ## Values diff --git a/docs/models/getconfigurationresponsebodyinstallationtype.md b/docs/models/getconfigurationresponsebodyinstallationtype.md index 12aecb7b..72e9ed9a 100644 --- a/docs/models/getconfigurationresponsebodyinstallationtype.md +++ b/docs/models/getconfigurationresponsebodyinstallationtype.md @@ -7,7 +7,7 @@ Defines the installation type. - 'external' integrations are installed via the e ```typescript import { GetConfigurationResponseBodyInstallationType } from "@vercel/sdk/models/getconfigurationop.js"; -let value: GetConfigurationResponseBodyInstallationType = "external"; +let value: GetConfigurationResponseBodyInstallationType = "marketplace"; ``` ## Values diff --git a/docs/models/getconfigurationresponsebodyintegrationsdisabledreason.md b/docs/models/getconfigurationresponsebodyintegrationsdisabledreason.md index 947f6dcc..ce282f88 100644 --- a/docs/models/getconfigurationresponsebodyintegrationsdisabledreason.md +++ b/docs/models/getconfigurationresponsebodyintegrationsdisabledreason.md @@ -6,7 +6,7 @@ import { GetConfigurationResponseBodyIntegrationsDisabledReason } from "@vercel/sdk/models/getconfigurationop.js"; let value: GetConfigurationResponseBodyIntegrationsDisabledReason = - "disabled-by-owner"; + "disabled-by-admin"; ``` ## Values diff --git a/docs/models/getconfigurationresponsebodyintegrationsinstallationtype.md b/docs/models/getconfigurationresponsebodyintegrationsinstallationtype.md index 2e25f0bf..e661b477 100644 --- a/docs/models/getconfigurationresponsebodyintegrationsinstallationtype.md +++ b/docs/models/getconfigurationresponsebodyintegrationsinstallationtype.md @@ -8,7 +8,7 @@ Defines the installation type. - 'external' integrations are installed via the e import { GetConfigurationResponseBodyIntegrationsInstallationType } from "@vercel/sdk/models/getconfigurationop.js"; let value: GetConfigurationResponseBodyIntegrationsInstallationType = - "marketplace"; + "external"; ``` ## Values diff --git a/docs/models/getconfigurationresponsebodyintegrationsresponsetype.md b/docs/models/getconfigurationresponsebodyintegrationsresponsetype.md index f6824f12..6c4f92d4 100644 --- a/docs/models/getconfigurationresponsebodyintegrationsresponsetype.md +++ b/docs/models/getconfigurationresponsebodyintegrationsresponsetype.md @@ -5,7 +5,8 @@ ```typescript import { GetConfigurationResponseBodyIntegrationsResponseType } from "@vercel/sdk/models/getconfigurationop.js"; -let value: GetConfigurationResponseBodyIntegrationsResponseType = "prepayment"; +let value: GetConfigurationResponseBodyIntegrationsResponseType = + "subscription"; ``` ## Values diff --git a/docs/models/getconfigurationresponsebodyquote.md b/docs/models/getconfigurationresponsebodyquote.md index 0f7559ca..636111ec 100644 --- a/docs/models/getconfigurationresponsebodyquote.md +++ b/docs/models/getconfigurationresponsebodyquote.md @@ -7,7 +7,7 @@ import { GetConfigurationResponseBodyQuote } from "@vercel/sdk/models/getconfigu let value: GetConfigurationResponseBodyQuote = { line: "", - amount: "474.87", + amount: "643.87", }; ``` diff --git a/docs/models/getconfigurationresponsebodyscope.md b/docs/models/getconfigurationresponsebodyscope.md index a5903524..f46a9d48 100644 --- a/docs/models/getconfigurationresponsebodyscope.md +++ b/docs/models/getconfigurationresponsebodyscope.md @@ -5,7 +5,7 @@ ```typescript import { GetConfigurationResponseBodyScope } from "@vercel/sdk/models/getconfigurationop.js"; -let value: GetConfigurationResponseBodyScope = "resource"; +let value: GetConfigurationResponseBodyScope = "installation"; ``` ## Values diff --git a/docs/models/getconfigurationsresponsebodydisabledreason.md b/docs/models/getconfigurationsresponsebodydisabledreason.md index 0f76d27c..f04caaca 100644 --- a/docs/models/getconfigurationsresponsebodydisabledreason.md +++ b/docs/models/getconfigurationsresponsebodydisabledreason.md @@ -5,8 +5,7 @@ ```typescript import { GetConfigurationsResponseBodyDisabledReason } from "@vercel/sdk/models/getconfigurationsop.js"; -let value: GetConfigurationsResponseBodyDisabledReason = - "feature-not-available"; +let value: GetConfigurationsResponseBodyDisabledReason = "disabled-by-admin"; ``` ## Values diff --git a/docs/models/getconfigurationsresponsebodyintegrationsresponse200type.md b/docs/models/getconfigurationsresponsebodyintegrationsresponse200type.md index 8c0336ef..dc88aec6 100644 --- a/docs/models/getconfigurationsresponsebodyintegrationsresponse200type.md +++ b/docs/models/getconfigurationsresponsebodyintegrationsresponse200type.md @@ -6,7 +6,7 @@ import { GetConfigurationsResponseBodyIntegrationsResponse200Type } from "@vercel/sdk/models/getconfigurationsop.js"; let value: GetConfigurationsResponseBodyIntegrationsResponse200Type = - "subscription"; + "prepayment"; ``` ## Values diff --git a/docs/models/getconfigurationsresponsebodyscope.md b/docs/models/getconfigurationsresponsebodyscope.md index ab608da6..92361c50 100644 --- a/docs/models/getconfigurationsresponsebodyscope.md +++ b/docs/models/getconfigurationsresponsebodyscope.md @@ -5,7 +5,7 @@ ```typescript import { GetConfigurationsResponseBodyScope } from "@vercel/sdk/models/getconfigurationsop.js"; -let value: GetConfigurationsResponseBodyScope = "installation"; +let value: GetConfigurationsResponseBodyScope = "resource"; ``` ## Values diff --git a/docs/models/getdeploymentgitrepo1.md b/docs/models/getdeploymentgitrepo1.md index 8d90f7df..1937ce14 100644 --- a/docs/models/getdeploymentgitrepo1.md +++ b/docs/models/getdeploymentgitrepo1.md @@ -7,7 +7,7 @@ import { GetDeploymentGitRepo1 } from "@vercel/sdk/models/getdeploymentop.js"; let value: GetDeploymentGitRepo1 = { namespace: "", - projectId: 2445.70, + projectId: 2445.69, type: "gitlab", url: "https://small-creator.name/", path: "/home", diff --git a/docs/models/getdeploymentgitrepo2.md b/docs/models/getdeploymentgitrepo2.md index 20190a77..5b7ce53c 100644 --- a/docs/models/getdeploymentgitrepo2.md +++ b/docs/models/getdeploymentgitrepo2.md @@ -8,7 +8,7 @@ import { GetDeploymentGitRepo2 } from "@vercel/sdk/models/getdeploymentop.js"; let value: GetDeploymentGitRepo2 = { org: "", repo: "", - repoId: 9829.99, + repoId: 9830, type: "github", repoOwnerId: 9822.48, path: "/var/yp", diff --git a/docs/models/getdeploymentgitsource1.md b/docs/models/getdeploymentgitsource1.md index c6bcd952..4194ac6c 100644 --- a/docs/models/getdeploymentgitsource1.md +++ b/docs/models/getdeploymentgitsource1.md @@ -7,7 +7,7 @@ import { GetDeploymentGitSource1 } from "@vercel/sdk/models/getdeploymentop.js"; let value: GetDeploymentGitSource1 = { type: "github", - repoId: 3296.51, + repoId: "", }; ``` diff --git a/docs/models/getdeploymentgitsource3.md b/docs/models/getdeploymentgitsource3.md index ad0ef6cc..684fcd62 100644 --- a/docs/models/getdeploymentgitsource3.md +++ b/docs/models/getdeploymentgitsource3.md @@ -7,7 +7,7 @@ import { GetDeploymentGitSource3 } from "@vercel/sdk/models/getdeploymentop.js"; let value: GetDeploymentGitSource3 = { type: "gitlab", - projectId: "", + projectId: 3296.51, }; ``` diff --git a/docs/models/getdeploymentgitsource6.md b/docs/models/getdeploymentgitsource6.md index 0e3d0e38..eb5a067a 100644 --- a/docs/models/getdeploymentgitsource6.md +++ b/docs/models/getdeploymentgitsource6.md @@ -11,7 +11,7 @@ let value: GetDeploymentGitSource6 = { type: "custom", ref: "", sha: "", - gitUrl: "https://disloyal-vanadyl.biz/", + gitUrl: "https://gracious-packaging.biz", }; ``` diff --git a/docs/models/getdeploymentgitsource7.md b/docs/models/getdeploymentgitsource7.md index 620c05af..c4cfcda1 100644 --- a/docs/models/getdeploymentgitsource7.md +++ b/docs/models/getdeploymentgitsource7.md @@ -9,7 +9,7 @@ let value: GetDeploymentGitSource7 = { type: "github", ref: "", sha: "", - repoId: 5831.93, + repoId: 1989.11, }; ``` diff --git a/docs/models/getdeploymentgitsource8.md b/docs/models/getdeploymentgitsource8.md index 51be8f9b..0290710c 100644 --- a/docs/models/getdeploymentgitsource8.md +++ b/docs/models/getdeploymentgitsource8.md @@ -9,7 +9,7 @@ let value: GetDeploymentGitSource8 = { type: "gitlab", ref: "", sha: "", - projectId: 1280.21, + projectId: 20.64, }; ``` diff --git a/docs/models/getdeploymentgitsourcedeployments1.md b/docs/models/getdeploymentgitsourcedeployments1.md index e98f8939..078b1cf7 100644 --- a/docs/models/getdeploymentgitsourcedeployments1.md +++ b/docs/models/getdeploymentgitsourcedeployments1.md @@ -7,7 +7,7 @@ import { GetDeploymentGitSourceDeployments1 } from "@vercel/sdk/models/getdeploy let value: GetDeploymentGitSourceDeployments1 = { type: "github", - repoId: 8161.51, + repoId: 9114.51, }; ``` diff --git a/docs/models/getdeploymentgitsourcedeployments3.md b/docs/models/getdeploymentgitsourcedeployments3.md index 3a1811f1..143b6fe1 100644 --- a/docs/models/getdeploymentgitsourcedeployments3.md +++ b/docs/models/getdeploymentgitsourcedeployments3.md @@ -7,7 +7,7 @@ import { GetDeploymentGitSourceDeployments3 } from "@vercel/sdk/models/getdeploy let value: GetDeploymentGitSourceDeployments3 = { type: "gitlab", - projectId: 6495.34, + projectId: 9279.77, }; ``` diff --git a/docs/models/getdeploymentgitsourcedeployments6.md b/docs/models/getdeploymentgitsourcedeployments6.md index 05605684..0494a792 100644 --- a/docs/models/getdeploymentgitsourcedeployments6.md +++ b/docs/models/getdeploymentgitsourcedeployments6.md @@ -11,7 +11,7 @@ let value: GetDeploymentGitSourceDeployments6 = { type: "custom", ref: "", sha: "", - gitUrl: "https://ragged-hierarchy.biz", + gitUrl: "https://insignificant-council.info", }; ``` diff --git a/docs/models/getdeploymentgitsourcedeployments7.md b/docs/models/getdeploymentgitsourcedeployments7.md index b3e7deab..8628a358 100644 --- a/docs/models/getdeploymentgitsourcedeployments7.md +++ b/docs/models/getdeploymentgitsourcedeployments7.md @@ -9,7 +9,7 @@ let value: GetDeploymentGitSourceDeployments7 = { type: "github", ref: "", sha: "", - repoId: 7202.66, + repoId: 9253.95, }; ``` diff --git a/docs/models/getdeploymentgitsourcedeployments8.md b/docs/models/getdeploymentgitsourcedeployments8.md index 5f8fd64b..c574c81f 100644 --- a/docs/models/getdeploymentgitsourcedeployments8.md +++ b/docs/models/getdeploymentgitsourcedeployments8.md @@ -9,7 +9,7 @@ let value: GetDeploymentGitSourceDeployments8 = { type: "gitlab", ref: "", sha: "", - projectId: 1355.48, + projectId: 7202.66, }; ``` diff --git a/docs/models/getdeploymentgitsourcedeploymentsprojectid.md b/docs/models/getdeploymentgitsourcedeploymentsprojectid.md index 8caa35b8..61543a0f 100644 --- a/docs/models/getdeploymentgitsourcedeploymentsprojectid.md +++ b/docs/models/getdeploymentgitsourcedeploymentsprojectid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 6383.90; +const value: number = 9478.22; ``` diff --git a/docs/models/getdeploymentgitsourcedeploymentsrepoid.md b/docs/models/getdeploymentgitsourcedeploymentsrepoid.md index e7252ce7..a362e801 100644 --- a/docs/models/getdeploymentgitsourcedeploymentsrepoid.md +++ b/docs/models/getdeploymentgitsourcedeploymentsrepoid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 9478.22; +const value: number = 7917.62; ``` diff --git a/docs/models/getdeploymentgitsourceprojectid.md b/docs/models/getdeploymentgitsourceprojectid.md index 4563d840..001a03ba 100644 --- a/docs/models/getdeploymentgitsourceprojectid.md +++ b/docs/models/getdeploymentgitsourceprojectid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 3674.75; +const value: number = 7068.72; ``` diff --git a/docs/models/getdeploymentgitsourcerepoid.md b/docs/models/getdeploymentgitsourcerepoid.md index 78f7a480..381758c2 100644 --- a/docs/models/getdeploymentgitsourcerepoid.md +++ b/docs/models/getdeploymentgitsourcerepoid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 9279.76; +const value: number = 8668.61; ``` diff --git a/docs/models/getdeploymentresponsebody.md b/docs/models/getdeploymentresponsebody.md index 1023a0f6..8c7fed11 100644 --- a/docs/models/getdeploymentresponsebody.md +++ b/docs/models/getdeploymentresponsebody.md @@ -43,7 +43,7 @@ const value: models.GetDeploymentResponseBody1 = { "", ], url: "https://meager-scholarship.net", - version: 7935.67, + version: 7935.68, projectId: "", plan: "pro", createdIn: "", @@ -73,7 +73,7 @@ const value: models.GetDeploymentResponseBody2 = { status: "QUEUED", id: "", type: "LAMBDAS", - createdAt: 1023.17, + createdAt: 1023.16, name: "", readyState: "BUILDING", meta: { diff --git a/docs/models/getdeploymentresponsebody1.md b/docs/models/getdeploymentresponsebody1.md index bb93d50e..d7ef39ce 100644 --- a/docs/models/getdeploymentresponsebody1.md +++ b/docs/models/getdeploymentresponsebody1.md @@ -41,7 +41,7 @@ let value: GetDeploymentResponseBody1 = { "", ], url: "https://inferior-scale.net/", - version: 9163.40, + version: 9163.41, projectId: "", plan: "pro", createdIn: "", diff --git a/docs/models/getdeploymentresponsebody2.md b/docs/models/getdeploymentresponsebody2.md index 1b268ee4..a38ca8ac 100644 --- a/docs/models/getdeploymentresponsebody2.md +++ b/docs/models/getdeploymentresponsebody2.md @@ -9,27 +9,27 @@ import { GetDeploymentResponseBody2 } from "@vercel/sdk/models/getdeploymentop.j let value: GetDeploymentResponseBody2 = { aliasAssigned: false, - bootedAt: 6339.87, - buildingAt: 2305.71, + bootedAt: 2305.71, + buildingAt: 2687.09, buildSkipped: false, creator: { uid: "", }, public: false, - status: "BUILDING", + status: "READY", id: "", type: "LAMBDAS", - createdAt: 8002.56, + createdAt: 9555.69, name: "", - readyState: "CANCELED", + readyState: "BUILDING", meta: { "key": "", }, regions: [ "", ], - url: "https://supportive-brook.name/", - version: 7510.32, + url: "https://careless-overcoat.net", + version: 1559.78, }; ``` diff --git a/docs/models/getdeploymentresponsebodychecksstate.md b/docs/models/getdeploymentresponsebodychecksstate.md index 0a649c04..f00f8dca 100644 --- a/docs/models/getdeploymentresponsebodychecksstate.md +++ b/docs/models/getdeploymentresponsebodychecksstate.md @@ -5,7 +5,7 @@ ```typescript import { GetDeploymentResponseBodyChecksState } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodyChecksState = "completed"; +let value: GetDeploymentResponseBodyChecksState = "registered"; ``` ## Values diff --git a/docs/models/getdeploymentresponsebodydeploymentsreadystate.md b/docs/models/getdeploymentresponsebodydeploymentsreadystate.md index 9108aa19..c3962bc0 100644 --- a/docs/models/getdeploymentresponsebodydeploymentsreadystate.md +++ b/docs/models/getdeploymentresponsebodydeploymentsreadystate.md @@ -5,7 +5,7 @@ ```typescript import { GetDeploymentResponseBodyDeploymentsReadyState } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodyDeploymentsReadyState = "READY"; +let value: GetDeploymentResponseBodyDeploymentsReadyState = "BUILDING"; ``` ## Values diff --git a/docs/models/getdeploymentresponsebodydeploymentsresponsereadystate.md b/docs/models/getdeploymentresponsebodydeploymentsresponsereadystate.md index 96296b64..a30a9404 100644 --- a/docs/models/getdeploymentresponsebodydeploymentsresponsereadystate.md +++ b/docs/models/getdeploymentresponsebodydeploymentsresponsereadystate.md @@ -5,7 +5,8 @@ ```typescript import { GetDeploymentResponseBodyDeploymentsResponseReadyState } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodyDeploymentsResponseReadyState = "ERROR"; +let value: GetDeploymentResponseBodyDeploymentsResponseReadyState = + "INITIALIZING"; ``` ## Values diff --git a/docs/models/getdeploymentresponsebodydeploymentsstatus.md b/docs/models/getdeploymentresponsebodydeploymentsstatus.md index 3f723620..96ccdca5 100644 --- a/docs/models/getdeploymentresponsebodydeploymentsstatus.md +++ b/docs/models/getdeploymentresponsebodydeploymentsstatus.md @@ -5,7 +5,7 @@ ```typescript import { GetDeploymentResponseBodyDeploymentsStatus } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodyDeploymentsStatus = "timeout"; +let value: GetDeploymentResponseBodyDeploymentsStatus = "error"; ``` ## Values diff --git a/docs/models/getdeploymentresponsebodygitsource.md b/docs/models/getdeploymentresponsebodygitsource.md index be4258b7..1a3c386f 100644 --- a/docs/models/getdeploymentresponsebodygitsource.md +++ b/docs/models/getdeploymentresponsebodygitsource.md @@ -8,7 +8,7 @@ ```typescript const value: models.GetDeploymentGitSourceDeployments1 = { type: "github", - repoId: 2763.37, + repoId: "", }; ``` diff --git a/docs/models/getdeploymentresponsebodylambdas.md b/docs/models/getdeploymentresponsebodylambdas.md index d0299c0a..7b34bae7 100644 --- a/docs/models/getdeploymentresponsebodylambdas.md +++ b/docs/models/getdeploymentresponsebodylambdas.md @@ -10,7 +10,7 @@ import { GetDeploymentResponseBodyLambdas } from "@vercel/sdk/models/getdeployme let value: GetDeploymentResponseBodyLambdas = { output: [ { - path: "/var/yp", + path: "/usr/X11R6", functionName: "", }, ], diff --git a/docs/models/getdeploymentresponsebodyoutput.md b/docs/models/getdeploymentresponsebodyoutput.md index 88e540e2..5d7bd48c 100644 --- a/docs/models/getdeploymentresponsebodyoutput.md +++ b/docs/models/getdeploymentresponsebodyoutput.md @@ -6,7 +6,7 @@ import { GetDeploymentResponseBodyOutput } from "@vercel/sdk/models/getdeploymentop.js"; let value: GetDeploymentResponseBodyOutput = { - path: "/var/spool", + path: "/System", functionName: "", }; ``` diff --git a/docs/models/getdeploymentresponsebodyreadystate.md b/docs/models/getdeploymentresponsebodyreadystate.md index 0dbff4a6..1cef516f 100644 --- a/docs/models/getdeploymentresponsebodyreadystate.md +++ b/docs/models/getdeploymentresponsebodyreadystate.md @@ -5,7 +5,7 @@ ```typescript import { GetDeploymentResponseBodyReadyState } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodyReadyState = "CANCELED"; +let value: GetDeploymentResponseBodyReadyState = "INITIALIZING"; ``` ## Values diff --git a/docs/models/getdeploymentresponsebodyreadysubstate.md b/docs/models/getdeploymentresponsebodyreadysubstate.md index 5563efd6..3a95ba06 100644 --- a/docs/models/getdeploymentresponsebodyreadysubstate.md +++ b/docs/models/getdeploymentresponsebodyreadysubstate.md @@ -7,7 +7,7 @@ Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether ```typescript import { GetDeploymentResponseBodyReadySubstate } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodyReadySubstate = "STAGED"; +let value: GetDeploymentResponseBodyReadySubstate = "PROMOTED"; ``` ## Values diff --git a/docs/models/getdeploymentresponsebodysource.md b/docs/models/getdeploymentresponsebodysource.md index 6f217957..b1ac693b 100644 --- a/docs/models/getdeploymentresponsebodysource.md +++ b/docs/models/getdeploymentresponsebodysource.md @@ -5,7 +5,7 @@ ```typescript import { GetDeploymentResponseBodySource } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodySource = "import/repo"; +let value: GetDeploymentResponseBodySource = "api-trigger-git-deploy"; ``` ## Values diff --git a/docs/models/getdeploymentresponsebodystatus.md b/docs/models/getdeploymentresponsebodystatus.md index d579da2e..aea58502 100644 --- a/docs/models/getdeploymentresponsebodystatus.md +++ b/docs/models/getdeploymentresponsebodystatus.md @@ -5,7 +5,7 @@ ```typescript import { GetDeploymentResponseBodyStatus } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodyStatus = "INITIALIZING"; +let value: GetDeploymentResponseBodyStatus = "CANCELED"; ``` ## Values diff --git a/docs/models/getdeploymentresponsebodytarget.md b/docs/models/getdeploymentresponsebodytarget.md index f60b9c74..cddf348b 100644 --- a/docs/models/getdeploymentresponsebodytarget.md +++ b/docs/models/getdeploymentresponsebodytarget.md @@ -5,7 +5,7 @@ ```typescript import { GetDeploymentResponseBodyTarget } from "@vercel/sdk/models/getdeploymentop.js"; -let value: GetDeploymentResponseBodyTarget = "staging"; +let value: GetDeploymentResponseBodyTarget = "production"; ``` ## Values diff --git a/docs/models/getedgeconfigbackupresponsebody1.md b/docs/models/getedgeconfigbackupresponsebody1.md index 7cda71d8..53c9a111 100644 --- a/docs/models/getedgeconfigbackupresponsebody1.md +++ b/docs/models/getedgeconfigbackupresponsebody1.md @@ -9,12 +9,12 @@ import { GetEdgeConfigBackupResponseBody1 } from "@vercel/sdk/models/getedgeconf let value: GetEdgeConfigBackupResponseBody1 = { id: "", - lastModified: 9829.26, + lastModified: 9829.27, backup: { digest: "", items: {}, slug: "", - updatedAt: 1440.59, + updatedAt: 1440.58, }, metadata: {}, }; diff --git a/docs/models/getedgeconfigbackupresponsebody2.md b/docs/models/getedgeconfigbackupresponsebody2.md index 3a2ae790..4d1b315e 100644 --- a/docs/models/getedgeconfigbackupresponsebody2.md +++ b/docs/models/getedgeconfigbackupresponsebody2.md @@ -12,7 +12,7 @@ let value: GetEdgeConfigBackupResponseBody2 = { email: "Haylee16@yahoo.com", }, id: "", - lastModified: 7710.77, + lastModified: 7710.78, backup: { digest: "", items: {}, diff --git a/docs/models/getedgeconfigbackupresponsebodyitems.md b/docs/models/getedgeconfigbackupresponsebodyitems.md index 57e69a50..8dd40506 100644 --- a/docs/models/getedgeconfigbackupresponsebodyitems.md +++ b/docs/models/getedgeconfigbackupresponsebodyitems.md @@ -6,7 +6,7 @@ import { GetEdgeConfigBackupResponseBodyItems } from "@vercel/sdk/models/getedgeconfigbackupop.js"; let value: GetEdgeConfigBackupResponseBodyItems = { - updatedAt: 6716.90, + updatedAt: 6716.9, value: false, createdAt: 9596.96, }; diff --git a/docs/models/getedgeconfigresponsebody.md b/docs/models/getedgeconfigresponsebody.md index cc216efc..2dde4f90 100644 --- a/docs/models/getedgeconfigresponsebody.md +++ b/docs/models/getedgeconfigresponsebody.md @@ -9,7 +9,7 @@ import { GetEdgeConfigResponseBody } from "@vercel/sdk/models/getedgeconfigop.js let value: GetEdgeConfigResponseBody = { sizeInBytes: 3075.32, - itemCount: 8756.92, + itemCount: 8756.93, }; ``` diff --git a/docs/models/getfirewallconfigalgo.md b/docs/models/getfirewallconfigalgo.md index 4c546d4a..9391e6e2 100644 --- a/docs/models/getfirewallconfigalgo.md +++ b/docs/models/getfirewallconfigalgo.md @@ -5,7 +5,7 @@ ```typescript import { GetFirewallConfigAlgo } from "@vercel/sdk/models/getfirewallconfigop.js"; -let value: GetFirewallConfigAlgo = "fixed_window"; +let value: GetFirewallConfigAlgo = "token_bucket"; ``` ## Values diff --git a/docs/models/getfirewallconfigconditiongroup.md b/docs/models/getfirewallconfigconditiongroup.md index e375af5c..e2bc630b 100644 --- a/docs/models/getfirewallconfigconditiongroup.md +++ b/docs/models/getfirewallconfigconditiongroup.md @@ -8,8 +8,8 @@ import { GetFirewallConfigConditionGroup } from "@vercel/sdk/models/getfirewallc let value: GetFirewallConfigConditionGroup = { conditions: [ { - type: "protocol", - op: "eq", + type: "ip_address", + op: "suf", }, ], }; diff --git a/docs/models/getfirewallconfigconditions.md b/docs/models/getfirewallconfigconditions.md index 96fe3b05..1ccbe641 100644 --- a/docs/models/getfirewallconfigconditions.md +++ b/docs/models/getfirewallconfigconditions.md @@ -7,7 +7,7 @@ import { GetFirewallConfigConditions } from "@vercel/sdk/models/getfirewallconfi let value: GetFirewallConfigConditions = { type: "raw_path", - op: "suf", + op: "pre", }; ``` diff --git a/docs/models/getfirewallconfigcrs.md b/docs/models/getfirewallconfigcrs.md index cad9c805..3cb13e16 100644 --- a/docs/models/getfirewallconfigcrs.md +++ b/docs/models/getfirewallconfigcrs.md @@ -10,23 +10,23 @@ import { GetFirewallConfigCrs } from "@vercel/sdk/models/getfirewallconfigop.js" let value: GetFirewallConfigCrs = { sd: { active: false, - action: "deny", + action: "log", }, ma: { active: false, - action: "log", + action: "deny", }, lfi: { active: false, - action: "deny", + action: "log", }, rfi: { active: false, - action: "log", + action: "deny", }, rce: { active: false, - action: "deny", + action: "log", }, php: { active: false, @@ -34,15 +34,15 @@ let value: GetFirewallConfigCrs = { }, gen: { active: false, - action: "log", + action: "deny", }, xss: { active: false, - action: "deny", + action: "log", }, sqli: { active: false, - action: "log", + action: "deny", }, sf: { active: false, diff --git a/docs/models/getfirewallconfiggen.md b/docs/models/getfirewallconfiggen.md index a5c085aa..c10cf5cc 100644 --- a/docs/models/getfirewallconfiggen.md +++ b/docs/models/getfirewallconfiggen.md @@ -9,7 +9,7 @@ import { GetFirewallConfigGen } from "@vercel/sdk/models/getfirewallconfigop.js" let value: GetFirewallConfigGen = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/getfirewallconfigips.md b/docs/models/getfirewallconfigips.md index 13223924..ae4c9b7d 100644 --- a/docs/models/getfirewallconfigips.md +++ b/docs/models/getfirewallconfigips.md @@ -7,9 +7,9 @@ import { GetFirewallConfigIps } from "@vercel/sdk/models/getfirewallconfigop.js" let value: GetFirewallConfigIps = { id: "", - hostname: "pretty-seafood.net", - ip: "175.183.220.130", - action: "log", + hostname: "courteous-outset.net", + ip: "2ffc:bafb:c7ca:2ad9:0dfb:deba:dac1:b9ea", + action: "challenge", }; ``` diff --git a/docs/models/getfirewallconfigma.md b/docs/models/getfirewallconfigma.md index af2cead7..88866cce 100644 --- a/docs/models/getfirewallconfigma.md +++ b/docs/models/getfirewallconfigma.md @@ -9,7 +9,7 @@ import { GetFirewallConfigMa } from "@vercel/sdk/models/getfirewallconfigop.js"; let value: GetFirewallConfigMa = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/getfirewallconfigmitigate.md b/docs/models/getfirewallconfigmitigate.md index e7e0dd27..0f601568 100644 --- a/docs/models/getfirewallconfigmitigate.md +++ b/docs/models/getfirewallconfigmitigate.md @@ -6,7 +6,7 @@ import { GetFirewallConfigMitigate } from "@vercel/sdk/models/getfirewallconfigop.js"; let value: GetFirewallConfigMitigate = { - action: "deny", + action: "log", }; ``` diff --git a/docs/models/getfirewallconfigop.md b/docs/models/getfirewallconfigop.md index 5a8c46d1..1569e81e 100644 --- a/docs/models/getfirewallconfigop.md +++ b/docs/models/getfirewallconfigop.md @@ -7,7 +7,7 @@ ```typescript import { GetFirewallConfigOp } from "@vercel/sdk/models/getfirewallconfigop.js"; -let value: GetFirewallConfigOp = "nex"; +let value: GetFirewallConfigOp = "gt"; ``` ## Values diff --git a/docs/models/getfirewallconfigphp.md b/docs/models/getfirewallconfigphp.md index 39e5f397..782a67f7 100644 --- a/docs/models/getfirewallconfigphp.md +++ b/docs/models/getfirewallconfigphp.md @@ -9,7 +9,7 @@ import { GetFirewallConfigPhp } from "@vercel/sdk/models/getfirewallconfigop.js" let value: GetFirewallConfigPhp = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/getfirewallconfigratelimit.md b/docs/models/getfirewallconfigratelimit.md index d8dff1dd..994c89d7 100644 --- a/docs/models/getfirewallconfigratelimit.md +++ b/docs/models/getfirewallconfigratelimit.md @@ -6,9 +6,9 @@ import { GetFirewallConfigRateLimit } from "@vercel/sdk/models/getfirewallconfigop.js"; let value: GetFirewallConfigRateLimit = { - algo: "fixed_window", - window: 4496.94, - limit: 2846.94, + algo: "token_bucket", + window: 618.44, + limit: 4496.94, keys: [ "", ], diff --git a/docs/models/getfirewallconfigrce.md b/docs/models/getfirewallconfigrce.md index 30c730ba..e6c22e65 100644 --- a/docs/models/getfirewallconfigrce.md +++ b/docs/models/getfirewallconfigrce.md @@ -9,7 +9,7 @@ import { GetFirewallConfigRce } from "@vercel/sdk/models/getfirewallconfigop.js" let value: GetFirewallConfigRce = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/getfirewallconfigresponsebody.md b/docs/models/getfirewallconfigresponsebody.md index ee43988d..fe664358 100644 --- a/docs/models/getfirewallconfigresponsebody.md +++ b/docs/models/getfirewallconfigresponsebody.md @@ -11,17 +11,17 @@ let value: GetFirewallConfigResponseBody = { ownerId: "", projectKey: "", id: "", - version: 9651.16, - updatedAt: "1736187965656", + version: 1585.15, + updatedAt: "1737013786563", firewallEnabled: false, crs: { sd: { active: false, - action: "log", + action: "deny", }, ma: { active: false, - action: "deny", + action: "log", }, lfi: { active: false, @@ -29,7 +29,7 @@ let value: GetFirewallConfigResponseBody = { }, rfi: { active: false, - action: "deny", + action: "log", }, rce: { active: false, @@ -37,15 +37,15 @@ let value: GetFirewallConfigResponseBody = { }, php: { active: false, - action: "deny", + action: "log", }, gen: { active: false, - action: "log", + action: "deny", }, xss: { active: false, - action: "deny", + action: "log", }, sqli: { active: false, @@ -57,7 +57,7 @@ let value: GetFirewallConfigResponseBody = { }, java: { active: false, - action: "log", + action: "deny", }, }, rules: [ @@ -69,8 +69,8 @@ let value: GetFirewallConfigResponseBody = { { conditions: [ { - type: "geo_city", - op: "gte", + type: "rate_limit_api_id", + op: "lt", }, ], }, @@ -81,8 +81,8 @@ let value: GetFirewallConfigResponseBody = { ips: [ { id: "", - hostname: "unwritten-silk.info", - ip: "ac1b:9eab:391f:eb8c:6b6a:5fe1:0f46:4eeb", + hostname: "black-adaptation.org", + ip: "80.53.237.166", action: "challenge", }, ], diff --git a/docs/models/getfirewallconfigrfi.md b/docs/models/getfirewallconfigrfi.md index b1c46b71..188f89f5 100644 --- a/docs/models/getfirewallconfigrfi.md +++ b/docs/models/getfirewallconfigrfi.md @@ -9,7 +9,7 @@ import { GetFirewallConfigRfi } from "@vercel/sdk/models/getfirewallconfigop.js" let value: GetFirewallConfigRfi = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/getfirewallconfigrules.md b/docs/models/getfirewallconfigrules.md index 17344e58..65d8ea64 100644 --- a/docs/models/getfirewallconfigrules.md +++ b/docs/models/getfirewallconfigrules.md @@ -13,7 +13,7 @@ let value: GetFirewallConfigRules = { { conditions: [ { - type: "geo_city", + type: "header", op: "lte", }, ], diff --git a/docs/models/getfirewallconfigsecurityaction.md b/docs/models/getfirewallconfigsecurityaction.md index 6e734a59..979c325d 100644 --- a/docs/models/getfirewallconfigsecurityaction.md +++ b/docs/models/getfirewallconfigsecurityaction.md @@ -5,7 +5,7 @@ ```typescript import { GetFirewallConfigSecurityAction } from "@vercel/sdk/models/getfirewallconfigop.js"; -let value: GetFirewallConfigSecurityAction = "deny"; +let value: GetFirewallConfigSecurityAction = "challenge"; ``` ## Values diff --git a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrsjavaaction.md b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrsjavaaction.md index 4b0b53c5..6af88249 100644 --- a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrsjavaaction.md +++ b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrsjavaaction.md @@ -7,7 +7,7 @@ import { GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaA let value: GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction = - "log"; + "deny"; ``` ## Values diff --git a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrssdaction.md b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrssdaction.md index 486475bb..39318536 100644 --- a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrssdaction.md +++ b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrssdaction.md @@ -7,7 +7,7 @@ import { GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAct let value: GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction = - "log"; + "deny"; ``` ## Values diff --git a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrsxssaction.md b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrsxssaction.md index d0fcf02e..5523e596 100644 --- a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrsxssaction.md +++ b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodycrsxssaction.md @@ -7,7 +7,7 @@ import { GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXssAc let value: GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXssAction = - "deny"; + "log"; ``` ## Values diff --git a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodyrulesaction.md b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodyrulesaction.md index 59157f63..e5cb65ce 100644 --- a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodyrulesaction.md +++ b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodyrulesaction.md @@ -7,7 +7,7 @@ import { GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAct let value: GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction = - "bypass"; + "deny"; ``` ## Values diff --git a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodyrulesactionaction.md b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodyrulesactionaction.md index ce0b2053..dcfa8405 100644 --- a/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodyrulesactionaction.md +++ b/docs/models/getfirewallconfigsecurityresponse200applicationjsonresponsebodyrulesactionaction.md @@ -7,7 +7,7 @@ import { GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAct let value: GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction = - "rate_limit"; + "deny"; ``` ## Values diff --git a/docs/models/getfirewallconfigsecurityresponseaction.md b/docs/models/getfirewallconfigsecurityresponseaction.md index 1e746068..dccef3de 100644 --- a/docs/models/getfirewallconfigsecurityresponseaction.md +++ b/docs/models/getfirewallconfigsecurityresponseaction.md @@ -5,7 +5,7 @@ ```typescript import { GetFirewallConfigSecurityResponseAction } from "@vercel/sdk/models/getfirewallconfigop.js"; -let value: GetFirewallConfigSecurityResponseAction = "log"; +let value: GetFirewallConfigSecurityResponseAction = "deny"; ``` ## Values diff --git a/docs/models/getfirewallconfigtype.md b/docs/models/getfirewallconfigtype.md index 8d159178..54863035 100644 --- a/docs/models/getfirewallconfigtype.md +++ b/docs/models/getfirewallconfigtype.md @@ -7,7 +7,7 @@ ```typescript import { GetFirewallConfigType } from "@vercel/sdk/models/getfirewallconfigop.js"; -let value: GetFirewallConfigType = "scheme"; +let value: GetFirewallConfigType = "ja3_digest"; ``` ## Values diff --git a/docs/models/getfirewallconfigvalue.md b/docs/models/getfirewallconfigvalue.md index a2bfaae1..7724acf8 100644 --- a/docs/models/getfirewallconfigvalue.md +++ b/docs/models/getfirewallconfigvalue.md @@ -12,7 +12,7 @@ const value: string = ""; ### `number` ```typescript -const value: number = 3229.07; +const value: number = 8021.48; ``` ### `string[]` diff --git a/docs/models/getintegrationlogdrainssources.md b/docs/models/getintegrationlogdrainssources.md index 522c73c5..d4a7aaad 100644 --- a/docs/models/getintegrationlogdrainssources.md +++ b/docs/models/getintegrationlogdrainssources.md @@ -7,7 +7,7 @@ The sources from which logs are currently being delivered to this log drain. ```typescript import { GetIntegrationLogDrainsSources } from "@vercel/sdk/models/getintegrationlogdrainsop.js"; -let value: GetIntegrationLogDrainsSources = "external"; +let value: GetIntegrationLogDrainsSources = "static"; ``` ## Values diff --git a/docs/models/getprojectdomainsrequest.md b/docs/models/getprojectdomainsrequest.md index 5226ab0a..1a20da31 100644 --- a/docs/models/getprojectdomainsrequest.md +++ b/docs/models/getprojectdomainsrequest.md @@ -7,6 +7,7 @@ import { GetProjectDomainsRequest } from "@vercel/sdk/models/getprojectdomainsop let value: GetProjectDomainsRequest = { idOrName: "", + customEnvironmentId: "env_123abc4567", redirect: "example.com", limit: 20, since: 1609499532000, @@ -23,6 +24,7 @@ let value: GetProjectDomainsRequest = { | `idOrName` | *string* | :heavy_check_mark: | The unique project identifier or the project name | | | `production` | [models.Production](../models/production.md) | :heavy_minus_sign: | Filters only production domains when set to `true`. | | | `target` | [models.QueryParamTarget](../models/queryparamtarget.md) | :heavy_minus_sign: | Filters on the target of the domain. Can be either \"production\", \"preview\" | | +| `customEnvironmentId` | *string* | :heavy_minus_sign: | The unique custom environment identifier within the project | env_123abc4567 | | `gitBranch` | *string* | :heavy_minus_sign: | Filters domains based on specific branch. | | | `redirects` | [models.Redirects](../models/redirects.md) | :heavy_minus_sign: | Excludes redirect project domains when \"false\". Includes redirect project domains when \"true\" (default). | | | `redirect` | *string* | :heavy_minus_sign: | Filters domains based on their redirect target. | example.com | diff --git a/docs/models/getprojectdomainsverification.md b/docs/models/getprojectdomainsverification.md index 569af959..76cc54ee 100644 --- a/docs/models/getprojectdomainsverification.md +++ b/docs/models/getprojectdomainsverification.md @@ -9,7 +9,7 @@ import { GetProjectDomainsVerification } from "@vercel/sdk/models/getprojectdoma let value: GetProjectDomainsVerification = { type: "", - domain: "lustrous-convection.org", + domain: "youthful-celsius.info", value: "", reason: "", }; diff --git a/docs/models/getprojectenvresponsebody.md b/docs/models/getprojectenvresponsebody.md index 8d975619..50aa6ba3 100644 --- a/docs/models/getprojectenvresponsebody.md +++ b/docs/models/getprojectenvresponsebody.md @@ -8,7 +8,7 @@ ```typescript const value: models.GetProjectEnvResponseBody1 = { decrypted: false, - type: "secret", + type: "system", key: "", }; ``` @@ -17,7 +17,7 @@ const value: models.GetProjectEnvResponseBody1 = { ```typescript const value: models.GetProjectEnvResponseBody2 = { - type: "secret", + type: "system", key: "", value: "", }; @@ -27,7 +27,7 @@ const value: models.GetProjectEnvResponseBody2 = { ```typescript const value: models.GetProjectEnvResponseBody3 = { - type: "system", + type: "secret", key: "", value: "", }; diff --git a/docs/models/getprojectenvresponsebody1.md b/docs/models/getprojectenvresponsebody1.md index c6ee391a..fd3bcb15 100644 --- a/docs/models/getprojectenvresponsebody1.md +++ b/docs/models/getprojectenvresponsebody1.md @@ -7,7 +7,7 @@ import { GetProjectEnvResponseBody1 } from "@vercel/sdk/models/getprojectenvop.j let value: GetProjectEnvResponseBody1 = { decrypted: false, - type: "system", + type: "secret", key: "", }; ``` diff --git a/docs/models/getprojectenvresponsebody2.md b/docs/models/getprojectenvresponsebody2.md index 7b72fd1e..788bf92b 100644 --- a/docs/models/getprojectenvresponsebody2.md +++ b/docs/models/getprojectenvresponsebody2.md @@ -6,7 +6,7 @@ import { GetProjectEnvResponseBody2 } from "@vercel/sdk/models/getprojectenvop.js"; let value: GetProjectEnvResponseBody2 = { - type: "sensitive", + type: "system", key: "", value: "", }; diff --git a/docs/models/getprojectenvresponsebody3.md b/docs/models/getprojectenvresponsebody3.md index d1b2c29a..7e5e7a51 100644 --- a/docs/models/getprojectenvresponsebody3.md +++ b/docs/models/getprojectenvresponsebody3.md @@ -6,7 +6,7 @@ import { GetProjectEnvResponseBody3 } from "@vercel/sdk/models/getprojectenvop.js"; let value: GetProjectEnvResponseBody3 = { - type: "secret", + type: "encrypted", key: "", value: "", }; diff --git a/docs/models/getprojectenvresponsebodyprojectsresponsetarget.md b/docs/models/getprojectenvresponsebodyprojectsresponsetarget.md index a75a1b9b..f68c2b45 100644 --- a/docs/models/getprojectenvresponsebodyprojectsresponsetarget.md +++ b/docs/models/getprojectenvresponsebodyprojectsresponsetarget.md @@ -14,6 +14,6 @@ const value: string[] = [ ### `models.GetProjectEnvTargetProjectsResponse2` ```typescript -const value: models.GetProjectEnvTargetProjectsResponse2 = "preview"; +const value: models.GetProjectEnvTargetProjectsResponse2 = "development"; ``` diff --git a/docs/models/getprojectenvresponsebodyprojectstarget.md b/docs/models/getprojectenvresponsebodyprojectstarget.md index 726e10cb..65dde58c 100644 --- a/docs/models/getprojectenvresponsebodyprojectstarget.md +++ b/docs/models/getprojectenvresponsebodyprojectstarget.md @@ -7,7 +7,7 @@ ```typescript const value: models.GetProjectEnvTargetProjects1[] = [ - "development", + "preview", ]; ``` diff --git a/docs/models/getprojectenvresponsebodytarget.md b/docs/models/getprojectenvresponsebodytarget.md index 8c009a31..26be8305 100644 --- a/docs/models/getprojectenvresponsebodytarget.md +++ b/docs/models/getprojectenvresponsebodytarget.md @@ -14,6 +14,6 @@ const value: models.GetProjectEnvTarget1[] = [ ### `models.GetProjectEnvTarget2` ```typescript -const value: models.GetProjectEnvTarget2 = "preview"; +const value: models.GetProjectEnvTarget2 = "production"; ``` diff --git a/docs/models/getprojectenvresponsebodytype.md b/docs/models/getprojectenvresponsebodytype.md index 5ee204fe..73ce4602 100644 --- a/docs/models/getprojectenvresponsebodytype.md +++ b/docs/models/getprojectenvresponsebodytype.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectEnvResponseBodyType } from "@vercel/sdk/models/getprojectenvop.js"; -let value: GetProjectEnvResponseBodyType = "system"; +let value: GetProjectEnvResponseBodyType = "secret"; ``` ## Values diff --git a/docs/models/getprojectenvtarget1.md b/docs/models/getprojectenvtarget1.md index aaca75ee..5c3c2a82 100644 --- a/docs/models/getprojectenvtarget1.md +++ b/docs/models/getprojectenvtarget1.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectEnvTarget1 } from "@vercel/sdk/models/getprojectenvop.js"; -let value: GetProjectEnvTarget1 = "production"; +let value: GetProjectEnvTarget1 = "preview"; ``` ## Values diff --git a/docs/models/getprojectenvtarget2.md b/docs/models/getprojectenvtarget2.md index 458cac72..2fe7ded8 100644 --- a/docs/models/getprojectenvtarget2.md +++ b/docs/models/getprojectenvtarget2.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectEnvTarget2 } from "@vercel/sdk/models/getprojectenvop.js"; -let value: GetProjectEnvTarget2 = "preview"; +let value: GetProjectEnvTarget2 = "production"; ``` ## Values diff --git a/docs/models/getprojectenvtargetprojects1.md b/docs/models/getprojectenvtargetprojects1.md index fb40a35f..6f1a4e41 100644 --- a/docs/models/getprojectenvtargetprojects1.md +++ b/docs/models/getprojectenvtargetprojects1.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectEnvTargetProjects1 } from "@vercel/sdk/models/getprojectenvop.js"; -let value: GetProjectEnvTargetProjects1 = "production"; +let value: GetProjectEnvTargetProjects1 = "development"; ``` ## Values diff --git a/docs/models/getprojectenvtargetprojects2.md b/docs/models/getprojectenvtargetprojects2.md index b8631a49..9bfb6634 100644 --- a/docs/models/getprojectenvtargetprojects2.md +++ b/docs/models/getprojectenvtargetprojects2.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectEnvTargetProjects2 } from "@vercel/sdk/models/getprojectenvop.js"; -let value: GetProjectEnvTargetProjects2 = "production"; +let value: GetProjectEnvTargetProjects2 = "development"; ``` ## Values diff --git a/docs/models/getprojectsaction.md b/docs/models/getprojectsaction.md index d82cd224..760773d0 100644 --- a/docs/models/getprojectsaction.md +++ b/docs/models/getprojectsaction.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsAction } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsAction = "redirect"; +let value: GetProjectsAction = "bypass"; ``` ## Values diff --git a/docs/models/getprojectsaliasassigned.md b/docs/models/getprojectsaliasassigned.md index 3aca9263..f7e54277 100644 --- a/docs/models/getprojectsaliasassigned.md +++ b/docs/models/getprojectsaliasassigned.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 3068.10; +const value: number = 353.62; ``` ### `boolean` diff --git a/docs/models/getprojectsanalytics.md b/docs/models/getprojectsanalytics.md index ec2eeab1..b2a4b5f6 100644 --- a/docs/models/getprojectsanalytics.md +++ b/docs/models/getprojectsanalytics.md @@ -7,8 +7,8 @@ import { GetProjectsAnalytics } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsAnalytics = { id: "", - disabledAt: 7774.08, - enabledAt: 2594.23, + disabledAt: 2728.22, + enabledAt: 3708.53, }; ``` diff --git a/docs/models/getprojectsbranchmatcher.md b/docs/models/getprojectsbranchmatcher.md index 0915442e..9a5be3fd 100644 --- a/docs/models/getprojectsbranchmatcher.md +++ b/docs/models/getprojectsbranchmatcher.md @@ -6,7 +6,7 @@ import { GetProjectsBranchMatcher } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsBranchMatcher = { - type: "equals", + type: "startsWith", pattern: "", }; ``` diff --git a/docs/models/getprojectschecksstate.md b/docs/models/getprojectschecksstate.md index 08132612..2eec3e47 100644 --- a/docs/models/getprojectschecksstate.md +++ b/docs/models/getprojectschecksstate.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsChecksState } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsChecksState = "registered"; +let value: GetProjectsChecksState = "completed"; ``` ## Values diff --git a/docs/models/getprojectscreator.md b/docs/models/getprojectscreator.md index 7cbe0a1b..7aa221eb 100644 --- a/docs/models/getprojectscreator.md +++ b/docs/models/getprojectscreator.md @@ -6,9 +6,9 @@ import { GetProjectsCreator } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsCreator = { - email: "Johnathan.Parker@yahoo.com", + email: "Braulio.Will@gmail.com", uid: "", - username: "Verlie45", + username: "Jacques39", }; ``` diff --git a/docs/models/getprojectscrons.md b/docs/models/getprojectscrons.md index 6e845ae6..89bcaa15 100644 --- a/docs/models/getprojectscrons.md +++ b/docs/models/getprojectscrons.md @@ -6,9 +6,9 @@ import { GetProjectsCrons } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsCrons = { - enabledAt: 3738.13, - disabledAt: 5876.00, - updatedAt: 2728.22, + enabledAt: 1970.54, + disabledAt: 4598.56, + updatedAt: 446.12, deploymentId: "", definitions: [ { diff --git a/docs/models/getprojectsdeploymenttype.md b/docs/models/getprojectsdeploymenttype.md index 010b1822..78168639 100644 --- a/docs/models/getprojectsdeploymenttype.md +++ b/docs/models/getprojectsdeploymenttype.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsDeploymentType } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsDeploymentType = "prod_deployment_urls_and_all_previews"; +let value: GetProjectsDeploymentType = "all"; ``` ## Values diff --git a/docs/models/getprojectsenv.md b/docs/models/getprojectsenv.md index 614a4734..29658773 100644 --- a/docs/models/getprojectsenv.md +++ b/docs/models/getprojectsenv.md @@ -6,7 +6,7 @@ import { GetProjectsEnv } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsEnv = { - type: "system", + type: "secret", key: "", value: "", }; diff --git a/docs/models/getprojectserl.md b/docs/models/getprojectserl.md index b9386371..37f58b6b 100644 --- a/docs/models/getprojectserl.md +++ b/docs/models/getprojectserl.md @@ -6,9 +6,9 @@ import { GetProjectsErl } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsErl = { - algo: "token_bucket", - window: 2716.53, - limit: 4554.44, + algo: "fixed_window", + window: 4017.13, + limit: 2484.13, keys: [ "", ], diff --git a/docs/models/getprojectsframework.md b/docs/models/getprojectsframework.md index 5cc0bb8b..ab9b4d4e 100644 --- a/docs/models/getprojectsframework.md +++ b/docs/models/getprojectsframework.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsFramework } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsFramework = "create-react-app"; +let value: GetProjectsFramework = "nuxtjs"; ``` ## Values diff --git a/docs/models/getprojectshandle.md b/docs/models/getprojectshandle.md index 487df8da..8bcaf1b7 100644 --- a/docs/models/getprojectshandle.md +++ b/docs/models/getprojectshandle.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsHandle } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsHandle = "finalize"; +let value: GetProjectsHandle = "init"; ``` ## Values diff --git a/docs/models/getprojectshas.md b/docs/models/getprojectshas.md index 479effe6..bc3af7fa 100644 --- a/docs/models/getprojectshas.md +++ b/docs/models/getprojectshas.md @@ -6,7 +6,7 @@ import { GetProjectsHas } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsHas = { - type: "initial_request_path", + type: "header", }; ``` diff --git a/docs/models/getprojectsjobstatus.md b/docs/models/getprojectsjobstatus.md index 2365ef68..1636d193 100644 --- a/docs/models/getprojectsjobstatus.md +++ b/docs/models/getprojectsjobstatus.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsJobStatus } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsJobStatus = "pending"; +let value: GetProjectsJobStatus = "in-progress"; ``` ## Values diff --git a/docs/models/getprojectslastaliasrequest.md b/docs/models/getprojectslastaliasrequest.md index fcfb1da3..86c9f748 100644 --- a/docs/models/getprojectslastaliasrequest.md +++ b/docs/models/getprojectslastaliasrequest.md @@ -8,8 +8,8 @@ import { GetProjectsLastAliasRequest } from "@vercel/sdk/models/getprojectsop.js let value: GetProjectsLastAliasRequest = { fromDeploymentId: "", toDeploymentId: "", - jobStatus: "in-progress", - requestedAt: 7507.65, + jobStatus: "pending", + requestedAt: 9679.66, type: "rollback", }; ``` diff --git a/docs/models/getprojectslatestdeployments.md b/docs/models/getprojectslatestdeployments.md index ea086013..2ef27468 100644 --- a/docs/models/getprojectslatestdeployments.md +++ b/docs/models/getprojectslatestdeployments.md @@ -7,21 +7,21 @@ import { GetProjectsLatestDeployments } from "@vercel/sdk/models/getprojectsop.j let value: GetProjectsLatestDeployments = { id: "", - createdAt: 9040.44, + createdAt: 7567.79, createdIn: "", creator: { - email: "Maximus_Roob24@hotmail.com", + email: "Dax_Schinner@yahoo.com", uid: "", - username: "Peyton45", + username: "Ruthie82", }, deploymentHostname: "", name: "", - plan: "enterprise", + plan: "hobby", previewCommentsEnabled: false, private: false, - readyState: "READY", + readyState: "BUILDING", type: "LAMBDAS", - url: "https://submissive-coal.name", + url: "https://impeccable-barge.info", userId: "", }; ``` diff --git a/docs/models/getprojectslink.md b/docs/models/getprojectslink.md index 0bb0c8de..4dd1b8cc 100644 --- a/docs/models/getprojectslink.md +++ b/docs/models/getprojectslink.md @@ -12,7 +12,7 @@ const value: models.GetProjectsLink1 = { id: "", name: "", ref: "", - url: "https://elegant-disappointment.com/", + url: "https://affectionate-captain.name/", }, ], }; @@ -27,7 +27,7 @@ const value: models.GetProjectsLink2 = { id: "", name: "", ref: "", - url: "https://clean-octave.org/", + url: "https://wry-handful.com", }, ], }; @@ -42,7 +42,7 @@ const value: models.GetProjectsLink3 = { id: "", name: "", ref: "", - url: "https://incomparable-coil.name", + url: "https://lustrous-wombat.com", }, ], }; diff --git a/docs/models/getprojectslink1.md b/docs/models/getprojectslink1.md index 0a6d74fb..41dbf352 100644 --- a/docs/models/getprojectslink1.md +++ b/docs/models/getprojectslink1.md @@ -11,7 +11,7 @@ let value: GetProjectsLink1 = { id: "", name: "", ref: "", - url: "https://aggravating-horde.com/", + url: "https://failing-dead.biz/", }, ], }; diff --git a/docs/models/getprojectslink2.md b/docs/models/getprojectslink2.md index 5228ce23..f641eaef 100644 --- a/docs/models/getprojectslink2.md +++ b/docs/models/getprojectslink2.md @@ -11,7 +11,7 @@ let value: GetProjectsLink2 = { id: "", name: "", ref: "", - url: "https://buzzing-underneath.org", + url: "https://lanky-ferret.biz", }, ], }; diff --git a/docs/models/getprojectslink3.md b/docs/models/getprojectslink3.md index 383b2ba5..f73d4fee 100644 --- a/docs/models/getprojectslink3.md +++ b/docs/models/getprojectslink3.md @@ -11,7 +11,7 @@ let value: GetProjectsLink3 = { id: "", name: "", ref: "", - url: "https://animated-velocity.info", + url: "https://hard-to-find-adviser.biz/", }, ], }; diff --git a/docs/models/getprojectslinkdeployhooks.md b/docs/models/getprojectslinkdeployhooks.md index 6712c9da..0161a42a 100644 --- a/docs/models/getprojectslinkdeployhooks.md +++ b/docs/models/getprojectslinkdeployhooks.md @@ -9,7 +9,7 @@ let value: GetProjectsLinkDeployHooks = { id: "", name: "", ref: "", - url: "https://good-department.name/", + url: "https://animated-advertisement.info", }; ``` diff --git a/docs/models/getprojectslinkprojectsdeployhooks.md b/docs/models/getprojectslinkprojectsdeployhooks.md index fed1035c..216a8401 100644 --- a/docs/models/getprojectslinkprojectsdeployhooks.md +++ b/docs/models/getprojectslinkprojectsdeployhooks.md @@ -9,7 +9,7 @@ let value: GetProjectsLinkProjectsDeployHooks = { id: "", name: "", ref: "", - url: "https://aggressive-convection.info/", + url: "https://vengeful-bran.org/", }; ``` diff --git a/docs/models/getprojectslinkprojectsresponsedeployhooks.md b/docs/models/getprojectslinkprojectsresponsedeployhooks.md index b94c7071..2855eda7 100644 --- a/docs/models/getprojectslinkprojectsresponsedeployhooks.md +++ b/docs/models/getprojectslinkprojectsresponsedeployhooks.md @@ -9,7 +9,7 @@ let value: GetProjectsLinkProjectsResponseDeployHooks = { id: "", name: "", ref: "", - url: "https://beneficial-hippodrome.biz/", + url: "https://thin-almighty.org/", }; ``` diff --git a/docs/models/getprojectsmicrofrontends.md b/docs/models/getprojectsmicrofrontends.md index 1f064c51..96a8e731 100644 --- a/docs/models/getprojectsmicrofrontends.md +++ b/docs/models/getprojectsmicrofrontends.md @@ -6,7 +6,7 @@ import { GetProjectsMicrofrontends } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsMicrofrontends = { - updatedAt: 4903.05, + updatedAt: 7832.35, groupIds: [ "", ], diff --git a/docs/models/getprojectsmissing.md b/docs/models/getprojectsmissing.md index 0bb22418..859faaca 100644 --- a/docs/models/getprojectsmissing.md +++ b/docs/models/getprojectsmissing.md @@ -6,7 +6,7 @@ import { GetProjectsMissing } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsMissing = { - type: "header", + type: "region", }; ``` diff --git a/docs/models/getprojectsmitigate.md b/docs/models/getprojectsmitigate.md index b1b15565..77e110bb 100644 --- a/docs/models/getprojectsmitigate.md +++ b/docs/models/getprojectsmitigate.md @@ -6,7 +6,7 @@ import { GetProjectsMitigate } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsMitigate = { - action: "log", + action: "bypass", ruleId: "", }; ``` diff --git a/docs/models/getprojectsnodeversion.md b/docs/models/getprojectsnodeversion.md index b2b73fbe..84d1ac08 100644 --- a/docs/models/getprojectsnodeversion.md +++ b/docs/models/getprojectsnodeversion.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsNodeVersion } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsNodeVersion = "8.10.x"; +let value: GetProjectsNodeVersion = "18.x"; ``` ## Values diff --git a/docs/models/getprojectsplan.md b/docs/models/getprojectsplan.md index f5f96ee6..b9efe2f8 100644 --- a/docs/models/getprojectsplan.md +++ b/docs/models/getprojectsplan.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsPlan } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsPlan = "enterprise"; +let value: GetProjectsPlan = "hobby"; ``` ## Values diff --git a/docs/models/getprojectsprojects.md b/docs/models/getprojectsprojects.md index 9605c2eb..6bfc0065 100644 --- a/docs/models/getprojectsprojects.md +++ b/docs/models/getprojectsprojects.md @@ -8,9 +8,9 @@ import { GetProjectsProjects } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsProjects = { accountId: "", crons: { - enabledAt: 3103.81, - disabledAt: 3730.35, - updatedAt: 5249.70, + enabledAt: 5249.7, + disabledAt: 7505.95, + updatedAt: 3335.07, deploymentId: "", definitions: [ { @@ -25,44 +25,44 @@ let value: GetProjectsProjects = { latestDeployments: [ { id: "", - createdAt: 7505.95, + createdAt: 9241.59, createdIn: "", creator: { - email: "Thora.Beatty44@yahoo.com", + email: "Amanda34@hotmail.com", uid: "", - username: "Faustino_Parisian71", + username: "Marilyne34", }, deploymentHostname: "", name: "", - plan: "enterprise", + plan: "hobby", previewCommentsEnabled: false, private: false, - readyState: "READY", + readyState: "QUEUED", type: "LAMBDAS", - url: "https://neat-ecliptic.com", + url: "https://amused-programme.com/", userId: "", }, ], name: "", - nodeVersion: "12.x", + nodeVersion: "18.x", targets: { "key": { id: "", - createdAt: 78.84, + createdAt: 5305.37, createdIn: "", creator: { - email: "Justine.Borer@yahoo.com", + email: "Asia.Bailey62@hotmail.com", uid: "", - username: "Lily57", + username: "Cornelius67", }, deploymentHostname: "", name: "", - plan: "hobby", + plan: "pro", previewCommentsEnabled: false, private: false, - readyState: "CANCELED", + readyState: "QUEUED", type: "LAMBDAS", - url: "https://pure-nerve.name/", + url: "https://oval-vestment.com", userId: "", }, }, diff --git a/docs/models/getprojectsprojectsaliasassigned.md b/docs/models/getprojectsprojectsaliasassigned.md index 727e97ca..b97dbc94 100644 --- a/docs/models/getprojectsprojectsaliasassigned.md +++ b/docs/models/getprojectsprojectsaliasassigned.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 2414.19; +const value: number = 6658.59; ``` ### `boolean` diff --git a/docs/models/getprojectsprojectsbranchmatcher.md b/docs/models/getprojectsprojectsbranchmatcher.md index 96c0087b..9aa95d28 100644 --- a/docs/models/getprojectsprojectsbranchmatcher.md +++ b/docs/models/getprojectsprojectsbranchmatcher.md @@ -6,7 +6,7 @@ import { GetProjectsProjectsBranchMatcher } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsProjectsBranchMatcher = { - type: "endsWith", + type: "startsWith", pattern: "", }; ``` diff --git a/docs/models/getprojectsprojectschecksstate.md b/docs/models/getprojectsprojectschecksstate.md index 0e180613..c59b9fc5 100644 --- a/docs/models/getprojectsprojectschecksstate.md +++ b/docs/models/getprojectsprojectschecksstate.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsProjectsChecksState } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsProjectsChecksState = "running"; +let value: GetProjectsProjectsChecksState = "registered"; ``` ## Values diff --git a/docs/models/getprojectsprojectscreator.md b/docs/models/getprojectsprojectscreator.md index 226c9d86..f25150bc 100644 --- a/docs/models/getprojectsprojectscreator.md +++ b/docs/models/getprojectsprojectscreator.md @@ -6,9 +6,9 @@ import { GetProjectsProjectsCreator } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsProjectsCreator = { - email: "Kayla36@yahoo.com", + email: "Haskell_Shields4@hotmail.com", uid: "", - username: "Tia81", + username: "Faustino_Yost90", }; ``` diff --git a/docs/models/getprojectsprojectsreadystate.md b/docs/models/getprojectsprojectsreadystate.md index 5cdfce7d..b80eb2f3 100644 --- a/docs/models/getprojectsprojectsreadystate.md +++ b/docs/models/getprojectsprojectsreadystate.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsProjectsReadyState } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsProjectsReadyState = "CANCELED"; +let value: GetProjectsProjectsReadyState = "ERROR"; ``` ## Values diff --git a/docs/models/getprojectsprojectsresponse200applicationjsonresponsebodyprojectssecurityfirewallroutestype.md b/docs/models/getprojectsprojectsresponse200applicationjsonresponsebodyprojectssecurityfirewallroutestype.md index 980ab7af..1314f61f 100644 --- a/docs/models/getprojectsprojectsresponse200applicationjsonresponsebodyprojectssecurityfirewallroutestype.md +++ b/docs/models/getprojectsprojectsresponse200applicationjsonresponsebodyprojectssecurityfirewallroutestype.md @@ -9,7 +9,7 @@ import { let value: GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = - "ip_address"; + "protocol"; ``` ## Values diff --git a/docs/models/getprojectsprojectsresponse200applicationjsonresponsebodyprojectssecuritytype.md b/docs/models/getprojectsprojectsresponse200applicationjsonresponsebodyprojectssecuritytype.md index 6c653f22..605dcb48 100644 --- a/docs/models/getprojectsprojectsresponse200applicationjsonresponsebodyprojectssecuritytype.md +++ b/docs/models/getprojectsprojectsresponse200applicationjsonresponsebodyprojectssecuritytype.md @@ -7,7 +7,7 @@ import { GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecuri let value: GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = - "region"; + "ip_address"; ``` ## Values diff --git a/docs/models/getprojectsprotectionbypass.md b/docs/models/getprojectsprotectionbypass.md index e8a544e6..789ad3c6 100644 --- a/docs/models/getprojectsprotectionbypass.md +++ b/docs/models/getprojectsprotectionbypass.md @@ -6,7 +6,7 @@ import { GetProjectsProtectionBypass } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsProtectionBypass = { - createdAt: 9679.66, + createdAt: 4518.22, createdBy: "", scope: "automation-bypass", }; diff --git a/docs/models/getprojectsresourceconfig.md b/docs/models/getprojectsresourceconfig.md index 81949953..1e894f40 100644 --- a/docs/models/getprojectsresourceconfig.md +++ b/docs/models/getprojectsresourceconfig.md @@ -12,7 +12,9 @@ let value: GetProjectsResourceConfig = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `functionDefaultRegion` | *string* | :heavy_minus_sign: | N/A | | `functionDefaultTimeout` | *number* | :heavy_minus_sign: | N/A | | `functionDefaultMemoryType` | [models.GetProjectsFunctionDefaultMemoryType](../models/getprojectsfunctiondefaultmemorytype.md) | :heavy_minus_sign: | N/A | +| `functionZeroConfigFailover` | *boolean* | :heavy_minus_sign: | N/A | | `allowServerlessConcurrency` | *boolean* | :heavy_minus_sign: | N/A | | `elasticConcurrencyEnabled` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getprojectsresponsebody.md b/docs/models/getprojectsresponsebody.md index 1040a50c..faa25caa 100644 --- a/docs/models/getprojectsresponsebody.md +++ b/docs/models/getprojectsresponsebody.md @@ -12,9 +12,9 @@ let value: GetProjectsResponseBody = { { accountId: "", crons: { - enabledAt: 9627.70, - disabledAt: 168.72, - updatedAt: 6964.82, + enabledAt: 6964.83, + disabledAt: 8136.79, + updatedAt: 5098.07, deploymentId: "", definitions: [ { @@ -29,21 +29,21 @@ let value: GetProjectsResponseBody = { latestDeployments: [ { id: "", - createdAt: 8136.79, + createdAt: 3339.65, createdIn: "", creator: { - email: "Estella51@yahoo.com", + email: "Avis_Leannon9@hotmail.com", uid: "", - username: "Aubrey_Jenkins", + username: "Halle13", }, deploymentHostname: "", name: "", - plan: "pro", + plan: "hobby", previewCommentsEnabled: false, private: false, - readyState: "CANCELED", + readyState: "QUEUED", type: "LAMBDAS", - url: "https://meager-topsail.name", + url: "https://nautical-traditionalism.net", userId: "", }, ], @@ -52,21 +52,21 @@ let value: GetProjectsResponseBody = { targets: { "key": { id: "", - createdAt: 8298.97, + createdAt: 9197.83, createdIn: "", creator: { - email: "Tevin.Daniel95@hotmail.com", + email: "Chandler16@gmail.com", uid: "", - username: "Carole_King", + username: "Isabelle_Cronin44", }, deploymentHostname: "", name: "", - plan: "enterprise", + plan: "hobby", previewCommentsEnabled: false, private: false, - readyState: "BUILDING", + readyState: "ERROR", type: "LAMBDAS", - url: "https://experienced-antelope.com", + url: "https://bare-bar.org/", userId: "", }, }, diff --git a/docs/models/getprojectstarget2.md b/docs/models/getprojectstarget2.md index dd3e7a31..1dd4bef0 100644 --- a/docs/models/getprojectstarget2.md +++ b/docs/models/getprojectstarget2.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsTarget2 } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsTarget2 = "preview"; +let value: GetProjectsTarget2 = "development"; ``` ## Values diff --git a/docs/models/getprojectstargets.md b/docs/models/getprojectstargets.md index a7076178..a959bd8d 100644 --- a/docs/models/getprojectstargets.md +++ b/docs/models/getprojectstargets.md @@ -7,21 +7,21 @@ import { GetProjectsTargets } from "@vercel/sdk/models/getprojectsop.js"; let value: GetProjectsTargets = { id: "", - createdAt: 9920.11, + createdAt: 9509.53, createdIn: "", creator: { - email: "Benjamin73@gmail.com", + email: "Mary_Renner@gmail.com", uid: "", - username: "Donnie_Hirthe23", + username: "Garland.Ferry44", }, deploymentHostname: "", name: "", - plan: "enterprise", + plan: "hobby", previewCommentsEnabled: false, private: false, readyState: "ERROR", type: "LAMBDAS", - url: "https://everlasting-knitting.org", + url: "https://watery-overcoat.org", userId: "", }; ``` diff --git a/docs/models/getprojectstrustedips.md b/docs/models/getprojectstrustedips.md index fbb5e156..61a0b7a2 100644 --- a/docs/models/getprojectstrustedips.md +++ b/docs/models/getprojectstrustedips.md @@ -7,7 +7,7 @@ ```typescript const value: models.GetProjectsTrustedIps1 = { - deploymentType: "production", + deploymentType: "preview", addresses: [ { value: "", @@ -21,7 +21,7 @@ const value: models.GetProjectsTrustedIps1 = { ```typescript const value: models.GetProjectsTrustedIps2 = { - deploymentType: "preview", + deploymentType: "prod_deployment_urls_and_all_previews", }; ``` diff --git a/docs/models/getprojectstrustedips1.md b/docs/models/getprojectstrustedips1.md index cdf81837..8f51779a 100644 --- a/docs/models/getprojectstrustedips1.md +++ b/docs/models/getprojectstrustedips1.md @@ -12,7 +12,7 @@ let value: GetProjectsTrustedIps1 = { value: "", }, ], - protectionMode: "additional", + protectionMode: "exclusive", }; ``` diff --git a/docs/models/getprojectstrustedipsprojectsdeploymenttype.md b/docs/models/getprojectstrustedipsprojectsdeploymenttype.md index c3b57f79..1e9ea132 100644 --- a/docs/models/getprojectstrustedipsprojectsdeploymenttype.md +++ b/docs/models/getprojectstrustedipsprojectsdeploymenttype.md @@ -5,8 +5,7 @@ ```typescript import { GetProjectsTrustedIpsProjectsDeploymentType } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsTrustedIpsProjectsDeploymentType = - "prod_deployment_urls_and_all_previews"; +let value: GetProjectsTrustedIpsProjectsDeploymentType = "production"; ``` ## Values diff --git a/docs/models/getprojectstype.md b/docs/models/getprojectstype.md index a0728d5a..be7aa82c 100644 --- a/docs/models/getprojectstype.md +++ b/docs/models/getprojectstype.md @@ -5,7 +5,7 @@ ```typescript import { GetProjectsType } from "@vercel/sdk/models/getprojectsop.js"; -let value: GetProjectsType = "sensitive"; +let value: GetProjectsType = "plain"; ``` ## Values diff --git a/docs/models/getrecordsresponsebody.md b/docs/models/getrecordsresponsebody.md index 9d3f223a..e037e34b 100644 --- a/docs/models/getrecordsresponsebody.md +++ b/docs/models/getrecordsresponsebody.md @@ -25,7 +25,7 @@ const value: models.GetRecordsResponseBody2 = { creator: "", created: 1274.99, updated: 8406.41, - createdAt: 597.58, + createdAt: 597.57, updatedAt: 3502.71, }, ], @@ -44,9 +44,9 @@ const value: models.ResponseBody3 = { type: "NS", value: "", creator: "", - created: 9607.66, + created: 9607.67, updated: 6405.65, - createdAt: 6886.48, + createdAt: 6886.49, updatedAt: 424.54, }, ], diff --git a/docs/models/getrecordsresponsebody2.md b/docs/models/getrecordsresponsebody2.md index 68c42e77..e3acad2c 100644 --- a/docs/models/getrecordsresponsebody2.md +++ b/docs/models/getrecordsresponsebody2.md @@ -15,7 +15,7 @@ let value: GetRecordsResponseBody2 = { value: "", creator: "", created: 8488.33, - updated: 8048.78, + updated: 8048.79, createdAt: 9983.55, updatedAt: 8473.08, }, diff --git a/docs/models/getteamaccessrequestgituserid.md b/docs/models/getteamaccessrequestgituserid.md index 983f3832..73b1a60b 100644 --- a/docs/models/getteamaccessrequestgituserid.md +++ b/docs/models/getteamaccessrequestgituserid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 4671.09; +const value: number = 4576.85; ``` diff --git a/docs/models/getteamaccessrequestjoinedfrom.md b/docs/models/getteamaccessrequestjoinedfrom.md index be48c7cb..be8ce778 100644 --- a/docs/models/getteamaccessrequestjoinedfrom.md +++ b/docs/models/getteamaccessrequestjoinedfrom.md @@ -8,7 +8,7 @@ A map that describes the origin from where the user joined. import { GetTeamAccessRequestJoinedFrom } from "@vercel/sdk/models/getteamaccessrequestop.js"; let value: GetTeamAccessRequestJoinedFrom = { - origin: "dsync", + origin: "feedback", }; ``` diff --git a/docs/models/getteamaccessrequestorigin.md b/docs/models/getteamaccessrequestorigin.md index 5ff7644e..f02c63b8 100644 --- a/docs/models/getteamaccessrequestorigin.md +++ b/docs/models/getteamaccessrequestorigin.md @@ -5,7 +5,7 @@ ```typescript import { GetTeamAccessRequestOrigin } from "@vercel/sdk/models/getteamaccessrequestop.js"; -let value: GetTeamAccessRequestOrigin = "bitbucket"; +let value: GetTeamAccessRequestOrigin = "link"; ``` ## Values diff --git a/docs/models/getteamaccessrequestresponsebody.md b/docs/models/getteamaccessrequestresponsebody.md index 09ef19f3..ecd48ffd 100644 --- a/docs/models/getteamaccessrequestresponsebody.md +++ b/docs/models/getteamaccessrequestresponsebody.md @@ -12,7 +12,7 @@ let value: GetTeamAccessRequestResponseBody = { teamName: "My Team", confirmed: false, joinedFrom: { - origin: "mail", + origin: "saml", }, accessRequestedAt: 1588720733602, github: {}, diff --git a/docs/models/getteammembersgituserid.md b/docs/models/getteammembersgituserid.md index 2bdce523..5a97d0c7 100644 --- a/docs/models/getteammembersgituserid.md +++ b/docs/models/getteammembersgituserid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 6141.75; +const value: number = 3274.11; ``` diff --git a/docs/models/getteammembersjoinedfrom.md b/docs/models/getteammembersjoinedfrom.md index f12f23ed..b50eac25 100644 --- a/docs/models/getteammembersjoinedfrom.md +++ b/docs/models/getteammembersjoinedfrom.md @@ -8,7 +8,7 @@ Map with information about the members origin if they joined by requesting acces import { GetTeamMembersJoinedFrom } from "@vercel/sdk/models/getteammembersop.js"; let value: GetTeamMembersJoinedFrom = { - origin: "github", + origin: "saml", }; ``` diff --git a/docs/models/getteammembersmembers.md b/docs/models/getteammembersmembers.md index 4fe92211..724c106d 100644 --- a/docs/models/getteammembersmembers.md +++ b/docs/models/getteammembersmembers.md @@ -10,6 +10,9 @@ let value: GetTeamMembersMembers = { confirmed: true, email: "jane.doe@example.com", role: "OWNER", + additionalRoles: [ + "['createProjects']", + ], uid: "zTuNVUXEAvvnNN3IaqinkyMw", username: "jane-doe", name: "Jane Doe", @@ -29,6 +32,7 @@ let value: GetTeamMembersMembers = { | `gitlab` | [models.GetTeamMembersGitlab](../models/getteammembersgitlab.md) | :heavy_minus_sign: | Information about the GitLab account of this user. | | | `bitbucket` | [models.GetTeamMembersBitbucket](../models/getteammembersbitbucket.md) | :heavy_minus_sign: | Information about the Bitbucket account of this user. | | | `role` | [models.GetTeamMembersRole](../models/getteammembersrole.md) | :heavy_check_mark: | Role of this user in the team. | OWNER | +| `additionalRoles` | *string*[] | :heavy_minus_sign: | Permissions that this user has in addition to their role. | ['createProjects'] | | `uid` | *string* | :heavy_check_mark: | The ID of this user. | zTuNVUXEAvvnNN3IaqinkyMw | | `username` | *string* | :heavy_check_mark: | The unique username of this user. | jane-doe | | `name` | *string* | :heavy_minus_sign: | The name of this user. | Jane Doe | diff --git a/docs/models/getteammembersorigin.md b/docs/models/getteammembersorigin.md index 344cae89..ea26f68a 100644 --- a/docs/models/getteammembersorigin.md +++ b/docs/models/getteammembersorigin.md @@ -5,7 +5,7 @@ ```typescript import { GetTeamMembersOrigin } from "@vercel/sdk/models/getteammembersop.js"; -let value: GetTeamMembersOrigin = "import"; +let value: GetTeamMembersOrigin = "organization-teams"; ``` ## Values diff --git a/docs/models/getteammembersresponsebody.md b/docs/models/getteammembersresponsebody.md index fcf6b5ac..dbb0e63e 100644 --- a/docs/models/getteammembersresponsebody.md +++ b/docs/models/getteammembersresponsebody.md @@ -12,6 +12,9 @@ let value: GetTeamMembersResponseBody = { confirmed: true, email: "jane.doe@example.com", role: "OWNER", + additionalRoles: [ + "['createProjects']", + ], uid: "zTuNVUXEAvvnNN3IaqinkyMw", username: "jane-doe", name: "Jane Doe", diff --git a/docs/models/getteammembersteamsresponserole.md b/docs/models/getteammembersteamsresponserole.md index 8243f91a..d98571b0 100644 --- a/docs/models/getteammembersteamsresponserole.md +++ b/docs/models/getteammembersteamsresponserole.md @@ -5,7 +5,7 @@ ```typescript import { GetTeamMembersTeamsResponseRole } from "@vercel/sdk/models/getteammembersop.js"; -let value: GetTeamMembersTeamsResponseRole = "ADMIN"; +let value: GetTeamMembersTeamsResponseRole = "PROJECT_DEVELOPER"; ``` ## Values diff --git a/docs/models/getteammembersteamsrole.md b/docs/models/getteammembersteamsrole.md index 649d65c8..22127157 100644 --- a/docs/models/getteammembersteamsrole.md +++ b/docs/models/getteammembersteamsrole.md @@ -5,7 +5,7 @@ ```typescript import { GetTeamMembersTeamsRole } from "@vercel/sdk/models/getteammembersop.js"; -let value: GetTeamMembersTeamsRole = "VIEWER"; +let value: GetTeamMembersTeamsRole = "OWNER"; ``` ## Values diff --git a/docs/models/getteamsresponsebody.md b/docs/models/getteamsresponsebody.md index 6e846a1a..d110028d 100644 --- a/docs/models/getteamsresponsebody.md +++ b/docs/models/getteamsresponsebody.md @@ -10,36 +10,7 @@ import { GetTeamsResponseBody } from "@vercel/sdk/models/getteamsop.js"; let value: GetTeamsResponseBody = { teams: [ { - limited: false, - saml: { - connection: { - type: "OktaSAML", - status: "linked", - state: "active", - connectedAt: 1611796915677, - lastReceivedWebhookEvent: 1611796915677, - }, - directory: { - type: "OktaSAML", - state: "active", - connectedAt: 1611796915677, - lastReceivedWebhookEvent: 1611796915677, - }, - enforced: false, - }, - id: "team_nllPyCtREAqxxdyFKbbMDlxd", - slug: "my-team", - name: "My Team", - avatar: "6eb07268bcfadd309905ffb1579354084c24655c", - membership: { - confirmed: false, - confirmedAt: 7384.02, - role: "BILLING", - createdAt: 9828.03, - created: 4994.61, - }, - created: "", - createdAt: 1630748523395, + "key": "", }, ], pagination: { diff --git a/docs/models/getv9projectsidornamecustomenvironmentsenvironments.md b/docs/models/getv9projectsidornamecustomenvironmentsenvironments.md new file mode 100644 index 00000000..d7875990 --- /dev/null +++ b/docs/models/getv9projectsidornamecustomenvironmentsenvironments.md @@ -0,0 +1,14 @@ +# GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments + +## Example Usage + +```typescript +import { GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments } from "@vercel/sdk/models/getv9projectsidornamecustomenvironmentsop.js"; + +let value: GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md b/docs/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md new file mode 100644 index 00000000..12b702a5 --- /dev/null +++ b/docs/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md @@ -0,0 +1,23 @@ +# GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest + +## Example Usage + +```typescript +import { GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest } from "@vercel/sdk/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest = { + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `idOrName` | *string* | :heavy_check_mark: | The unique project identifier or the project name | | +| `environmentSlugOrId` | *string* | :heavy_check_mark: | The unique custom environment identifier within the project | | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | \ No newline at end of file diff --git a/docs/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md b/docs/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md new file mode 100644 index 00000000..9ae5fd4e --- /dev/null +++ b/docs/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md @@ -0,0 +1,15 @@ +# GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + +## Example Usage + +```typescript +import { GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody } from "@vercel/sdk/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/getv9projectsidornamecustomenvironmentsrequest.md b/docs/models/getv9projectsidornamecustomenvironmentsrequest.md new file mode 100644 index 00000000..f59d8e52 --- /dev/null +++ b/docs/models/getv9projectsidornamecustomenvironmentsrequest.md @@ -0,0 +1,22 @@ +# GetV9ProjectsIdOrNameCustomEnvironmentsRequest + +## Example Usage + +```typescript +import { GetV9ProjectsIdOrNameCustomEnvironmentsRequest } from "@vercel/sdk/models/getv9projectsidornamecustomenvironmentsop.js"; + +let value: GetV9ProjectsIdOrNameCustomEnvironmentsRequest = { + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `idOrName` | *string* | :heavy_check_mark: | The unique project identifier or the project name | | +| `gitBranch` | *string* | :heavy_minus_sign: | Fetch custom environments for a specific git branch | | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | \ No newline at end of file diff --git a/docs/models/getv9projectsidornamecustomenvironmentsresponsebody.md b/docs/models/getv9projectsidornamecustomenvironmentsresponsebody.md new file mode 100644 index 00000000..e84feaa4 --- /dev/null +++ b/docs/models/getv9projectsidornamecustomenvironmentsresponsebody.md @@ -0,0 +1,19 @@ +# GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody + +## Example Usage + +```typescript +import { GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody } from "@vercel/sdk/models/getv9projectsidornamecustomenvironmentsop.js"; + +let value: GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody = { + environments: [ + {}, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `environments` | [models.GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments](../models/getv9projectsidornamecustomenvironmentsenvironments.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getwebhookevents.md b/docs/models/getwebhookevents.md index 1327036c..46070b63 100644 --- a/docs/models/getwebhookevents.md +++ b/docs/models/getwebhookevents.md @@ -13,5 +13,5 @@ let value: GetWebhookEvents = "deployment.created"; ## Values ```typescript -"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" +"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "integration-resource.project-connected" | "integration-resource.project-disconnected" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" ``` \ No newline at end of file diff --git a/docs/models/getwebhooksresponsebodyevents.md b/docs/models/getwebhooksresponsebodyevents.md index a44f24ae..fc9ad884 100644 --- a/docs/models/getwebhooksresponsebodyevents.md +++ b/docs/models/getwebhooksresponsebodyevents.md @@ -13,5 +13,5 @@ let value: GetWebhooksResponseBodyEvents = "deployment.created"; ## Values ```typescript -"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" +"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "integration-resource.project-connected" | "integration-resource.project-disconnected" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" ``` \ No newline at end of file diff --git a/docs/models/getwebhooksresponsebodyframework.md b/docs/models/getwebhooksresponsebodyframework.md index 105ea3bf..129f80bb 100644 --- a/docs/models/getwebhooksresponsebodyframework.md +++ b/docs/models/getwebhooksresponsebodyframework.md @@ -5,7 +5,7 @@ ```typescript import { GetWebhooksResponseBodyFramework } from "@vercel/sdk/models/getwebhooksop.js"; -let value: GetWebhooksResponseBodyFramework = "parcel"; +let value: GetWebhooksResponseBodyFramework = "svelte"; ``` ## Values diff --git a/docs/models/gitaccount.md b/docs/models/gitaccount.md index 7bf55794..4483d39e 100644 --- a/docs/models/gitaccount.md +++ b/docs/models/gitaccount.md @@ -6,7 +6,7 @@ import { GitAccount } from "@vercel/sdk/models/searchrepoop.js"; let value: GitAccount = { - provider: "bitbucket", + provider: "github", namespaceId: "", }; ``` diff --git a/docs/models/gitnamespaceid.md b/docs/models/gitnamespaceid.md index a0cf9bb9..064c1122 100644 --- a/docs/models/gitnamespaceid.md +++ b/docs/models/gitnamespaceid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 7428.98; +const value: number = 7428.99; ``` diff --git a/docs/models/gitnamespacesid.md b/docs/models/gitnamespacesid.md index 2d4c495a..4f84588d 100644 --- a/docs/models/gitnamespacesid.md +++ b/docs/models/gitnamespacesid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 9438.28; +const value: number = 1439.76; ``` diff --git a/docs/models/gitnamespacesresponsebody.md b/docs/models/gitnamespacesresponsebody.md index 0c919bdd..4eac87fa 100644 --- a/docs/models/gitnamespacesresponsebody.md +++ b/docs/models/gitnamespacesresponsebody.md @@ -8,7 +8,7 @@ import { GitNamespacesResponseBody } from "@vercel/sdk/models/gitnamespacesop.js let value: GitNamespacesResponseBody = { provider: "", slug: "", - id: 2875.75, + id: 7133.71, ownerType: "", }; ``` diff --git a/docs/models/gitrepo.md b/docs/models/gitrepo.md index 92176f55..4a007a3f 100644 --- a/docs/models/gitrepo.md +++ b/docs/models/gitrepo.md @@ -27,7 +27,7 @@ const value: models.GitRepo2 = { repo: "", repoId: 5161.24, type: "github", - repoOwnerId: 2198.61, + repoOwnerId: 2198.6, path: "/lost+found", defaultBranch: "", name: "", diff --git a/docs/models/gitrepo2.md b/docs/models/gitrepo2.md index 02a87079..2544ab8e 100644 --- a/docs/models/gitrepo2.md +++ b/docs/models/gitrepo2.md @@ -10,7 +10,7 @@ let value: GitRepo2 = { repo: "", repoId: 7665.91, type: "github", - repoOwnerId: 6886.83, + repoOwnerId: 6886.84, path: "/usr/bin", defaultBranch: "", name: "", diff --git a/docs/models/gitrepository.md b/docs/models/gitrepository.md index cdceac52..79547907 100644 --- a/docs/models/gitrepository.md +++ b/docs/models/gitrepository.md @@ -9,7 +9,7 @@ import { GitRepository } from "@vercel/sdk/models/createprojectop.js"; let value: GitRepository = { repo: "", - type: "gitlab", + type: "bitbucket", }; ``` diff --git a/docs/models/gitsourceprojectid.md b/docs/models/gitsourceprojectid.md index 80091b18..933e6059 100644 --- a/docs/models/gitsourceprojectid.md +++ b/docs/models/gitsourceprojectid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 142.52; +const value: number = 142.51; ``` diff --git a/docs/models/gituserid.md b/docs/models/gituserid.md index 6b69bf5f..80cc800d 100644 --- a/docs/models/gituserid.md +++ b/docs/models/gituserid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 6020.76; +const value: number = 1078.49; ``` diff --git a/docs/models/handle.md b/docs/models/handle.md index 950569a9..325d4ff0 100644 --- a/docs/models/handle.md +++ b/docs/models/handle.md @@ -5,7 +5,7 @@ ```typescript import { Handle } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: Handle = "finalize"; +let value: Handle = "init"; ``` ## Values diff --git a/docs/models/id.md b/docs/models/id.md index b2fec2e4..985e53a4 100644 --- a/docs/models/id.md +++ b/docs/models/id.md @@ -5,7 +5,7 @@ ```typescript import { Id } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: Id = "gen"; +let value: Id = "xss"; ``` ## Values diff --git a/docs/models/integration.md b/docs/models/integration.md index cd83dadb..52394092 100644 --- a/docs/models/integration.md +++ b/docs/models/integration.md @@ -15,11 +15,12 @@ let value: Integration = { ## Fields -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `icon` | *string* | :heavy_check_mark: | N/A | -| `category` | *string* | :heavy_check_mark: | N/A | -| `isLegacy` | *boolean* | :heavy_check_mark: | N/A | -| `flags` | *string*[] | :heavy_minus_sign: | N/A | -| `assignedBetaLabelAt` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `icon` | *string* | :heavy_check_mark: | N/A | +| `category` | *string* | :heavy_check_mark: | N/A | +| `isLegacy` | *boolean* | :heavy_check_mark: | N/A | +| `flags` | *string*[] | :heavy_minus_sign: | N/A | +| `assignedBetaLabelAt` | *number* | :heavy_minus_sign: | N/A | +| `tagIds` | [models.TagIds](../models/tagids.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/integrations.md b/docs/models/integrations.md index c72fbc20..e5d5457c 100644 --- a/docs/models/integrations.md +++ b/docs/models/integrations.md @@ -7,7 +7,7 @@ import { Integrations } from "@vercel/sdk/models/createdeploymentop.js"; let value: Integrations = { status: "ready", - startedAt: 9378.64, + startedAt: 9378.65, }; ``` diff --git a/docs/models/inviteusertoteamrequest.md b/docs/models/inviteusertoteamrequest.md index 3093372c..365f1485 100644 --- a/docs/models/inviteusertoteamrequest.md +++ b/docs/models/inviteusertoteamrequest.md @@ -10,7 +10,7 @@ let value: InviteUserToTeamRequest = { requestBody: { uid: "kr1PsOIzqEL5Xg6M4VZcZosf", email: "john@example.com", - role: "BILLING", + role: "VIEWER", projects: [ { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", diff --git a/docs/models/inviteusertoteamrequestbody.md b/docs/models/inviteusertoteamrequestbody.md index 30accdbe..eb3e0d67 100644 --- a/docs/models/inviteusertoteamrequestbody.md +++ b/docs/models/inviteusertoteamrequestbody.md @@ -8,7 +8,7 @@ import { InviteUserToTeamRequestBody } from "@vercel/sdk/models/inviteusertoteam let value: InviteUserToTeamRequestBody = { uid: "kr1PsOIzqEL5Xg6M4VZcZosf", email: "john@example.com", - role: "DEVELOPER", + role: "OWNER", projects: [ { projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", diff --git a/docs/models/inviteusertoteamresponsebody.md b/docs/models/inviteusertoteamresponsebody.md index b84c7527..e9d00dd7 100644 --- a/docs/models/inviteusertoteamresponsebody.md +++ b/docs/models/inviteusertoteamresponsebody.md @@ -21,8 +21,8 @@ const value: models.InviteUserToTeamResponseBody1 = { ```typescript const value: models.InviteUserToTeamResponseBody2 = { uid: "", - username: "Marge_Green-Greenfelder79", - role: "BILLING", + username: "Ole_Auer19", + role: "CONTRIBUTOR", }; ``` diff --git a/docs/models/inviteusertoteamresponsebody2.md b/docs/models/inviteusertoteamresponsebody2.md index 1bde99aa..fbd1b0c7 100644 --- a/docs/models/inviteusertoteamresponsebody2.md +++ b/docs/models/inviteusertoteamresponsebody2.md @@ -7,8 +7,8 @@ import { InviteUserToTeamResponseBody2 } from "@vercel/sdk/models/inviteusertote let value: InviteUserToTeamResponseBody2 = { uid: "", - username: "Isaiah_Schimmel-Shanahan", - role: "VIEWER", + username: "Darrick.Schimmel", + role: "CONTRIBUTOR", }; ``` diff --git a/docs/models/inviteusertoteamresponsebodyrole.md b/docs/models/inviteusertoteamresponsebodyrole.md index 17126c5d..7b5bd0e6 100644 --- a/docs/models/inviteusertoteamresponsebodyrole.md +++ b/docs/models/inviteusertoteamresponsebodyrole.md @@ -5,7 +5,7 @@ ```typescript import { InviteUserToTeamResponseBodyRole } from "@vercel/sdk/models/inviteusertoteamop.js"; -let value: InviteUserToTeamResponseBodyRole = "VIEWER"; +let value: InviteUserToTeamResponseBodyRole = "DEVELOPER"; ``` ## Values diff --git a/docs/models/inviteusertoteamrole.md b/docs/models/inviteusertoteamrole.md index 0f93532b..ff096a59 100644 --- a/docs/models/inviteusertoteamrole.md +++ b/docs/models/inviteusertoteamrole.md @@ -7,7 +7,7 @@ The role of the user to invite ```typescript import { InviteUserToTeamRole } from "@vercel/sdk/models/inviteusertoteamop.js"; -let value: InviteUserToTeamRole = "VIEWER"; +let value: InviteUserToTeamRole = "BILLING"; ``` ## Values diff --git a/docs/models/ips.md b/docs/models/ips.md index 8a300eda..c72d777f 100644 --- a/docs/models/ips.md +++ b/docs/models/ips.md @@ -6,8 +6,8 @@ import { Ips } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Ips = { - hostname: "optimistic-obesity.com", - ip: "bb19:55bd:90ff:40be:ec67:da25:62ae:e106", + hostname: "expert-dulcimer.com", + ip: "234.171.18.1", action: "challenge", }; ``` diff --git a/docs/models/issuecertresponsebody.md b/docs/models/issuecertresponsebody.md index 173cf833..cd01c9d6 100644 --- a/docs/models/issuecertresponsebody.md +++ b/docs/models/issuecertresponsebody.md @@ -7,8 +7,8 @@ import { IssueCertResponseBody } from "@vercel/sdk/models/issuecertop.js"; let value: IssueCertResponseBody = { id: "", - createdAt: 2665.05, - expiresAt: 9637.49, + createdAt: 8048.94, + expiresAt: 9585.86, autoRenew: false, cns: [ "", diff --git a/docs/models/items2.md b/docs/models/items2.md index fef1daf8..1f5ce3e3 100644 --- a/docs/models/items2.md +++ b/docs/models/items2.md @@ -12,7 +12,7 @@ const value: string = ""; ### `number` ```typescript -const value: number = 1933.35; +const value: number = 1933.34; ``` ### `boolean` diff --git a/docs/models/java.md b/docs/models/java.md index f8edee8c..f3b1d614 100644 --- a/docs/models/java.md +++ b/docs/models/java.md @@ -9,7 +9,7 @@ import { Java } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Java = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/jobstatus.md b/docs/models/jobstatus.md index dad1a837..f90f9a1c 100644 --- a/docs/models/jobstatus.md +++ b/docs/models/jobstatus.md @@ -5,7 +5,7 @@ ```typescript import { JobStatus } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: JobStatus = "succeeded"; +let value: JobStatus = "failed"; ``` ## Values diff --git a/docs/models/joinedfrom.md b/docs/models/joinedfrom.md index 9876c5b7..8ddd08f5 100644 --- a/docs/models/joinedfrom.md +++ b/docs/models/joinedfrom.md @@ -6,7 +6,7 @@ import { JoinedFrom } from "@vercel/sdk/models/teamlimited.js"; let value: JoinedFrom = { - origin: "import", + origin: "bitbucket", }; ``` diff --git a/docs/models/lastaliasrequest.md b/docs/models/lastaliasrequest.md index 23bdc178..d18a8200 100644 --- a/docs/models/lastaliasrequest.md +++ b/docs/models/lastaliasrequest.md @@ -8,9 +8,9 @@ import { LastAliasRequest } from "@vercel/sdk/models/updateprojectdatacacheop.js let value: LastAliasRequest = { fromDeploymentId: "", toDeploymentId: "", - jobStatus: "pending", - requestedAt: 7851.53, - type: "promote", + jobStatus: "succeeded", + requestedAt: 4856.28, + type: "rollback", }; ``` diff --git a/docs/models/latestdeployments.md b/docs/models/latestdeployments.md index b8c961d7..d2079fdf 100644 --- a/docs/models/latestdeployments.md +++ b/docs/models/latestdeployments.md @@ -7,21 +7,21 @@ import { LatestDeployments } from "@vercel/sdk/models/updateprojectdatacacheop.j let value: LatestDeployments = { id: "", - createdAt: 6974.29, + createdAt: 9755.22, createdIn: "", creator: { - email: "Mireya_Wolf@yahoo.com", + email: "Adolf.Renner52@hotmail.com", uid: "", - username: "Morgan.Lebsack19", + username: "Cody34", }, deploymentHostname: "", name: "", plan: "hobby", previewCommentsEnabled: false, private: false, - readyState: "ERROR", + readyState: "BUILDING", type: "LAMBDAS", - url: "https://velvety-presume.com/", + url: "https://poor-minority.biz/", userId: "", }; ``` @@ -36,7 +36,7 @@ let value: LatestDeployments = { | `aliasError` | [models.UpdateProjectDataCacheProjectsAliasError](../models/updateprojectdatacacheprojectsaliaserror.md) | :heavy_minus_sign: | N/A | | | `aliasFinal` | *string* | :heavy_minus_sign: | N/A | | | `automaticAliases` | *string*[] | :heavy_minus_sign: | N/A | | -| `branchMatcher` | [models.BranchMatcher](../models/branchmatcher.md) | :heavy_minus_sign: | N/A | | +| `branchMatcher` | [models.UpdateProjectDataCacheProjectsBranchMatcher](../models/updateprojectdatacacheprojectsbranchmatcher.md) | :heavy_minus_sign: | N/A | | | `buildingAt` | *number* | :heavy_minus_sign: | N/A | | | `builds` | [models.UpdateProjectDataCacheProjectsBuilds](../models/updateprojectdatacacheprojectsbuilds.md)[] | :heavy_minus_sign: | N/A | | | `checksConclusion` | [models.UpdateProjectDataCacheProjectsChecksConclusion](../models/updateprojectdatacacheprojectschecksconclusion.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/models/lfi.md b/docs/models/lfi.md index 8cb0a7a4..aa39386b 100644 --- a/docs/models/lfi.md +++ b/docs/models/lfi.md @@ -9,7 +9,7 @@ import { Lfi } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Lfi = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/link.md b/docs/models/link.md index 5553e3e5..cc9bc638 100644 --- a/docs/models/link.md +++ b/docs/models/link.md @@ -12,7 +12,7 @@ const value: models.Link1 = { id: "", name: "", ref: "", - url: "https://bitter-platter.info/", + url: "https://unlucky-word.biz", }, ], }; @@ -27,7 +27,7 @@ const value: models.Link2 = { id: "", name: "", ref: "", - url: "https://unlucky-word.biz", + url: "https://fatherly-agreement.net", }, ], }; @@ -42,7 +42,7 @@ const value: models.Link3 = { id: "", name: "", ref: "", - url: "https://fatherly-agreement.net", + url: "https://ideal-mortise.net/", }, ], }; diff --git a/docs/models/link1.md b/docs/models/link1.md index 937a9cc4..7f999116 100644 --- a/docs/models/link1.md +++ b/docs/models/link1.md @@ -11,7 +11,7 @@ let value: Link1 = { id: "", name: "", ref: "", - url: "https://rubbery-gift.biz/", + url: "https://bitter-platter.info/", }, ], }; diff --git a/docs/models/link2.md b/docs/models/link2.md index f5885094..fb3036d6 100644 --- a/docs/models/link2.md +++ b/docs/models/link2.md @@ -11,7 +11,7 @@ let value: Link2 = { id: "", name: "", ref: "", - url: "https://wealthy-redesign.info/", + url: "https://fake-backburn.info/", }, ], }; diff --git a/docs/models/link3.md b/docs/models/link3.md index f7046b5e..188761a5 100644 --- a/docs/models/link3.md +++ b/docs/models/link3.md @@ -11,7 +11,7 @@ let value: Link3 = { id: "", name: "", ref: "", - url: "https://pleased-lox.name", + url: "https://general-guacamole.biz", }, ], }; diff --git a/docs/models/linkdeployhooks.md b/docs/models/linkdeployhooks.md index 7c740b4d..0be56c69 100644 --- a/docs/models/linkdeployhooks.md +++ b/docs/models/linkdeployhooks.md @@ -9,7 +9,7 @@ let value: LinkDeployHooks = { id: "", name: "", ref: "", - url: "https://general-guacamole.biz", + url: "https://wealthy-redesign.info/", }; ``` diff --git a/docs/models/listaccessgroupmemberspagination.md b/docs/models/listaccessgroupmemberspagination.md index 5d1886b6..f6be933c 100644 --- a/docs/models/listaccessgroupmemberspagination.md +++ b/docs/models/listaccessgroupmemberspagination.md @@ -6,7 +6,7 @@ import { ListAccessGroupMembersPagination } from "@vercel/sdk/models/listaccessgroupmembersop.js"; let value: ListAccessGroupMembersPagination = { - count: 871.29, + count: 7781.57, next: "", }; ``` diff --git a/docs/models/listaccessgroupmembersresponsebody.md b/docs/models/listaccessgroupmembersresponsebody.md index ff94011d..476f59dc 100644 --- a/docs/models/listaccessgroupmembersresponsebody.md +++ b/docs/models/listaccessgroupmembersresponsebody.md @@ -8,14 +8,14 @@ import { ListAccessGroupMembersResponseBody } from "@vercel/sdk/models/listacces let value: ListAccessGroupMembersResponseBody = { members: [ { - email: "Rita_Strosin@gmail.com", + email: "Wilford_Koepp@hotmail.com", uid: "", - username: "Osborne.Nikolaus", + username: "Buck26", teamRole: "DEVELOPER", }, ], pagination: { - count: 2645.56, + count: 5684.34, next: "", }, }; diff --git a/docs/models/listaccessgroupprojectspagination.md b/docs/models/listaccessgroupprojectspagination.md index baede1cf..629e7bd8 100644 --- a/docs/models/listaccessgroupprojectspagination.md +++ b/docs/models/listaccessgroupprojectspagination.md @@ -6,7 +6,7 @@ import { ListAccessGroupProjectsPagination } from "@vercel/sdk/models/listaccessgroupprojectsop.js"; let value: ListAccessGroupProjectsPagination = { - count: 3595.08, + count: 602.25, next: "", }; ``` diff --git a/docs/models/listaccessgroupprojectsprojects.md b/docs/models/listaccessgroupprojectsprojects.md index 33d2d222..48719b87 100644 --- a/docs/models/listaccessgroupprojectsprojects.md +++ b/docs/models/listaccessgroupprojectsprojects.md @@ -8,8 +8,8 @@ import { ListAccessGroupProjectsProjects } from "@vercel/sdk/models/listaccessgr let value: ListAccessGroupProjectsProjects = { projectId: "", role: "PROJECT_DEVELOPER", - createdAt: "1734431577285", - updatedAt: "1736178047417", + createdAt: "1719311033929", + updatedAt: "1737038669309", project: {}, }; ``` diff --git a/docs/models/listaccessgroupprojectsresponsebody.md b/docs/models/listaccessgroupprojectsresponsebody.md index 31913ead..a7bd9670 100644 --- a/docs/models/listaccessgroupprojectsresponsebody.md +++ b/docs/models/listaccessgroupprojectsresponsebody.md @@ -9,14 +9,14 @@ let value: ListAccessGroupProjectsResponseBody = { projects: [ { projectId: "", - role: "PROJECT_DEVELOPER", - createdAt: "1726670035529", - updatedAt: "1736124342252", + role: "PROJECT_VIEWER", + createdAt: "1726678029864", + updatedAt: "1736996571521", project: {}, }, ], pagination: { - count: 6667.67, + count: 1289.26, next: "", }, }; diff --git a/docs/models/listaccessgroupprojectsrole.md b/docs/models/listaccessgroupprojectsrole.md index fb73949e..78e015b9 100644 --- a/docs/models/listaccessgroupprojectsrole.md +++ b/docs/models/listaccessgroupprojectsrole.md @@ -5,7 +5,7 @@ ```typescript import { ListAccessGroupProjectsRole } from "@vercel/sdk/models/listaccessgroupprojectsop.js"; -let value: ListAccessGroupProjectsRole = "PROJECT_DEVELOPER"; +let value: ListAccessGroupProjectsRole = "PROJECT_VIEWER"; ``` ## Values diff --git a/docs/models/listaccessgroupsresponsebody.md b/docs/models/listaccessgroupsresponsebody.md index a033c740..c93c7f1b 100644 --- a/docs/models/listaccessgroupsresponsebody.md +++ b/docs/models/listaccessgroupsresponsebody.md @@ -26,7 +26,7 @@ const value: models.ListAccessGroupsResponseBody2 = { }, ], pagination: { - count: 5684.34, + count: 6120.96, next: "", }, }; diff --git a/docs/models/listaccessgroupsresponsebody2.md b/docs/models/listaccessgroupsresponsebody2.md index 5789b17d..d2d8147a 100644 --- a/docs/models/listaccessgroupsresponsebody2.md +++ b/docs/models/listaccessgroupsresponsebody2.md @@ -19,7 +19,7 @@ let value: ListAccessGroupsResponseBody2 = { }, ], pagination: { - count: 4561.50, + count: 6176.36, next: "", }, }; diff --git a/docs/models/listaliasesprotectionbypass.md b/docs/models/listaliasesprotectionbypass.md index 7e9ac66b..75313148 100644 --- a/docs/models/listaliasesprotectionbypass.md +++ b/docs/models/listaliasesprotectionbypass.md @@ -7,7 +7,7 @@ ```typescript const value: models.ListAliasesProtectionBypass1 = { - createdAt: 5104.01, + createdAt: 1062.01, createdBy: "", scope: "shareable-link", }; @@ -17,10 +17,10 @@ const value: models.ListAliasesProtectionBypass1 = { ```typescript const value: models.ListAliasesProtectionBypass2 = { - createdAt: 2916.49, - lastUpdatedAt: 2221.40, + createdAt: 9115.47, + lastUpdatedAt: 3688.49, lastUpdatedBy: "", - access: "granted", + access: "requested", scope: "user", }; ``` @@ -29,7 +29,7 @@ const value: models.ListAliasesProtectionBypass2 = { ```typescript const value: models.ListAliasesProtectionBypass3 = { - createdAt: 1557.63, + createdAt: 4284.82, createdBy: "", scope: "alias-protection-override", }; @@ -39,8 +39,8 @@ const value: models.ListAliasesProtectionBypass3 = { ```typescript const value: models.ListAliasesProtectionBypass4 = { - createdAt: 2805.90, - lastUpdatedAt: 3861.38, + createdAt: 1164.52, + lastUpdatedAt: 2477.96, lastUpdatedBy: "", scope: "email_invite", }; diff --git a/docs/models/listaliasesprotectionbypass1.md b/docs/models/listaliasesprotectionbypass1.md index 236335af..a5bf3e5b 100644 --- a/docs/models/listaliasesprotectionbypass1.md +++ b/docs/models/listaliasesprotectionbypass1.md @@ -8,7 +8,7 @@ The protection bypass for the alias import { ListAliasesProtectionBypass1 } from "@vercel/sdk/models/listaliasesop.js"; let value: ListAliasesProtectionBypass1 = { - createdAt: 2383.71, + createdAt: 9621.71, createdBy: "", scope: "shareable-link", }; diff --git a/docs/models/listaliasesprotectionbypass2.md b/docs/models/listaliasesprotectionbypass2.md index bbf64659..a982e8d1 100644 --- a/docs/models/listaliasesprotectionbypass2.md +++ b/docs/models/listaliasesprotectionbypass2.md @@ -8,10 +8,10 @@ The protection bypass for the alias import { ListAliasesProtectionBypass2 } from "@vercel/sdk/models/listaliasesop.js"; let value: ListAliasesProtectionBypass2 = { - createdAt: 1984.07, - lastUpdatedAt: 6030.38, + createdAt: 4008.4, + lastUpdatedAt: 7903.41, lastUpdatedBy: "", - access: "requested", + access: "granted", scope: "user", }; ``` diff --git a/docs/models/listaliasesprotectionbypass3.md b/docs/models/listaliasesprotectionbypass3.md index 4896a053..ed9b9916 100644 --- a/docs/models/listaliasesprotectionbypass3.md +++ b/docs/models/listaliasesprotectionbypass3.md @@ -8,7 +8,7 @@ The protection bypass for the alias import { ListAliasesProtectionBypass3 } from "@vercel/sdk/models/listaliasesop.js"; let value: ListAliasesProtectionBypass3 = { - createdAt: 5938.30, + createdAt: 3319.27, createdBy: "", scope: "alias-protection-override", }; diff --git a/docs/models/listaliasesprotectionbypass4.md b/docs/models/listaliasesprotectionbypass4.md index 2d9adea3..12859c5b 100644 --- a/docs/models/listaliasesprotectionbypass4.md +++ b/docs/models/listaliasesprotectionbypass4.md @@ -8,8 +8,8 @@ The protection bypass for the alias import { ListAliasesProtectionBypass4 } from "@vercel/sdk/models/listaliasesop.js"; let value: ListAliasesProtectionBypass4 = { - createdAt: 4493.69, - lastUpdatedAt: 1506.07, + createdAt: 3727.37, + lastUpdatedAt: 9358, lastUpdatedBy: "", scope: "email_invite", }; diff --git a/docs/models/listdeploymentaliasesprotectionbypass.md b/docs/models/listdeploymentaliasesprotectionbypass.md index 218691d6..ffa13b35 100644 --- a/docs/models/listdeploymentaliasesprotectionbypass.md +++ b/docs/models/listdeploymentaliasesprotectionbypass.md @@ -7,7 +7,7 @@ ```typescript const value: models.ListDeploymentAliasesProtectionBypass1 = { - createdAt: 7340.76, + createdAt: 6596.96, createdBy: "", scope: "shareable-link", }; @@ -17,10 +17,10 @@ const value: models.ListDeploymentAliasesProtectionBypass1 = { ```typescript const value: models.ListDeploymentAliasesProtectionBypass2 = { - createdAt: 8579.79, - lastUpdatedAt: 4533.04, + createdAt: 8266.83, + lastUpdatedAt: 6602.91, lastUpdatedBy: "", - access: "requested", + access: "granted", scope: "user", }; ``` @@ -29,7 +29,7 @@ const value: models.ListDeploymentAliasesProtectionBypass2 = { ```typescript const value: models.ListDeploymentAliasesProtectionBypass3 = { - createdAt: 2784.69, + createdAt: 4929.22, createdBy: "", scope: "alias-protection-override", }; @@ -39,8 +39,8 @@ const value: models.ListDeploymentAliasesProtectionBypass3 = { ```typescript const value: models.ListDeploymentAliasesProtectionBypass4 = { - createdAt: 50.52, - lastUpdatedAt: 1863.04, + createdAt: 2048.77, + lastUpdatedAt: 8100.04, lastUpdatedBy: "", scope: "email_invite", }; diff --git a/docs/models/listdeploymentaliasesprotectionbypass1.md b/docs/models/listdeploymentaliasesprotectionbypass1.md index f8c2ef80..5c8008a6 100644 --- a/docs/models/listdeploymentaliasesprotectionbypass1.md +++ b/docs/models/listdeploymentaliasesprotectionbypass1.md @@ -8,7 +8,7 @@ The protection bypass for the alias import { ListDeploymentAliasesProtectionBypass1 } from "@vercel/sdk/models/listdeploymentaliasesop.js"; let value: ListDeploymentAliasesProtectionBypass1 = { - createdAt: 220.18, + createdAt: 8518.94, createdBy: "", scope: "shareable-link", }; diff --git a/docs/models/listdeploymentaliasesprotectionbypass2.md b/docs/models/listdeploymentaliasesprotectionbypass2.md index fe8f0a8a..b396494c 100644 --- a/docs/models/listdeploymentaliasesprotectionbypass2.md +++ b/docs/models/listdeploymentaliasesprotectionbypass2.md @@ -8,10 +8,10 @@ The protection bypass for the alias import { ListDeploymentAliasesProtectionBypass2 } from "@vercel/sdk/models/listdeploymentaliasesop.js"; let value: ListDeploymentAliasesProtectionBypass2 = { - createdAt: 1040.92, - lastUpdatedAt: 3056.95, + createdAt: 9897.66, + lastUpdatedAt: 423.87, lastUpdatedBy: "", - access: "granted", + access: "requested", scope: "user", }; ``` diff --git a/docs/models/listdeploymentaliasesprotectionbypass3.md b/docs/models/listdeploymentaliasesprotectionbypass3.md index 36635d01..93c89d0b 100644 --- a/docs/models/listdeploymentaliasesprotectionbypass3.md +++ b/docs/models/listdeploymentaliasesprotectionbypass3.md @@ -8,7 +8,7 @@ The protection bypass for the alias import { ListDeploymentAliasesProtectionBypass3 } from "@vercel/sdk/models/listdeploymentaliasesop.js"; let value: ListDeploymentAliasesProtectionBypass3 = { - createdAt: 6902.11, + createdAt: 4444.94, createdBy: "", scope: "alias-protection-override", }; diff --git a/docs/models/listdeploymentaliasesprotectionbypass4.md b/docs/models/listdeploymentaliasesprotectionbypass4.md index 2077126e..de1b3354 100644 --- a/docs/models/listdeploymentaliasesprotectionbypass4.md +++ b/docs/models/listdeploymentaliasesprotectionbypass4.md @@ -8,8 +8,8 @@ The protection bypass for the alias import { ListDeploymentAliasesProtectionBypass4 } from "@vercel/sdk/models/listdeploymentaliasesop.js"; let value: ListDeploymentAliasesProtectionBypass4 = { - createdAt: 932.12, - lastUpdatedAt: 7536.80, + createdAt: 3180.3, + lastUpdatedAt: 1536.66, lastUpdatedBy: "", scope: "email_invite", }; diff --git a/docs/models/listdeploymentaliasesprotectionbypassaccess.md b/docs/models/listdeploymentaliasesprotectionbypassaccess.md index de39d342..2151d40c 100644 --- a/docs/models/listdeploymentaliasesprotectionbypassaccess.md +++ b/docs/models/listdeploymentaliasesprotectionbypassaccess.md @@ -5,7 +5,7 @@ ```typescript import { ListDeploymentAliasesProtectionBypassAccess } from "@vercel/sdk/models/listdeploymentaliasesop.js"; -let value: ListDeploymentAliasesProtectionBypassAccess = "granted"; +let value: ListDeploymentAliasesProtectionBypassAccess = "requested"; ``` ## Values diff --git a/docs/models/ma.md b/docs/models/ma.md index 4cc89f8e..fa6bba36 100644 --- a/docs/models/ma.md +++ b/docs/models/ma.md @@ -9,7 +9,7 @@ import { Ma } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Ma = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/members.md b/docs/models/members.md index f88de864..9221471f 100644 --- a/docs/models/members.md +++ b/docs/models/members.md @@ -6,10 +6,10 @@ import { Members } from "@vercel/sdk/models/listaccessgroupmembersop.js"; let value: Members = { - email: "Leda43@hotmail.com", + email: "Luna38@yahoo.com", uid: "", - username: "Vincenzo56", - teamRole: "OWNER", + username: "Junior.Walsh8", + teamRole: "VIEWER", }; ``` diff --git a/docs/models/membership.md b/docs/models/membership.md index b08111ee..4fe10bd1 100644 --- a/docs/models/membership.md +++ b/docs/models/membership.md @@ -9,24 +9,25 @@ import { Membership } from "@vercel/sdk/models/teamlimited.js"; let value: Membership = { confirmed: false, - confirmedAt: 5458.54, - role: "CONTRIBUTOR", - createdAt: 1291.56, - created: 731.97, + confirmedAt: 4476.78, + role: "VIEWER", + createdAt: 9499.15, + created: 8170.57, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `uid` | *string* | :heavy_minus_sign: | N/A | -| `entitlements` | [models.Entitlements](../models/entitlements.md)[] | :heavy_minus_sign: | N/A | -| `confirmed` | *boolean* | :heavy_check_mark: | N/A | -| `confirmedAt` | *number* | :heavy_check_mark: | N/A | -| `accessRequestedAt` | *number* | :heavy_minus_sign: | N/A | -| `role` | [models.Role](../models/role.md) | :heavy_check_mark: | N/A | -| `teamId` | *string* | :heavy_minus_sign: | N/A | -| `createdAt` | *number* | :heavy_check_mark: | N/A | -| `created` | *number* | :heavy_check_mark: | N/A | -| `joinedFrom` | [models.JoinedFrom](../models/joinedfrom.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `uid` | *string* | :heavy_minus_sign: | N/A | +| `entitlements` | [models.Entitlements](../models/entitlements.md)[] | :heavy_minus_sign: | N/A | +| `confirmed` | *boolean* | :heavy_check_mark: | N/A | +| `confirmedAt` | *number* | :heavy_check_mark: | N/A | +| `accessRequestedAt` | *number* | :heavy_minus_sign: | N/A | +| `role` | [models.Role](../models/role.md) | :heavy_check_mark: | N/A | +| `additionalRoles` | [models.AdditionalRoles](../models/additionalroles.md)[] | :heavy_minus_sign: | N/A | +| `teamId` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *number* | :heavy_check_mark: | N/A | +| `created` | *number* | :heavy_check_mark: | N/A | +| `joinedFrom` | [models.JoinedFrom](../models/joinedfrom.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/microfrontends.md b/docs/models/microfrontends.md index 25e105c2..b243166d 100644 --- a/docs/models/microfrontends.md +++ b/docs/models/microfrontends.md @@ -6,7 +6,7 @@ import { Microfrontends } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: Microfrontends = { - updatedAt: 3200.17, + updatedAt: 6289.82, groupIds: [ "", ], diff --git a/docs/models/missing.md b/docs/models/missing.md index aeef651a..f719b691 100644 --- a/docs/models/missing.md +++ b/docs/models/missing.md @@ -6,7 +6,7 @@ import { Missing } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: Missing = { - type: "header", + type: "cookie", }; ``` diff --git a/docs/models/mitigate.md b/docs/models/mitigate.md index 17bf74c8..cf77d87e 100644 --- a/docs/models/mitigate.md +++ b/docs/models/mitigate.md @@ -6,7 +6,7 @@ import { Mitigate } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Mitigate = { - action: "deny", + action: "challenge", }; ``` diff --git a/docs/models/namespaceid.md b/docs/models/namespaceid.md index a2df9a69..b44b78d3 100644 --- a/docs/models/namespaceid.md +++ b/docs/models/namespaceid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 7689.99; +const value: number = 4086.77; ``` diff --git a/docs/models/northstarmigration.md b/docs/models/northstarmigration.md index fa43b7bf..1c0b78f5 100644 --- a/docs/models/northstarmigration.md +++ b/docs/models/northstarmigration.md @@ -7,10 +7,10 @@ import { NorthstarMigration } from "@vercel/sdk/models/authuser.js"; let value: NorthstarMigration = { teamId: "", - projects: 1726.97, + projects: 1726.96, stores: 4815.53, integrationConfigurations: 1096.83, - integrationClients: 3216.98, + integrationClients: 3216.97, startTime: 4265.94, endTime: 245.48, }; diff --git a/docs/models/op.md b/docs/models/op.md index 2e1bcbb6..6ee78feb 100644 --- a/docs/models/op.md +++ b/docs/models/op.md @@ -7,7 +7,7 @@ ```typescript import { Op } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: Op = "suf"; +let value: Op = "inc"; ``` ## Values diff --git a/docs/models/order.md b/docs/models/order.md index 9c9887d0..157cfb60 100644 --- a/docs/models/order.md +++ b/docs/models/order.md @@ -7,7 +7,7 @@ Domains sort order by createdAt ```typescript import { Order } from "@vercel/sdk/models/getprojectdomainsop.js"; -let value: Order = "DESC"; +let value: Order = "ASC"; ``` ## Values diff --git a/docs/models/origin.md b/docs/models/origin.md index 94d866c4..5e6f3718 100644 --- a/docs/models/origin.md +++ b/docs/models/origin.md @@ -5,7 +5,7 @@ ```typescript import { Origin } from "@vercel/sdk/models/teamlimited.js"; -let value: Origin = "teams"; +let value: Origin = "gitlab"; ``` ## Values diff --git a/docs/models/owner.md b/docs/models/owner.md index 92568126..29b5bd34 100644 --- a/docs/models/owner.md +++ b/docs/models/owner.md @@ -6,7 +6,7 @@ import { Owner } from "@vercel/sdk/models/searchrepoop.js"; let value: Owner = { - id: 5323.36, + id: 4884.42, name: "", }; ``` diff --git a/docs/models/passwordprotection.md b/docs/models/passwordprotection.md index eef6bd60..79af6d4e 100644 --- a/docs/models/passwordprotection.md +++ b/docs/models/passwordprotection.md @@ -8,7 +8,7 @@ Allows to protect project deployments with a password import { PasswordProtection } from "@vercel/sdk/models/updateprojectop.js"; let value: PasswordProtection = { - deploymentType: "preview", + deploymentType: "all", }; ``` diff --git a/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridbranchmatcher.md b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridbranchmatcher.md new file mode 100644 index 00000000..480e19b4 --- /dev/null +++ b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridbranchmatcher.md @@ -0,0 +1,22 @@ +# PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher + +How we want to determine a matching branch. This is optional. + +## Example Usage + +```typescript +import { PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher } from "@vercel/sdk/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher = { + type: "startsWith", + pattern: "", + }; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [models.PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType](../models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridtype.md) | :heavy_check_mark: | Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". | +| `pattern` | *string* | :heavy_check_mark: | Git branch name or portion thereof. | \ No newline at end of file diff --git a/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md new file mode 100644 index 00000000..c07e2709 --- /dev/null +++ b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md @@ -0,0 +1,25 @@ +# PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest + +## Example Usage + +```typescript +import { PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest } from "@vercel/sdk/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest = + { + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `idOrName` | *string* | :heavy_check_mark: | The unique project identifier or the project name | | +| `environmentSlugOrId` | *string* | :heavy_check_mark: | The unique custom environment identifier within the project | | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | +| `requestBody` | [models.PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody](../models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md new file mode 100644 index 00000000..f11d95d6 --- /dev/null +++ b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequestbody.md @@ -0,0 +1,18 @@ +# PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody + +## Example Usage + +```typescript +import { PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody } from "@vercel/sdk/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `slug` | *string* | :heavy_minus_sign: | The slug of the custom environment. | +| `description` | *string* | :heavy_minus_sign: | Description of the custom environment. This is optional. | +| `branchMatcher` | [models.PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher](../models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridbranchmatcher.md) | :heavy_minus_sign: | How we want to determine a matching branch. This is optional. | \ No newline at end of file diff --git a/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md new file mode 100644 index 00000000..9f741d12 --- /dev/null +++ b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md @@ -0,0 +1,15 @@ +# PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + +## Example Usage + +```typescript +import { PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody } from "@vercel/sdk/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridtype.md b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridtype.md new file mode 100644 index 00000000..2e5caa5d --- /dev/null +++ b/docs/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridtype.md @@ -0,0 +1,18 @@ +# PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType + +Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + +## Example Usage + +```typescript +import { PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType } from "@vercel/sdk/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; + +let value: PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType = + "endsWith"; +``` + +## Values + +```typescript +"equals" | "startsWith" | "endsWith" +``` \ No newline at end of file diff --git a/docs/models/php.md b/docs/models/php.md index 099f1660..f62c42e6 100644 --- a/docs/models/php.md +++ b/docs/models/php.md @@ -9,7 +9,7 @@ import { Php } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Php = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/postv1projectsidornamecustomenvironmentsrequest.md b/docs/models/postv1projectsidornamecustomenvironmentsrequest.md new file mode 100644 index 00000000..c0520df6 --- /dev/null +++ b/docs/models/postv1projectsidornamecustomenvironmentsrequest.md @@ -0,0 +1,22 @@ +# PostV1ProjectsIdOrNameCustomEnvironmentsRequest + +## Example Usage + +```typescript +import { PostV1ProjectsIdOrNameCustomEnvironmentsRequest } from "@vercel/sdk/models/postv1projectsidornamecustomenvironmentsop.js"; + +let value: PostV1ProjectsIdOrNameCustomEnvironmentsRequest = { + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `idOrName` | *string* | :heavy_check_mark: | The unique project identifier or the project name | | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | +| `requestBody` | [models.PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody](../models/postv1projectsidornamecustomenvironmentsrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/postv1projectsidornamecustomenvironmentsrequestbody.md b/docs/models/postv1projectsidornamecustomenvironmentsrequestbody.md new file mode 100644 index 00000000..7663efc9 --- /dev/null +++ b/docs/models/postv1projectsidornamecustomenvironmentsrequestbody.md @@ -0,0 +1,18 @@ +# PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody + +## Example Usage + +```typescript +import { PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody } from "@vercel/sdk/models/postv1projectsidornamecustomenvironmentsop.js"; + +let value: PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `slug` | *string* | :heavy_minus_sign: | The slug of the custom environment to create. | +| `description` | *string* | :heavy_minus_sign: | Description of the custom environment. This is optional. | +| `branchMatcher` | [models.BranchMatcher](../models/branchmatcher.md) | :heavy_minus_sign: | How we want to determine a matching branch. This is optional. | +| `copyEnvVarsFrom` | *string* | :heavy_minus_sign: | Where to copy environment variables from. This is optional. | \ No newline at end of file diff --git a/docs/models/postv1projectsidornamecustomenvironmentsresponsebody.md b/docs/models/postv1projectsidornamecustomenvironmentsresponsebody.md new file mode 100644 index 00000000..bd070b27 --- /dev/null +++ b/docs/models/postv1projectsidornamecustomenvironmentsresponsebody.md @@ -0,0 +1,14 @@ +# PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody + +## Example Usage + +```typescript +import { PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody } from "@vercel/sdk/models/postv1projectsidornamecustomenvironmentsop.js"; + +let value: PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/postv1projectsidornamecustomenvironmentstype.md b/docs/models/postv1projectsidornamecustomenvironmentstype.md new file mode 100644 index 00000000..cc654e15 --- /dev/null +++ b/docs/models/postv1projectsidornamecustomenvironmentstype.md @@ -0,0 +1,17 @@ +# PostV1ProjectsIdOrNameCustomEnvironmentsType + +Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + +## Example Usage + +```typescript +import { PostV1ProjectsIdOrNameCustomEnvironmentsType } from "@vercel/sdk/models/postv1projectsidornamecustomenvironmentsop.js"; + +let value: PostV1ProjectsIdOrNameCustomEnvironmentsType = "startsWith"; +``` + +## Values + +```typescript +"equals" | "startsWith" | "endsWith" +``` \ No newline at end of file diff --git a/docs/models/protectionbypass.md b/docs/models/protectionbypass.md index faad547c..5875e11e 100644 --- a/docs/models/protectionbypass.md +++ b/docs/models/protectionbypass.md @@ -6,7 +6,7 @@ import { ProtectionBypass } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: ProtectionBypass = { - createdAt: 5864.10, + createdAt: 8765.06, createdBy: "", scope: "automation-bypass", }; diff --git a/docs/models/protectionbypass1.md b/docs/models/protectionbypass1.md index b456cf75..96fa9c80 100644 --- a/docs/models/protectionbypass1.md +++ b/docs/models/protectionbypass1.md @@ -8,7 +8,7 @@ The protection bypass for the alias import { ProtectionBypass1 } from "@vercel/sdk/models/getaliasop.js"; let value: ProtectionBypass1 = { - createdAt: 3575.20, + createdAt: 7687.72, createdBy: "", scope: "shareable-link", }; diff --git a/docs/models/protectionbypass2.md b/docs/models/protectionbypass2.md index 9b089b69..fabc99d0 100644 --- a/docs/models/protectionbypass2.md +++ b/docs/models/protectionbypass2.md @@ -8,8 +8,8 @@ The protection bypass for the alias import { ProtectionBypass2 } from "@vercel/sdk/models/getaliasop.js"; let value: ProtectionBypass2 = { - createdAt: 1125.13, - lastUpdatedAt: 5408.95, + createdAt: 8573.88, + lastUpdatedAt: 6173.25, lastUpdatedBy: "", access: "requested", scope: "user", diff --git a/docs/models/protectionbypass3.md b/docs/models/protectionbypass3.md index e5a6b291..ea671b82 100644 --- a/docs/models/protectionbypass3.md +++ b/docs/models/protectionbypass3.md @@ -8,7 +8,7 @@ The protection bypass for the alias import { ProtectionBypass3 } from "@vercel/sdk/models/getaliasop.js"; let value: ProtectionBypass3 = { - createdAt: 7711.46, + createdAt: 1338.87, createdBy: "", scope: "alias-protection-override", }; diff --git a/docs/models/protectionbypass4.md b/docs/models/protectionbypass4.md index 616dd277..904b65dc 100644 --- a/docs/models/protectionbypass4.md +++ b/docs/models/protectionbypass4.md @@ -8,8 +8,8 @@ The protection bypass for the alias import { ProtectionBypass4 } from "@vercel/sdk/models/getaliasop.js"; let value: ProtectionBypass4 = { - createdAt: 2736.38, - lastUpdatedAt: 2107.11, + createdAt: 7422.72, + lastUpdatedAt: 230.07, lastUpdatedBy: "", scope: "email_invite", }; diff --git a/docs/models/protectionbypassaccess.md b/docs/models/protectionbypassaccess.md index e196f22b..a32d4074 100644 --- a/docs/models/protectionbypassaccess.md +++ b/docs/models/protectionbypassaccess.md @@ -5,7 +5,7 @@ ```typescript import { ProtectionBypassAccess } from "@vercel/sdk/models/listaliasesop.js"; -let value: ProtectionBypassAccess = "granted"; +let value: ProtectionBypassAccess = "requested"; ``` ## Values diff --git a/docs/models/protectionmode.md b/docs/models/protectionmode.md index 4b69301d..1b3b4fbf 100644 --- a/docs/models/protectionmode.md +++ b/docs/models/protectionmode.md @@ -7,7 +7,7 @@ exclusive: ip match is enough to bypass deployment protection (regardless of oth ```typescript import { ProtectionMode } from "@vercel/sdk/models/updateprojectop.js"; -let value: ProtectionMode = "additional"; +let value: ProtectionMode = "exclusive"; ``` ## Values diff --git a/docs/models/provider.md b/docs/models/provider.md index 9328f1d4..b8073b57 100644 --- a/docs/models/provider.md +++ b/docs/models/provider.md @@ -5,7 +5,7 @@ ```typescript import { Provider } from "@vercel/sdk/models/gitnamespacesop.js"; -let value: Provider = "github"; +let value: Provider = "github-custom-host"; ``` ## Values diff --git a/docs/models/putfirewallconfigaction.md b/docs/models/putfirewallconfigaction.md index e828f5d4..6dc2bd1c 100644 --- a/docs/models/putfirewallconfigaction.md +++ b/docs/models/putfirewallconfigaction.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigAction } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigAction = "deny"; +let value: PutFirewallConfigAction = "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigconditiongroup.md b/docs/models/putfirewallconfigconditiongroup.md index c8c9abc4..e9fd935b 100644 --- a/docs/models/putfirewallconfigconditiongroup.md +++ b/docs/models/putfirewallconfigconditiongroup.md @@ -8,8 +8,8 @@ import { PutFirewallConfigConditionGroup } from "@vercel/sdk/models/putfirewallc let value: PutFirewallConfigConditionGroup = { conditions: [ { - type: "target_path", - op: "gte", + type: "scheme", + op: "pre", }, ], }; diff --git a/docs/models/putfirewallconfigconditions.md b/docs/models/putfirewallconfigconditions.md index d9189ffb..d6c07347 100644 --- a/docs/models/putfirewallconfigconditions.md +++ b/docs/models/putfirewallconfigconditions.md @@ -6,8 +6,8 @@ import { PutFirewallConfigConditions } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: PutFirewallConfigConditions = { - type: "geo_city", - op: "gt", + type: "geo_country", + op: "nex", }; ``` diff --git a/docs/models/putfirewallconfigcrs.md b/docs/models/putfirewallconfigcrs.md index caf01900..1dcea738 100644 --- a/docs/models/putfirewallconfigcrs.md +++ b/docs/models/putfirewallconfigcrs.md @@ -10,7 +10,7 @@ import { PutFirewallConfigCrs } from "@vercel/sdk/models/putfirewallconfigop.js" let value: PutFirewallConfigCrs = { sd: { active: false, - action: "deny", + action: "log", }, ma: { active: false, @@ -22,7 +22,7 @@ let value: PutFirewallConfigCrs = { }, rfi: { active: false, - action: "log", + action: "deny", }, rce: { active: false, @@ -30,7 +30,7 @@ let value: PutFirewallConfigCrs = { }, php: { active: false, - action: "deny", + action: "log", }, gen: { active: false, @@ -38,11 +38,11 @@ let value: PutFirewallConfigCrs = { }, xss: { active: false, - action: "log", + action: "deny", }, sqli: { active: false, - action: "deny", + action: "log", }, sf: { active: false, @@ -50,7 +50,7 @@ let value: PutFirewallConfigCrs = { }, java: { active: false, - action: "log", + action: "deny", }, }; ``` diff --git a/docs/models/putfirewallconfiggen.md b/docs/models/putfirewallconfiggen.md index 1a3e27bd..b431646a 100644 --- a/docs/models/putfirewallconfiggen.md +++ b/docs/models/putfirewallconfiggen.md @@ -9,7 +9,7 @@ import { PutFirewallConfigGen } from "@vercel/sdk/models/putfirewallconfigop.js" let value: PutFirewallConfigGen = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/putfirewallconfigips.md b/docs/models/putfirewallconfigips.md index 486496ea..f5a50c57 100644 --- a/docs/models/putfirewallconfigips.md +++ b/docs/models/putfirewallconfigips.md @@ -7,9 +7,9 @@ import { PutFirewallConfigIps } from "@vercel/sdk/models/putfirewallconfigop.js" let value: PutFirewallConfigIps = { id: "", - hostname: "insidious-ferret.net", - ip: "fbe9:2cd9:ebdc:c2f5:fba5:f2fc:b96b:d6b5", - action: "log", + hostname: "worldly-hexagon.biz", + ip: "cfbe:92cd:9ebd:cc2f:5fba:5f2f:cb96:bd6b", + action: "deny", }; ``` diff --git a/docs/models/putfirewallconfigjava.md b/docs/models/putfirewallconfigjava.md index 6f94ac89..ca8fb8ed 100644 --- a/docs/models/putfirewallconfigjava.md +++ b/docs/models/putfirewallconfigjava.md @@ -9,7 +9,7 @@ import { PutFirewallConfigJava } from "@vercel/sdk/models/putfirewallconfigop.js let value: PutFirewallConfigJava = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/putfirewallconfigma.md b/docs/models/putfirewallconfigma.md index 4b4c17de..b5950bd9 100644 --- a/docs/models/putfirewallconfigma.md +++ b/docs/models/putfirewallconfigma.md @@ -9,7 +9,7 @@ import { PutFirewallConfigMa } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: PutFirewallConfigMa = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/putfirewallconfigmitigate.md b/docs/models/putfirewallconfigmitigate.md index 5b0e73a7..a4bcc228 100644 --- a/docs/models/putfirewallconfigmitigate.md +++ b/docs/models/putfirewallconfigmitigate.md @@ -6,7 +6,7 @@ import { PutFirewallConfigMitigate } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: PutFirewallConfigMitigate = { - action: "challenge", + action: "deny", }; ``` diff --git a/docs/models/putfirewallconfigop.md b/docs/models/putfirewallconfigop.md index 43f41628..8fff0179 100644 --- a/docs/models/putfirewallconfigop.md +++ b/docs/models/putfirewallconfigop.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigOp } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigOp = "sub"; +let value: PutFirewallConfigOp = "ninc"; ``` ## Values diff --git a/docs/models/putfirewallconfigphp.md b/docs/models/putfirewallconfigphp.md index f1224c8a..c729bd6a 100644 --- a/docs/models/putfirewallconfigphp.md +++ b/docs/models/putfirewallconfigphp.md @@ -9,7 +9,7 @@ import { PutFirewallConfigPhp } from "@vercel/sdk/models/putfirewallconfigop.js" let value: PutFirewallConfigPhp = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/putfirewallconfigratelimit.md b/docs/models/putfirewallconfigratelimit.md index 3ec47a21..97afe85e 100644 --- a/docs/models/putfirewallconfigratelimit.md +++ b/docs/models/putfirewallconfigratelimit.md @@ -6,9 +6,9 @@ import { PutFirewallConfigRateLimit } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: PutFirewallConfigRateLimit = { - algo: "token_bucket", - window: 5344.32, - limit: 156.76, + algo: "fixed_window", + window: 9101.32, + limit: 5344.32, keys: [ "", ], diff --git a/docs/models/putfirewallconfigrce.md b/docs/models/putfirewallconfigrce.md index b3f7b039..266f0552 100644 --- a/docs/models/putfirewallconfigrce.md +++ b/docs/models/putfirewallconfigrce.md @@ -9,7 +9,7 @@ import { PutFirewallConfigRce } from "@vercel/sdk/models/putfirewallconfigop.js" let value: PutFirewallConfigRce = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/putfirewallconfigresponsebody.md b/docs/models/putfirewallconfigresponsebody.md index 28035ba9..18b842a4 100644 --- a/docs/models/putfirewallconfigresponsebody.md +++ b/docs/models/putfirewallconfigresponsebody.md @@ -10,8 +10,8 @@ let value: PutFirewallConfigResponseBody = { ownerId: "", projectKey: "", id: "", - version: 9747.87, - updatedAt: "1736158014918", + version: 9246.23, + updatedAt: "1737062624025", firewallEnabled: false, crs: { sd: { @@ -24,11 +24,11 @@ let value: PutFirewallConfigResponseBody = { }, lfi: { active: false, - action: "log", + action: "deny", }, rfi: { active: false, - action: "deny", + action: "log", }, rce: { active: false, @@ -40,7 +40,7 @@ let value: PutFirewallConfigResponseBody = { }, gen: { active: false, - action: "log", + action: "deny", }, xss: { active: false, @@ -48,7 +48,7 @@ let value: PutFirewallConfigResponseBody = { }, sqli: { active: false, - action: "deny", + action: "log", }, sf: { active: false, @@ -68,8 +68,8 @@ let value: PutFirewallConfigResponseBody = { { conditions: [ { - type: "raw_path", - op: "eq", + type: "cookie", + op: "suf", }, ], }, @@ -80,9 +80,9 @@ let value: PutFirewallConfigResponseBody = { ips: [ { id: "", - hostname: "hateful-t-shirt.biz", - ip: "241.186.132.198", - action: "deny", + hostname: "calculating-fort.org", + ip: "95.241.186.132", + action: "bypass", }, ], changes: [ diff --git a/docs/models/putfirewallconfigrfi.md b/docs/models/putfirewallconfigrfi.md index 175c4a45..0694a6af 100644 --- a/docs/models/putfirewallconfigrfi.md +++ b/docs/models/putfirewallconfigrfi.md @@ -9,7 +9,7 @@ import { PutFirewallConfigRfi } from "@vercel/sdk/models/putfirewallconfigop.js" let value: PutFirewallConfigRfi = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/putfirewallconfigrules.md b/docs/models/putfirewallconfigrules.md index dd44ad88..4d88f482 100644 --- a/docs/models/putfirewallconfigrules.md +++ b/docs/models/putfirewallconfigrules.md @@ -13,8 +13,8 @@ let value: PutFirewallConfigRules = { { conditions: [ { - type: "geo_country", - op: "sub", + type: "raw_path", + op: "lte", }, ], }, diff --git a/docs/models/putfirewallconfigsecurityrequestaction.md b/docs/models/putfirewallconfigsecurityrequestaction.md index 8ccf8972..cf974875 100644 --- a/docs/models/putfirewallconfigsecurityrequestaction.md +++ b/docs/models/putfirewallconfigsecurityrequestaction.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigSecurityRequestAction } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigSecurityRequestAction = "deny"; +let value: PutFirewallConfigSecurityRequestAction = "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityrequestrequestbodycrsaction.md b/docs/models/putfirewallconfigsecurityrequestrequestbodycrsaction.md index f6045c60..c5fbfe59 100644 --- a/docs/models/putfirewallconfigsecurityrequestrequestbodycrsaction.md +++ b/docs/models/putfirewallconfigsecurityrequestrequestbodycrsaction.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigSecurityRequestRequestBodyCrsAction } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigSecurityRequestRequestBodyCrsAction = "deny"; +let value: PutFirewallConfigSecurityRequestRequestBodyCrsAction = "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityrequestrequestbodycrsgenaction.md b/docs/models/putfirewallconfigsecurityrequestrequestbodycrsgenaction.md index d506eb19..26fd9633 100644 --- a/docs/models/putfirewallconfigsecurityrequestrequestbodycrsgenaction.md +++ b/docs/models/putfirewallconfigsecurityrequestrequestbodycrsgenaction.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigSecurityRequestRequestBodyCrsGenAction } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigSecurityRequestRequestBodyCrsGenAction = "log"; +let value: PutFirewallConfigSecurityRequestRequestBodyCrsGenAction = "deny"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityrequestrequestbodycrssfaction.md b/docs/models/putfirewallconfigsecurityrequestrequestbodycrssfaction.md index 522a5989..960645a6 100644 --- a/docs/models/putfirewallconfigsecurityrequestrequestbodycrssfaction.md +++ b/docs/models/putfirewallconfigsecurityrequestrequestbodycrssfaction.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigSecurityRequestRequestBodyCrsSfAction } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigSecurityRequestRequestBodyCrsSfAction = "log"; +let value: PutFirewallConfigSecurityRequestRequestBodyCrsSfAction = "deny"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityrequestrequestbodyipsaction.md b/docs/models/putfirewallconfigsecurityrequestrequestbodyipsaction.md index 973b6ecb..d6602d46 100644 --- a/docs/models/putfirewallconfigsecurityrequestrequestbodyipsaction.md +++ b/docs/models/putfirewallconfigsecurityrequestrequestbodyipsaction.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigSecurityRequestRequestBodyIpsAction } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigSecurityRequestRequestBodyIpsAction = "bypass"; +let value: PutFirewallConfigSecurityRequestRequestBodyIpsAction = "deny"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityrequestrequestbodyrulesactionaction.md b/docs/models/putfirewallconfigsecurityrequestrequestbodyrulesactionaction.md index c8601843..92ab62f1 100644 --- a/docs/models/putfirewallconfigsecurityrequestrequestbodyrulesactionaction.md +++ b/docs/models/putfirewallconfigsecurityrequestrequestbodyrulesactionaction.md @@ -5,8 +5,7 @@ ```typescript import { PutFirewallConfigSecurityRequestRequestBodyRulesActionAction } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigSecurityRequestRequestBodyRulesActionAction = - "bypass"; +let value: PutFirewallConfigSecurityRequestRequestBodyRulesActionAction = "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityresponse200action.md b/docs/models/putfirewallconfigsecurityresponse200action.md index 09707771..35b7e1fe 100644 --- a/docs/models/putfirewallconfigsecurityresponse200action.md +++ b/docs/models/putfirewallconfigsecurityresponse200action.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigSecurityResponse200Action } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigSecurityResponse200Action = "bypass"; +let value: PutFirewallConfigSecurityResponse200Action = "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsaction.md b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsaction.md index a8385159..554fd63f 100644 --- a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsaction.md +++ b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsaction.md @@ -7,7 +7,7 @@ import { PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCr let value: PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction = - "deny"; + "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsjavaaction.md b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsjavaaction.md index 426b6dab..381eaa1c 100644 --- a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsjavaaction.md +++ b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsjavaaction.md @@ -9,7 +9,7 @@ import { let value: PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction = - "deny"; + "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsmaaction.md b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsmaaction.md index 171a2d44..f0b91f82 100644 --- a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsmaaction.md +++ b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsmaaction.md @@ -7,7 +7,7 @@ import { PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCr let value: PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction = - "deny"; + "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrssdaction.md b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrssdaction.md index e54a8f73..d0157ff1 100644 --- a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrssdaction.md +++ b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrssdaction.md @@ -7,7 +7,7 @@ import { PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCr let value: PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction = - "log"; + "deny"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrssfaction.md b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrssfaction.md index a367a0df..fa4982f3 100644 --- a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrssfaction.md +++ b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrssfaction.md @@ -7,7 +7,7 @@ import { PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCr let value: PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction = - "deny"; + "log"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsxssaction.md b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsxssaction.md index 7a623173..684c998c 100644 --- a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsxssaction.md +++ b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactivecrsxssaction.md @@ -9,7 +9,7 @@ import { let value: PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXssAction = - "log"; + "deny"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactiverulesactionaction.md b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactiverulesactionaction.md index 5ddc4c9e..434bedfe 100644 --- a/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactiverulesactionaction.md +++ b/docs/models/putfirewallconfigsecurityresponse200applicationjsonresponsebodyactiverulesactionaction.md @@ -9,7 +9,7 @@ import { let value: PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction = - "deny"; + "rate_limit"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecuritytype.md b/docs/models/putfirewallconfigsecuritytype.md index cf153cfa..ec36ceb1 100644 --- a/docs/models/putfirewallconfigsecuritytype.md +++ b/docs/models/putfirewallconfigsecuritytype.md @@ -5,7 +5,7 @@ ```typescript import { PutFirewallConfigSecurityType } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigSecurityType = "ja3_digest"; +let value: PutFirewallConfigSecurityType = "geo_as_number"; ``` ## Values diff --git a/docs/models/putfirewallconfigsecurityvalue.md b/docs/models/putfirewallconfigsecurityvalue.md index 01c6ce28..ca4984e2 100644 --- a/docs/models/putfirewallconfigsecurityvalue.md +++ b/docs/models/putfirewallconfigsecurityvalue.md @@ -12,7 +12,7 @@ const value: string = ""; ### `number` ```typescript -const value: number = 6873.52; +const value: number = 4813.07; ``` ### `string[]` diff --git a/docs/models/putfirewallconfigsf.md b/docs/models/putfirewallconfigsf.md index bc3e49e7..39abf01d 100644 --- a/docs/models/putfirewallconfigsf.md +++ b/docs/models/putfirewallconfigsf.md @@ -9,7 +9,7 @@ import { PutFirewallConfigSf } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: PutFirewallConfigSf = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/putfirewallconfigtype.md b/docs/models/putfirewallconfigtype.md index e301551a..dbac627e 100644 --- a/docs/models/putfirewallconfigtype.md +++ b/docs/models/putfirewallconfigtype.md @@ -7,7 +7,7 @@ ```typescript import { PutFirewallConfigType } from "@vercel/sdk/models/putfirewallconfigop.js"; -let value: PutFirewallConfigType = "scheme"; +let value: PutFirewallConfigType = "path"; ``` ## Values diff --git a/docs/models/putfirewallconfigvalue.md b/docs/models/putfirewallconfigvalue.md index 8479c448..7660334b 100644 --- a/docs/models/putfirewallconfigvalue.md +++ b/docs/models/putfirewallconfigvalue.md @@ -20,6 +20,6 @@ const value: string[] = [ ### `number` ```typescript -const value: number = 9559.12; +const value: number = 2569.75; ``` diff --git a/docs/models/queryparamprovider.md b/docs/models/queryparamprovider.md index 3c1ab94a..d75984ed 100644 --- a/docs/models/queryparamprovider.md +++ b/docs/models/queryparamprovider.md @@ -5,7 +5,7 @@ ```typescript import { QueryParamProvider } from "@vercel/sdk/models/searchrepoop.js"; -let value: QueryParamProvider = "github"; +let value: QueryParamProvider = "gitlab"; ``` ## Values diff --git a/docs/models/quote.md b/docs/models/quote.md index d6e23ce5..a74d61a4 100644 --- a/docs/models/quote.md +++ b/docs/models/quote.md @@ -7,7 +7,7 @@ import { Quote } from "@vercel/sdk/models/getconfigurationsop.js"; let value: Quote = { line: "", - amount: "780.89", + amount: "760.80", }; ``` diff --git a/docs/models/ratelimit.md b/docs/models/ratelimit.md index d72ddf37..f84fc934 100644 --- a/docs/models/ratelimit.md +++ b/docs/models/ratelimit.md @@ -7,9 +7,9 @@ ```typescript const value: models.RateLimit1 = { - algo: "fixed_window", - window: 6379.69, - limit: 6037.83, + algo: "token_bucket", + window: 5846.63, + limit: 3035.49, keys: [ "", ], diff --git a/docs/models/ratelimit1.md b/docs/models/ratelimit1.md index 4cdb21d2..1d831710 100644 --- a/docs/models/ratelimit1.md +++ b/docs/models/ratelimit1.md @@ -7,8 +7,8 @@ import { RateLimit1 } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: RateLimit1 = { algo: "fixed_window", - window: 1020.72, - limit: 7569.35, + window: 5301.99, + limit: 9514.11, keys: [ "", ], diff --git a/docs/models/rce.md b/docs/models/rce.md index 581bd14b..dea183bb 100644 --- a/docs/models/rce.md +++ b/docs/models/rce.md @@ -9,7 +9,7 @@ import { Rce } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Rce = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/readaccessgroupprojectresponsebody.md b/docs/models/readaccessgroupprojectresponsebody.md index 98c600a8..87b02850 100644 --- a/docs/models/readaccessgroupprojectresponsebody.md +++ b/docs/models/readaccessgroupprojectresponsebody.md @@ -9,9 +9,9 @@ let value: ReadAccessGroupProjectResponseBody = { teamId: "", accessGroupId: "", projectId: "", - role: "PROJECT_DEVELOPER", - createdAt: "1718501275749", - updatedAt: "1736204533372", + role: "ADMIN", + createdAt: "1712115931877", + updatedAt: "1736992331687", }; ``` diff --git a/docs/models/readaccessgroupprojectrole.md b/docs/models/readaccessgroupprojectrole.md index 35a5809e..ea7b1e57 100644 --- a/docs/models/readaccessgroupprojectrole.md +++ b/docs/models/readaccessgroupprojectrole.md @@ -5,7 +5,7 @@ ```typescript import { ReadAccessGroupProjectRole } from "@vercel/sdk/models/readaccessgroupprojectop.js"; -let value: ReadAccessGroupProjectRole = "PROJECT_DEVELOPER"; +let value: ReadAccessGroupProjectRole = "PROJECT_VIEWER"; ``` ## Values diff --git a/docs/models/reasons.md b/docs/models/reasons.md index b92c4e3e..e1e37129 100644 --- a/docs/models/reasons.md +++ b/docs/models/reasons.md @@ -9,7 +9,7 @@ import { Reasons } from "@vercel/sdk/models/deleteteamop.js"; let value: Reasons = { slug: "", - description: "dazzling when gadzooks until", + description: "beyond blah bitter", }; ``` diff --git a/docs/models/recordeventsrequest.md b/docs/models/recordeventsrequest.md index 8693998d..4b4aacd7 100644 --- a/docs/models/recordeventsrequest.md +++ b/docs/models/recordeventsrequest.md @@ -14,7 +14,7 @@ let value: RecordEventsRequest = { { sessionId: "", source: "LOCAL", - event: "MISS", + event: "HIT", hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB", duration: 400, }, diff --git a/docs/models/records.md b/docs/models/records.md index 3a011ff1..db0c73b3 100644 --- a/docs/models/records.md +++ b/docs/models/records.md @@ -14,7 +14,7 @@ let value: Records = { creator: "", created: 4810.42, updated: 2982.46, - createdAt: 8625.59, + createdAt: 8625.6, updatedAt: 5862.77, }; ``` diff --git a/docs/models/removebypassiprequest.md b/docs/models/removebypassiprequest.md new file mode 100644 index 00000000..f66bfc4d --- /dev/null +++ b/docs/models/removebypassiprequest.md @@ -0,0 +1,22 @@ +# RemoveBypassIpRequest + +## Example Usage + +```typescript +import { RemoveBypassIpRequest } from "@vercel/sdk/models/removebypassipop.js"; + +let value: RemoveBypassIpRequest = { + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `projectId` | *string* | :heavy_check_mark: | N/A | | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | +| `requestBody` | *models.RemoveBypassIpRequestBody* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/removebypassiprequestbody.md b/docs/models/removebypassiprequestbody.md new file mode 100644 index 00000000..bc35f607 --- /dev/null +++ b/docs/models/removebypassiprequestbody.md @@ -0,0 +1,21 @@ +# RemoveBypassIpRequestBody + + +## Supported Types + +### `models.RemoveBypassIpRequestBody1` + +```typescript +const value: models.RemoveBypassIpRequestBody1 = { + domain: "friendly-circumference.org", +}; +``` + +### `models.RemoveBypassIpRequestBody2` + +```typescript +const value: models.RemoveBypassIpRequestBody2 = { + projectScope: false, +}; +``` + diff --git a/docs/models/removebypassiprequestbody1.md b/docs/models/removebypassiprequestbody1.md new file mode 100644 index 00000000..b9ff215a --- /dev/null +++ b/docs/models/removebypassiprequestbody1.md @@ -0,0 +1,21 @@ +# RemoveBypassIpRequestBody1 + +## Example Usage + +```typescript +import { RemoveBypassIpRequestBody1 } from "@vercel/sdk/models/removebypassipop.js"; + +let value: RemoveBypassIpRequestBody1 = { + domain: "fearless-veto.info", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `projectScope` | *boolean* | :heavy_minus_sign: | N/A | +| `sourceIp` | *string* | :heavy_minus_sign: | N/A | +| `allSources` | *boolean* | :heavy_minus_sign: | N/A | +| `note` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/removebypassiprequestbody2.md b/docs/models/removebypassiprequestbody2.md new file mode 100644 index 00000000..62e1b94e --- /dev/null +++ b/docs/models/removebypassiprequestbody2.md @@ -0,0 +1,21 @@ +# RemoveBypassIpRequestBody2 + +## Example Usage + +```typescript +import { RemoveBypassIpRequestBody2 } from "@vercel/sdk/models/removebypassipop.js"; + +let value: RemoveBypassIpRequestBody2 = { + projectScope: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `domain` | *string* | :heavy_minus_sign: | N/A | +| `projectScope` | *boolean* | :heavy_check_mark: | N/A | +| `sourceIp` | *string* | :heavy_minus_sign: | N/A | +| `allSources` | *boolean* | :heavy_minus_sign: | N/A | +| `note` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/removebypassipresponsebody.md b/docs/models/removebypassipresponsebody.md new file mode 100644 index 00000000..01ae4c52 --- /dev/null +++ b/docs/models/removebypassipresponsebody.md @@ -0,0 +1,17 @@ +# RemoveBypassIpResponseBody + +## Example Usage + +```typescript +import { RemoveBypassIpResponseBody } from "@vercel/sdk/models/removebypassipop.js"; + +let value: RemoveBypassIpResponseBody = { + ok: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ok` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/removeprojectenvrequest.md b/docs/models/removeprojectenvrequest.md index 6f369366..0af48284 100644 --- a/docs/models/removeprojectenvrequest.md +++ b/docs/models/removeprojectenvrequest.md @@ -8,6 +8,7 @@ import { RemoveProjectEnvRequest } from "@vercel/sdk/models/removeprojectenvop.j let value: RemoveProjectEnvRequest = { idOrName: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA", id: "XMbOEya1gUUO1ir4", + customEnvironmentId: "env_123abc4567", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", }; @@ -15,9 +16,10 @@ let value: RemoveProjectEnvRequest = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `idOrName` | *string* | :heavy_check_mark: | The unique project identifier or the project name | prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA | -| `id` | *string* | :heavy_check_mark: | The unique environment variable identifier | XMbOEya1gUUO1ir4 | -| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | -| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `idOrName` | *string* | :heavy_check_mark: | The unique project identifier or the project name | prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA | +| `id` | *string* | :heavy_check_mark: | The unique environment variable identifier | XMbOEya1gUUO1ir4 | +| `customEnvironmentId` | *string* | :heavy_minus_sign: | The unique custom environment identifier within the project | env_123abc4567 | +| `teamId` | *string* | :heavy_minus_sign: | The Team identifier to perform the request on behalf of. | team_1a2b3c4d5e6f7g8h9i0j1k2l | +| `slug` | *string* | :heavy_minus_sign: | The Team slug to perform the request on behalf of. | my-team-url-slug | \ No newline at end of file diff --git a/docs/models/removeprojectenvresponsebody.md b/docs/models/removeprojectenvresponsebody.md index 94bcac75..ca53ed54 100644 --- a/docs/models/removeprojectenvresponsebody.md +++ b/docs/models/removeprojectenvresponsebody.md @@ -10,7 +10,7 @@ The environment variable was successfully removed ```typescript const value: models.RemoveProjectEnvResponseBody1[] = [ { - type: "plain", + type: "system", key: "", value: "", }, @@ -21,7 +21,7 @@ const value: models.RemoveProjectEnvResponseBody1[] = [ ```typescript const value: models.RemoveProjectEnvResponseBody2 = { - type: "encrypted", + type: "plain", key: "", value: "", }; @@ -31,7 +31,7 @@ const value: models.RemoveProjectEnvResponseBody2 = { ```typescript const value: models.RemoveProjectEnvResponseBody3 = { - type: "system", + type: "encrypted", key: "", value: "", }; diff --git a/docs/models/removeprojectenvresponsebody2.md b/docs/models/removeprojectenvresponsebody2.md index 198351f1..1cc26b98 100644 --- a/docs/models/removeprojectenvresponsebody2.md +++ b/docs/models/removeprojectenvresponsebody2.md @@ -6,7 +6,7 @@ import { RemoveProjectEnvResponseBody2 } from "@vercel/sdk/models/removeprojectenvop.js"; let value: RemoveProjectEnvResponseBody2 = { - type: "secret", + type: "plain", key: "", value: "", }; diff --git a/docs/models/removeprojectenvresponsebody3.md b/docs/models/removeprojectenvresponsebody3.md index fa23b257..0a2d733d 100644 --- a/docs/models/removeprojectenvresponsebody3.md +++ b/docs/models/removeprojectenvresponsebody3.md @@ -6,7 +6,7 @@ import { RemoveProjectEnvResponseBody3 } from "@vercel/sdk/models/removeprojectenvop.js"; let value: RemoveProjectEnvResponseBody3 = { - type: "sensitive", + type: "encrypted", key: "", value: "", }; diff --git a/docs/models/removeprojectenvresponsebodyprojectsresponsetarget.md b/docs/models/removeprojectenvresponsebodyprojectsresponsetarget.md index e57ec2c3..caf9a09f 100644 --- a/docs/models/removeprojectenvresponsebodyprojectsresponsetarget.md +++ b/docs/models/removeprojectenvresponsebodyprojectsresponsetarget.md @@ -14,6 +14,6 @@ const value: models.RemoveProjectEnvTargetProjectsResponse1[] = [ ### `models.RemoveProjectEnvTargetProjectsResponse2` ```typescript -const value: models.RemoveProjectEnvTargetProjectsResponse2 = "production"; +const value: models.RemoveProjectEnvTargetProjectsResponse2 = "preview"; ``` diff --git a/docs/models/removeprojectenvresponsebodyprojectsresponsetype.md b/docs/models/removeprojectenvresponsebodyprojectsresponsetype.md index a909453f..396873bc 100644 --- a/docs/models/removeprojectenvresponsebodyprojectsresponsetype.md +++ b/docs/models/removeprojectenvresponsebodyprojectsresponsetype.md @@ -5,7 +5,7 @@ ```typescript import { RemoveProjectEnvResponseBodyProjectsResponseType } from "@vercel/sdk/models/removeprojectenvop.js"; -let value: RemoveProjectEnvResponseBodyProjectsResponseType = "secret"; +let value: RemoveProjectEnvResponseBodyProjectsResponseType = "plain"; ``` ## Values diff --git a/docs/models/removeprojectenvresponsebodyprojectstarget.md b/docs/models/removeprojectenvresponsebodyprojectstarget.md index 57686203..b504d951 100644 --- a/docs/models/removeprojectenvresponsebodyprojectstarget.md +++ b/docs/models/removeprojectenvresponsebodyprojectstarget.md @@ -14,6 +14,6 @@ const value: models.RemoveProjectEnvTargetProjects1[] = [ ### `models.RemoveProjectEnvTargetProjects2` ```typescript -const value: models.RemoveProjectEnvTargetProjects2 = "production"; +const value: models.RemoveProjectEnvTargetProjects2 = "development"; ``` diff --git a/docs/models/removeprojectenvresponsebodyprojectstype.md b/docs/models/removeprojectenvresponsebodyprojectstype.md index 93a9ef92..a56af518 100644 --- a/docs/models/removeprojectenvresponsebodyprojectstype.md +++ b/docs/models/removeprojectenvresponsebodyprojectstype.md @@ -5,7 +5,7 @@ ```typescript import { RemoveProjectEnvResponseBodyProjectsType } from "@vercel/sdk/models/removeprojectenvop.js"; -let value: RemoveProjectEnvResponseBodyProjectsType = "secret"; +let value: RemoveProjectEnvResponseBodyProjectsType = "sensitive"; ``` ## Values diff --git a/docs/models/removeprojectenvresponsebodytarget.md b/docs/models/removeprojectenvresponsebodytarget.md index 2b472b42..420ee7a5 100644 --- a/docs/models/removeprojectenvresponsebodytarget.md +++ b/docs/models/removeprojectenvresponsebodytarget.md @@ -7,13 +7,13 @@ ```typescript const value: models.RemoveProjectEnvTarget1[] = [ - "production", + "preview", ]; ``` ### `models.RemoveProjectEnvTarget2` ```typescript -const value: models.RemoveProjectEnvTarget2 = "preview"; +const value: models.RemoveProjectEnvTarget2 = "production"; ``` diff --git a/docs/models/removeprojectenvtarget2.md b/docs/models/removeprojectenvtarget2.md index 79bcc790..02ce0f6d 100644 --- a/docs/models/removeprojectenvtarget2.md +++ b/docs/models/removeprojectenvtarget2.md @@ -5,7 +5,7 @@ ```typescript import { RemoveProjectEnvTarget2 } from "@vercel/sdk/models/removeprojectenvop.js"; -let value: RemoveProjectEnvTarget2 = "development"; +let value: RemoveProjectEnvTarget2 = "production"; ``` ## Values diff --git a/docs/models/removeprojectenvtargetprojects2.md b/docs/models/removeprojectenvtargetprojects2.md index fed18fed..b85aed02 100644 --- a/docs/models/removeprojectenvtargetprojects2.md +++ b/docs/models/removeprojectenvtargetprojects2.md @@ -5,7 +5,7 @@ ```typescript import { RemoveProjectEnvTargetProjects2 } from "@vercel/sdk/models/removeprojectenvop.js"; -let value: RemoveProjectEnvTargetProjects2 = "preview"; +let value: RemoveProjectEnvTargetProjects2 = "development"; ``` ## Values diff --git a/docs/models/repos.md b/docs/models/repos.md index 3946ee35..eaa04431 100644 --- a/docs/models/repos.md +++ b/docs/models/repos.md @@ -6,9 +6,9 @@ import { Repos } from "@vercel/sdk/models/searchrepoop.js"; let value: Repos = { - id: "", - provider: "github-custom-host", - url: "https://raw-spring.info", + id: 5749.9, + provider: "gitlab", + url: "https://wiggly-encouragement.net", name: "", slug: "", namespace: "", @@ -19,7 +19,7 @@ let value: Repos = { ownerType: "user", private: false, defaultBranch: "", - updatedAt: 8048.23, + updatedAt: 2305.94, }; ``` diff --git a/docs/models/requestaccesstoteamteamsgituserid.md b/docs/models/requestaccesstoteamteamsgituserid.md index 6dcb1956..7e13540e 100644 --- a/docs/models/requestaccesstoteamteamsgituserid.md +++ b/docs/models/requestaccesstoteamteamsgituserid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 3530.36; +const value: number = 2698.89; ``` diff --git a/docs/models/requestaccesstoteamteamsjoinedfrom.md b/docs/models/requestaccesstoteamteamsjoinedfrom.md index 481deb72..d68bfc46 100644 --- a/docs/models/requestaccesstoteamteamsjoinedfrom.md +++ b/docs/models/requestaccesstoteamteamsjoinedfrom.md @@ -6,7 +6,7 @@ import { RequestAccessToTeamTeamsJoinedFrom } from "@vercel/sdk/models/requestaccesstoteamop.js"; let value: RequestAccessToTeamTeamsJoinedFrom = { - origin: "bitbucket", + origin: "gitlab", }; ``` diff --git a/docs/models/requestaccesstoteamteamsorigin.md b/docs/models/requestaccesstoteamteamsorigin.md index 12eab91c..027d55cd 100644 --- a/docs/models/requestaccesstoteamteamsorigin.md +++ b/docs/models/requestaccesstoteamteamsorigin.md @@ -5,7 +5,7 @@ ```typescript import { RequestAccessToTeamTeamsOrigin } from "@vercel/sdk/models/requestaccesstoteamop.js"; -let value: RequestAccessToTeamTeamsOrigin = "link"; +let value: RequestAccessToTeamTeamsOrigin = "dsync"; ``` ## Values diff --git a/docs/models/requestbody.md b/docs/models/requestbody.md index 3d61048d..c5c91c2b 100644 --- a/docs/models/requestbody.md +++ b/docs/models/requestbody.md @@ -7,7 +7,7 @@ import { RequestBody } from "@vercel/sdk/models/recordeventsop.js"; let value: RequestBody = { sessionId: "", - source: "LOCAL", + source: "REMOTE", event: "HIT", hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB", duration: 400, diff --git a/docs/models/requestbody6.md b/docs/models/requestbody6.md index 9790d313..aeda374e 100644 --- a/docs/models/requestbody6.md +++ b/docs/models/requestbody6.md @@ -9,10 +9,10 @@ import { RequestBody6 } from "@vercel/sdk/models/updatefirewallconfigop.js"; let value: RequestBody6 = { action: "crs.update", - id: "gen", + id: "ma", value: { active: false, - action: "deny", + action: "log", }, }; ``` diff --git a/docs/models/requestbody8.md b/docs/models/requestbody8.md index c7474f10..74cac82b 100644 --- a/docs/models/requestbody8.md +++ b/docs/models/requestbody8.md @@ -10,9 +10,9 @@ import { RequestBody8 } from "@vercel/sdk/models/updatefirewallconfigop.js"; let value: RequestBody8 = { action: "ip.insert", value: { - hostname: "bustling-peony.com", - ip: "174.210.38.193", - action: "log", + hostname: "incomparable-boyfriend.name", + ip: "124.174.210.38", + action: "bypass", }, }; ``` diff --git a/docs/models/requestbody9.md b/docs/models/requestbody9.md index 4bd349ba..e8885996 100644 --- a/docs/models/requestbody9.md +++ b/docs/models/requestbody9.md @@ -11,8 +11,8 @@ let value: RequestBody9 = { action: "ip.update", id: "", value: { - hostname: "submissive-requirement.biz", - ip: "47.48.111.189", + hostname: "stupendous-singing.net", + ip: "126.47.48.111", action: "log", }, }; diff --git a/docs/models/requestbodyconditiongroup.md b/docs/models/requestbodyconditiongroup.md index ff8fd2e0..a24574fb 100644 --- a/docs/models/requestbodyconditiongroup.md +++ b/docs/models/requestbodyconditiongroup.md @@ -8,8 +8,8 @@ import { RequestBodyConditionGroup } from "@vercel/sdk/models/updatefirewallconf let value: RequestBodyConditionGroup = { conditions: [ { - type: "host", - op: "pre", + type: "environment", + op: "re", }, ], }; diff --git a/docs/models/requestbodyconditions.md b/docs/models/requestbodyconditions.md index 55e0167c..4c99df7a 100644 --- a/docs/models/requestbodyconditions.md +++ b/docs/models/requestbodyconditions.md @@ -6,8 +6,8 @@ import { RequestBodyConditions } from "@vercel/sdk/models/updatefirewallconfigop.js"; let value: RequestBodyConditions = { - type: "ip_address", - op: "pre", + type: "method", + op: "inc", }; ``` diff --git a/docs/models/requestbodymitigate.md b/docs/models/requestbodymitigate.md index e8e4ba85..99329181 100644 --- a/docs/models/requestbodymitigate.md +++ b/docs/models/requestbodymitigate.md @@ -6,7 +6,7 @@ import { RequestBodyMitigate } from "@vercel/sdk/models/updatefirewallconfigop.js"; let value: RequestBodyMitigate = { - action: "rate_limit", + action: "log", }; ``` diff --git a/docs/models/requestbodyop.md b/docs/models/requestbodyop.md index fdee1b8c..59ed7a85 100644 --- a/docs/models/requestbodyop.md +++ b/docs/models/requestbodyop.md @@ -7,7 +7,7 @@ ```typescript import { RequestBodyOp } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: RequestBodyOp = "ex"; +let value: RequestBodyOp = "suf"; ``` ## Values diff --git a/docs/models/requestbodyratelimit.md b/docs/models/requestbodyratelimit.md index ca1d5637..4e1aa52e 100644 --- a/docs/models/requestbodyratelimit.md +++ b/docs/models/requestbodyratelimit.md @@ -7,9 +7,9 @@ ```typescript const value: models.UpdateFirewallConfigRateLimit1 = { - algo: "token_bucket", - window: 6946.11, - limit: 432.71, + algo: "fixed_window", + window: 6016.34, + limit: 6946.11, keys: [ "", ], diff --git a/docs/models/requestbodyvalue.md b/docs/models/requestbodyvalue.md index 6fcff0ee..f22a67c1 100644 --- a/docs/models/requestbodyvalue.md +++ b/docs/models/requestbodyvalue.md @@ -12,8 +12,8 @@ let value: RequestBodyValue = { { conditions: [ { - type: "ip_address", - op: "sub", + type: "geo_city", + op: "inc", }, ], }, diff --git a/docs/models/responsebody.md b/docs/models/responsebody.md index 4bb86f86..2d550c2e 100644 --- a/docs/models/responsebody.md +++ b/docs/models/responsebody.md @@ -7,8 +7,8 @@ ```typescript const value: models.ResponseBody1 = { - size: 971.01, - taskDurationMs: 8379.45, + size: 9764.6, + taskDurationMs: 4686.51, }; ``` diff --git a/docs/models/responsebody1.md b/docs/models/responsebody1.md index 0dc383b1..2be2ab1c 100644 --- a/docs/models/responsebody1.md +++ b/docs/models/responsebody1.md @@ -6,8 +6,8 @@ import { ResponseBody1 } from "@vercel/sdk/models/artifactqueryop.js"; let value: ResponseBody1 = { - size: 3687.25, - taskDurationMs: 8209.93, + size: 8379.45, + taskDurationMs: 960.98, }; ``` diff --git a/docs/models/responsebody3.md b/docs/models/responsebody3.md index 78905c80..c02f9a8f 100644 --- a/docs/models/responsebody3.md +++ b/docs/models/responsebody3.md @@ -16,8 +16,8 @@ let value: ResponseBody3 = { type: "NS", value: "", creator: "", - created: 7998.65, - updated: 3109.30, + created: 7998.66, + updated: 3109.3, createdAt: 4984.35, updatedAt: 7017.86, }, diff --git a/docs/models/responsebodyaction.md b/docs/models/responsebodyaction.md new file mode 100644 index 00000000..093a7bc2 --- /dev/null +++ b/docs/models/responsebodyaction.md @@ -0,0 +1,15 @@ +# ResponseBodyAction + +## Example Usage + +```typescript +import { ResponseBodyAction } from "@vercel/sdk/models/getbypassipop.js"; + +let value: ResponseBodyAction = "bypass"; +``` + +## Values + +```typescript +"block" | "bypass" +``` \ No newline at end of file diff --git a/docs/models/responsebodyaliasassignedat.md b/docs/models/responsebodyaliasassignedat.md index fc7464d8..f124e730 100644 --- a/docs/models/responsebodyaliasassignedat.md +++ b/docs/models/responsebodyaliasassignedat.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 1559.78; +const value: number = 4260.02; ``` ### `boolean` diff --git a/docs/models/responsebodybillingplan.md b/docs/models/responsebodybillingplan.md index ed9f546f..bf1ed5e7 100644 --- a/docs/models/responsebodybillingplan.md +++ b/docs/models/responsebodybillingplan.md @@ -9,7 +9,7 @@ let value: ResponseBodyBillingPlan = { id: "", type: "subscription", name: "", - description: "unhappy yum finally drat after sheepishly bah um", + description: "rusty so after awkwardly loosely than providence", }; ``` diff --git a/docs/models/responsebodychecksconclusion.md b/docs/models/responsebodychecksconclusion.md index 3d06a3cd..a2a0e1d9 100644 --- a/docs/models/responsebodychecksconclusion.md +++ b/docs/models/responsebodychecksconclusion.md @@ -5,7 +5,7 @@ ```typescript import { ResponseBodyChecksConclusion } from "@vercel/sdk/models/getdeploymentop.js"; -let value: ResponseBodyChecksConclusion = "canceled"; +let value: ResponseBodyChecksConclusion = "succeeded"; ``` ## Values diff --git a/docs/models/responsebodychecksstate.md b/docs/models/responsebodychecksstate.md index 33817712..5c4f357e 100644 --- a/docs/models/responsebodychecksstate.md +++ b/docs/models/responsebodychecksstate.md @@ -5,7 +5,7 @@ ```typescript import { ResponseBodyChecksState } from "@vercel/sdk/models/getdeploymentop.js"; -let value: ResponseBodyChecksState = "registered"; +let value: ResponseBodyChecksState = "completed"; ``` ## Values diff --git a/docs/models/responsebodydisabledreason.md b/docs/models/responsebodydisabledreason.md index 2d246b57..b380c885 100644 --- a/docs/models/responsebodydisabledreason.md +++ b/docs/models/responsebodydisabledreason.md @@ -5,7 +5,7 @@ ```typescript import { ResponseBodyDisabledReason } from "@vercel/sdk/models/getconfigurationsop.js"; -let value: ResponseBodyDisabledReason = "original-owner-left-the-team"; +let value: ResponseBodyDisabledReason = "account-plan-downgrade"; ``` ## Values diff --git a/docs/models/responsebodyevents.md b/docs/models/responsebodyevents.md index 7d350a37..e27c5bcb 100644 --- a/docs/models/responsebodyevents.md +++ b/docs/models/responsebodyevents.md @@ -13,5 +13,5 @@ let value: ResponseBodyEvents = "deployment.created"; ## Values ```typescript -"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" +"budget.reached" | "budget.reset" | "domain.created" | "deployment.created" | "deployment.error" | "deployment.canceled" | "deployment.succeeded" | "deployment.ready" | "deployment.check-rerequested" | "deployment.promoted" | "deployment.integration.action.start" | "deployment.integration.action.cancel" | "deployment.integration.action.cleanup" | "edge-config.created" | "edge-config.deleted" | "edge-config.items.updated" | "firewall.attack" | "integration-configuration.permission-upgraded" | "integration-configuration.removed" | "integration-configuration.scope-change-confirmed" | "integration-resource.project-connected" | "integration-resource.project-disconnected" | "project.created" | "project.removed" | "deployment-checks-completed" | "deployment-ready" | "deployment-prepared" | "deployment-error" | "deployment-check-rerequested" | "deployment-canceled" | "project-created" | "project-removed" | "domain-created" | "deployment" | "integration-configuration-permission-updated" | "integration-configuration-removed" | "integration-configuration-scope-change-confirmed" | "marketplace.invoice.created" | "marketplace.invoice.paid" | "marketplace.invoice.notpaid" | "marketplace.invoice.refunded" | "observability.anomaly" | "test-webhook" ``` \ No newline at end of file diff --git a/docs/models/responsebodyframework.md b/docs/models/responsebodyframework.md index 5129b5fe..e8c3762c 100644 --- a/docs/models/responsebodyframework.md +++ b/docs/models/responsebodyframework.md @@ -5,7 +5,7 @@ ```typescript import { ResponseBodyFramework } from "@vercel/sdk/models/getdeploymentop.js"; -let value: ResponseBodyFramework = "svelte"; +let value: ResponseBodyFramework = "parcel"; ``` ## Values diff --git a/docs/models/responsebodygitrepo.md b/docs/models/responsebodygitrepo.md index 2fdb0844..d9e4ceb4 100644 --- a/docs/models/responsebodygitrepo.md +++ b/docs/models/responsebodygitrepo.md @@ -8,7 +8,7 @@ ```typescript const value: models.GetDeploymentGitRepo1 = { namespace: "", - projectId: 1165.59, + projectId: 1165.58, type: "gitlab", url: "https://accomplished-hippodrome.name/", path: "/opt/lib", @@ -25,9 +25,9 @@ const value: models.GetDeploymentGitRepo1 = { const value: models.GetDeploymentGitRepo2 = { org: "", repo: "", - repoId: 626.89, + repoId: 626.88, type: "github", - repoOwnerId: 2781.17, + repoOwnerId: 2781.16, path: "/etc/ppp", defaultBranch: "", name: "", diff --git a/docs/models/responsebodygitsource.md b/docs/models/responsebodygitsource.md index 30ad6ba2..4850e7cf 100644 --- a/docs/models/responsebodygitsource.md +++ b/docs/models/responsebodygitsource.md @@ -8,7 +8,7 @@ ```typescript const value: models.GetDeploymentGitSource1 = { type: "github", - repoId: 1081.66, + repoId: "", }; ``` @@ -57,7 +57,7 @@ const value: models.GetDeploymentGitSource6 = { type: "custom", ref: "", sha: "", - gitUrl: "https://rich-brochure.info/", + gitUrl: "https://carefree-grouper.biz", }; ``` @@ -68,7 +68,7 @@ const value: models.GetDeploymentGitSource7 = { type: "github", ref: "", sha: "", - repoId: 2766.50, + repoId: 5063.43, }; ``` @@ -79,7 +79,7 @@ const value: models.GetDeploymentGitSource8 = { type: "gitlab", ref: "", sha: "", - projectId: 5063.43, + projectId: 3498.98, }; ``` diff --git a/docs/models/responsebodyid.md b/docs/models/responsebodyid.md index 3b1261ab..b51c131d 100644 --- a/docs/models/responsebodyid.md +++ b/docs/models/responsebodyid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 7578.24; +const value: number = 5955.85; ``` diff --git a/docs/models/responsebodyinstallationtype.md b/docs/models/responsebodyinstallationtype.md index 9aba3d1f..10e5bff1 100644 --- a/docs/models/responsebodyinstallationtype.md +++ b/docs/models/responsebodyinstallationtype.md @@ -7,7 +7,7 @@ Defines the installation type. - 'external' integrations are installed via the e ```typescript import { ResponseBodyInstallationType } from "@vercel/sdk/models/getconfigurationsop.js"; -let value: ResponseBodyInstallationType = "marketplace"; +let value: ResponseBodyInstallationType = "external"; ``` ## Values diff --git a/docs/models/responsebodyintegrations.md b/docs/models/responsebodyintegrations.md index 0186df3f..177d0f8a 100644 --- a/docs/models/responsebodyintegrations.md +++ b/docs/models/responsebodyintegrations.md @@ -7,7 +7,7 @@ import { ResponseBodyIntegrations } from "@vercel/sdk/models/getdeploymentop.js" let value: ResponseBodyIntegrations = { status: "error", - startedAt: 180.96, + startedAt: 5905.85, }; ``` diff --git a/docs/models/responsebodyitems.md b/docs/models/responsebodyitems.md index 79868d35..fcfe91b6 100644 --- a/docs/models/responsebodyitems.md +++ b/docs/models/responsebodyitems.md @@ -8,7 +8,7 @@ import { ResponseBodyItems } from "@vercel/sdk/models/getedgeconfigbackupop.js"; let value: ResponseBodyItems = { updatedAt: 3772.69, value: [], - createdAt: 8180.77, + createdAt: 8180.78, }; ``` diff --git a/docs/models/responsebodylambdas.md b/docs/models/responsebodylambdas.md index 96e8e1d3..c84b6cfd 100644 --- a/docs/models/responsebodylambdas.md +++ b/docs/models/responsebodylambdas.md @@ -10,7 +10,7 @@ import { ResponseBodyLambdas } from "@vercel/sdk/models/getdeploymentop.js"; let value: ResponseBodyLambdas = { output: [ { - path: "/etc/defaults", + path: "/var/yp", functionName: "", }, ], diff --git a/docs/models/responsebodynamespaceid.md b/docs/models/responsebodynamespaceid.md index ec2ee5bf..c4390bd0 100644 --- a/docs/models/responsebodynamespaceid.md +++ b/docs/models/responsebodynamespaceid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 492.85; +const value: number = 1648.05; ``` diff --git a/docs/models/responsebodyoutput.md b/docs/models/responsebodyoutput.md index 9d87872b..15004c4e 100644 --- a/docs/models/responsebodyoutput.md +++ b/docs/models/responsebodyoutput.md @@ -6,7 +6,7 @@ import { ResponseBodyOutput } from "@vercel/sdk/models/getdeploymentop.js"; let value: ResponseBodyOutput = { - path: "/srv", + path: "/var/yp", functionName: "", }; ``` diff --git a/docs/models/responsebodypagination.md b/docs/models/responsebodypagination.md index 069ed056..e6ebf151 100644 --- a/docs/models/responsebodypagination.md +++ b/docs/models/responsebodypagination.md @@ -6,7 +6,7 @@ import { ResponseBodyPagination } from "@vercel/sdk/models/listaccessgroupsop.js"; let value: ResponseBodyPagination = { - count: 7742.34, + count: 187.89, next: "", }; ``` diff --git a/docs/models/responsebodyprotocol.md b/docs/models/responsebodyprotocol.md index 5fab6756..ee737e49 100644 --- a/docs/models/responsebodyprotocol.md +++ b/docs/models/responsebodyprotocol.md @@ -7,7 +7,7 @@ Must be `http` or `https`. ```typescript import { ResponseBodyProtocol } from "@vercel/sdk/models/getdeploymentop.js"; -let value: ResponseBodyProtocol = "https"; +let value: ResponseBodyProtocol = "http"; ``` ## Values diff --git a/docs/models/responsebodyprovider.md b/docs/models/responsebodyprovider.md index f1905965..043f0d26 100644 --- a/docs/models/responsebodyprovider.md +++ b/docs/models/responsebodyprovider.md @@ -5,7 +5,7 @@ ```typescript import { ResponseBodyProvider } from "@vercel/sdk/models/searchrepoop.js"; -let value: ResponseBodyProvider = "bitbucket"; +let value: ResponseBodyProvider = "gitlab"; ``` ## Values diff --git a/docs/models/responsebodyquote.md b/docs/models/responsebodyquote.md index e7ce753c..9bb31eca 100644 --- a/docs/models/responsebodyquote.md +++ b/docs/models/responsebodyquote.md @@ -7,7 +7,7 @@ import { ResponseBodyQuote } from "@vercel/sdk/models/getconfigurationsop.js"; let value: ResponseBodyQuote = { line: "", - amount: "718.88", + amount: "825.68", }; ``` diff --git a/docs/models/responsebodyreadystate.md b/docs/models/responsebodyreadystate.md index 760c5ccf..f579ce0e 100644 --- a/docs/models/responsebodyreadystate.md +++ b/docs/models/responsebodyreadystate.md @@ -5,7 +5,7 @@ ```typescript import { ResponseBodyReadyState } from "@vercel/sdk/models/getdeploymentop.js"; -let value: ResponseBodyReadyState = "ERROR"; +let value: ResponseBodyReadyState = "BUILDING"; ``` ## Values diff --git a/docs/models/responsebodyrecords.md b/docs/models/responsebodyrecords.md index 5c2707d2..acf94119 100644 --- a/docs/models/responsebodyrecords.md +++ b/docs/models/responsebodyrecords.md @@ -14,7 +14,7 @@ let value: ResponseBodyRecords = { creator: "", created: 738.26, updated: 4909.66, - createdAt: 7175.60, + createdAt: 7175.6, updatedAt: 7381.52, }; ``` diff --git a/docs/models/responsebodyremotepatterns.md b/docs/models/responsebodyremotepatterns.md index 29111d83..2f1e6e63 100644 --- a/docs/models/responsebodyremotepatterns.md +++ b/docs/models/responsebodyremotepatterns.md @@ -6,7 +6,7 @@ import { ResponseBodyRemotePatterns } from "@vercel/sdk/models/getdeploymentop.js"; let value: ResponseBodyRemotePatterns = { - hostname: "jam-packed-section.org", + hostname: "steel-traditionalism.biz", }; ``` diff --git a/docs/models/responsebodyresult.md b/docs/models/responsebodyresult.md new file mode 100644 index 00000000..43aaf8c8 --- /dev/null +++ b/docs/models/responsebodyresult.md @@ -0,0 +1,27 @@ +# ResponseBodyResult + +## Example Usage + +```typescript +import { ResponseBodyResult } from "@vercel/sdk/models/getbypassipop.js"; + +let value: ResponseBodyResult = { + ownerId: "", + id: "", + domain: "kaleidoscopic-vibration.net", + ip: "e8cf:ee66:eb4c:a79c:aa09:7db1:3eac:fa2f", + projectId: "", + isProjectRule: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ownerId` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `ip` | *string* | :heavy_check_mark: | N/A | +| `projectId` | *string* | :heavy_check_mark: | N/A | +| `isProjectRule` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responsebodystatus.md b/docs/models/responsebodystatus.md index 019807e8..c8234dc7 100644 --- a/docs/models/responsebodystatus.md +++ b/docs/models/responsebodystatus.md @@ -5,7 +5,7 @@ ```typescript import { ResponseBodyStatus } from "@vercel/sdk/models/getdeploymentop.js"; -let value: ResponseBodyStatus = "READY"; +let value: ResponseBodyStatus = "ERROR"; ``` ## Values diff --git a/docs/models/rfi.md b/docs/models/rfi.md index 8a31cc23..7219b166 100644 --- a/docs/models/rfi.md +++ b/docs/models/rfi.md @@ -9,7 +9,7 @@ import { Rfi } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Rfi = { active: false, - action: "log", + action: "deny", }; ``` diff --git a/docs/models/role.md b/docs/models/role.md index f307cb1c..438532d3 100644 --- a/docs/models/role.md +++ b/docs/models/role.md @@ -5,7 +5,7 @@ ```typescript import { Role } from "@vercel/sdk/models/teamlimited.js"; -let value: Role = "OWNER"; +let value: Role = "MEMBER"; ``` ## Values diff --git a/docs/models/roles.md b/docs/models/roles.md index 98c6e113..b68f8871 100644 --- a/docs/models/roles.md +++ b/docs/models/roles.md @@ -6,7 +6,7 @@ ### `models.Roles1` ```typescript -const value: models.Roles1 = "DEVELOPER"; +const value: models.Roles1 = "MEMBER"; ``` ### `models.Roles2` diff --git a/docs/models/roles1.md b/docs/models/roles1.md index af695c30..9e253297 100644 --- a/docs/models/roles1.md +++ b/docs/models/roles1.md @@ -5,7 +5,7 @@ ```typescript import { Roles1 } from "@vercel/sdk/models/patchteamop.js"; -let value: Roles1 = "DEVELOPER"; +let value: Roles1 = "CONTRIBUTOR"; ``` ## Values diff --git a/docs/models/routes3.md b/docs/models/routes3.md index b32349f1..a8b4f4ef 100644 --- a/docs/models/routes3.md +++ b/docs/models/routes3.md @@ -8,7 +8,7 @@ import { Routes3 } from "@vercel/sdk/models/createdeploymentop.js"; let value: Routes3 = { src: "", continue: false, - middleware: 5323.20, + middleware: 5323.2, }; ``` diff --git a/docs/models/rules.md b/docs/models/rules.md index 74b738c9..46f74701 100644 --- a/docs/models/rules.md +++ b/docs/models/rules.md @@ -12,8 +12,8 @@ let value: Rules = { { conditions: [ { - type: "scheme", - op: "sub", + type: "ja4_digest", + op: "ninc", }, ], }, diff --git a/docs/models/scopes.md b/docs/models/scopes.md index b864789c..6e0a2beb 100644 --- a/docs/models/scopes.md +++ b/docs/models/scopes.md @@ -8,8 +8,8 @@ ```typescript const value: models.Scopes1 = { type: "user", - origin: "email", - createdAt: 6104.90, + origin: "invite", + createdAt: 4090.21, }; ``` @@ -19,8 +19,8 @@ const value: models.Scopes1 = { const value: models.Scopes2 = { type: "team", teamId: "", - origin: "manual", - createdAt: 9747.23, + origin: "bitbucket", + createdAt: 9895.26, }; ``` diff --git a/docs/models/scopes1.md b/docs/models/scopes1.md index 9bd527b3..fbac2553 100644 --- a/docs/models/scopes1.md +++ b/docs/models/scopes1.md @@ -9,8 +9,8 @@ import { Scopes1 } from "@vercel/sdk/models/authtoken.js"; let value: Scopes1 = { type: "user", - origin: "sms", - createdAt: 2304.00, + origin: "saml", + createdAt: 4349.55, }; ``` diff --git a/docs/models/scopes2.md b/docs/models/scopes2.md index 7757758e..9ac345e3 100644 --- a/docs/models/scopes2.md +++ b/docs/models/scopes2.md @@ -10,8 +10,8 @@ import { Scopes2 } from "@vercel/sdk/models/authtoken.js"; let value: Scopes2 = { type: "team", teamId: "", - origin: "manual", - createdAt: 2580.36, + origin: "bitbucket", + createdAt: 7083.6, }; ``` diff --git a/docs/models/scopesorigin.md b/docs/models/scopesorigin.md index b9569eef..1e815273 100644 --- a/docs/models/scopesorigin.md +++ b/docs/models/scopesorigin.md @@ -5,7 +5,7 @@ ```typescript import { ScopesOrigin } from "@vercel/sdk/models/authtoken.js"; -let value: ScopesOrigin = "email"; +let value: ScopesOrigin = "bitbucket"; ``` ## Values diff --git a/docs/models/sd.md b/docs/models/sd.md index e6bc2ee1..70759832 100644 --- a/docs/models/sd.md +++ b/docs/models/sd.md @@ -9,7 +9,7 @@ import { Sd } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Sd = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/searchreporesponsebody.md b/docs/models/searchreporesponsebody.md index acfc83df..7dd85fa2 100644 --- a/docs/models/searchreporesponsebody.md +++ b/docs/models/searchreporesponsebody.md @@ -15,24 +15,24 @@ const value: models.SearchRepoResponseBody1 = {}; const value: models.SearchRepoResponseBody2 = { gitAccount: { provider: "bitbucket", - namespaceId: 7399.37, + namespaceId: 7399.46, }, repos: [ { - id: 9682.12, + id: 4144.38, provider: "github-custom-host", - url: "https://helpful-gray.biz", + url: "https://dependable-descendant.biz/", name: "", slug: "", namespace: "", owner: { - id: "", + id: 5358.83, name: "", }, ownerType: "team", private: false, defaultBranch: "", - updatedAt: 2925.71, + updatedAt: 8204.62, }, ], }; diff --git a/docs/models/searchreporesponsebody2.md b/docs/models/searchreporesponsebody2.md index bfdca9ee..8c17a3bb 100644 --- a/docs/models/searchreporesponsebody2.md +++ b/docs/models/searchreporesponsebody2.md @@ -7,25 +7,25 @@ import { SearchRepoResponseBody2 } from "@vercel/sdk/models/searchrepoop.js"; let value: SearchRepoResponseBody2 = { gitAccount: { - provider: "gitlab", - namespaceId: "", + provider: "github-custom-host", + namespaceId: 2925.71, }, repos: [ { - id: 6651.83, - provider: "github", - url: "https://glaring-napkin.info/", + id: "", + provider: "gitlab", + url: "https://lined-soybean.biz/", name: "", slug: "", namespace: "", owner: { - id: 8196.90, + id: "", name: "", }, - ownerType: "user", + ownerType: "team", private: false, defaultBranch: "", - updatedAt: 1342.67, + updatedAt: 5456.29, }, ], }; diff --git a/docs/models/searchreporesponsebodyid.md b/docs/models/searchreporesponsebodyid.md index d8ae0127..e96e05e2 100644 --- a/docs/models/searchreporesponsebodyid.md +++ b/docs/models/searchreporesponsebodyid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 2542.40; +const value: number = 6925.55; ``` diff --git a/docs/models/searchreporesponsebodyprovider.md b/docs/models/searchreporesponsebodyprovider.md index 950534ee..1b05c836 100644 --- a/docs/models/searchreporesponsebodyprovider.md +++ b/docs/models/searchreporesponsebodyprovider.md @@ -5,7 +5,7 @@ ```typescript import { SearchRepoResponseBodyProvider } from "@vercel/sdk/models/searchrepoop.js"; -let value: SearchRepoResponseBodyProvider = "github"; +let value: SearchRepoResponseBodyProvider = "github-custom-host"; ``` ## Values diff --git a/docs/models/softblock.md b/docs/models/softblock.md index 124ec290..d27a3fa8 100644 --- a/docs/models/softblock.md +++ b/docs/models/softblock.md @@ -8,7 +8,7 @@ When the User account has been "soft blocked", this property will contain the da import { SoftBlock } from "@vercel/sdk/models/authuser.js"; let value: SoftBlock = { - blockedAt: 2552.65, + blockedAt: 2552.64, reason: "BLOCKED_FOR_PLATFORM_ABUSE", }; ``` diff --git a/docs/models/sources.md b/docs/models/sources.md index 8a9b702a..be468c37 100644 --- a/docs/models/sources.md +++ b/docs/models/sources.md @@ -5,7 +5,7 @@ ```typescript import { Sources } from "@vercel/sdk/models/createlogdrainop.js"; -let value: Sources = "external"; +let value: Sources = "build"; ``` ## Values diff --git a/docs/models/sqli.md b/docs/models/sqli.md index 73f70b5c..f4dc7726 100644 --- a/docs/models/sqli.md +++ b/docs/models/sqli.md @@ -9,7 +9,7 @@ import { Sqli } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Sqli = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/statusstatus.md b/docs/models/statusstatus.md index 4b77db0d..ca5ed33a 100644 --- a/docs/models/statusstatus.md +++ b/docs/models/statusstatus.md @@ -5,7 +5,7 @@ ```typescript import { StatusStatus } from "@vercel/sdk/models/statusop.js"; -let value: StatusStatus = "disabled"; +let value: StatusStatus = "paused"; ``` ## Values diff --git a/docs/models/submitbillingdatabilling.md b/docs/models/submitbillingdatabilling.md index 050645e4..dd6f8dbf 100644 --- a/docs/models/submitbillingdatabilling.md +++ b/docs/models/submitbillingdatabilling.md @@ -13,7 +13,7 @@ const value: models.Billing1[] = [ billingPlanId: "", name: "", price: "784.27", - quantity: 8748.42, + quantity: 8748.43, units: "", total: "", }, diff --git a/docs/models/submitbillingdatarequest.md b/docs/models/submitbillingdatarequest.md index 0bad81a3..69732c21 100644 --- a/docs/models/submitbillingdatarequest.md +++ b/docs/models/submitbillingdatarequest.md @@ -19,7 +19,7 @@ let value: SubmitBillingDataRequest = { billingPlanId: "", name: "", price: "285.44", - quantity: 1812.68, + quantity: 1812.67, units: "", total: "", }, @@ -31,7 +31,7 @@ let value: SubmitBillingDataRequest = { type: "interval", units: "", dayValue: 6155.97, - periodValue: 9465.57, + periodValue: 9465.58, }, ], }, diff --git a/docs/models/submitinvoiceitems.md b/docs/models/submitinvoiceitems.md index 63a9471a..32d723eb 100644 --- a/docs/models/submitinvoiceitems.md +++ b/docs/models/submitinvoiceitems.md @@ -9,7 +9,7 @@ let value: SubmitInvoiceItems = { billingPlanId: "", name: "", price: "81.99", - quantity: 2096.03, + quantity: 2096.02, units: "", total: "", }; diff --git a/docs/models/submitinvoicerequest.md b/docs/models/submitinvoicerequest.md index 23936605..f4bb1bc5 100644 --- a/docs/models/submitinvoicerequest.md +++ b/docs/models/submitinvoicerequest.md @@ -18,7 +18,7 @@ let value: SubmitInvoiceRequest = { billingPlanId: "", name: "", price: "146.69", - quantity: 8373.26, + quantity: 8373.27, units: "", total: "", }, diff --git a/docs/models/tagids.md b/docs/models/tagids.md new file mode 100644 index 00000000..2b869ecb --- /dev/null +++ b/docs/models/tagids.md @@ -0,0 +1,15 @@ +# TagIds + +## Example Usage + +```typescript +import { TagIds } from "@vercel/sdk/models/getconfigurationsop.js"; + +let value: TagIds = "tag_messaging"; +``` + +## Values + +```typescript +"tag_ai" | "tag_analytics" | "tag_authentication" | "tag_cms" | "tag_code_repository" | "tag_commerce" | "tag_databases" | "tag_dev_tools" | "tag_experiments" | "tag_logging" | "tag_messaging" | "tag_monitoring" | "tag_observability" | "tag_performance" | "tag_productivity" | "tag_searching" | "tag_security" | "tag_testing" | "tag_video" +``` \ No newline at end of file diff --git a/docs/models/target2.md b/docs/models/target2.md index b7b29d32..9960b188 100644 --- a/docs/models/target2.md +++ b/docs/models/target2.md @@ -5,7 +5,7 @@ ```typescript import { Target2 } from "@vercel/sdk/models/createprojectop.js"; -let value: Target2 = "production"; +let value: Target2 = "development"; ``` ## Values diff --git a/docs/models/targets.md b/docs/models/targets.md index e3ab9035..de143e27 100644 --- a/docs/models/targets.md +++ b/docs/models/targets.md @@ -7,21 +7,21 @@ import { Targets } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: Targets = { id: "", - createdAt: 5173.79, + createdAt: 5654.21, createdIn: "", creator: { - email: "Mikayla.Mann@gmail.com", + email: "Burdette76@gmail.com", uid: "", - username: "Fiona_Runolfsdottir90", + username: "Stone_Lueilwitz96", }, deploymentHostname: "", name: "", - plan: "enterprise", + plan: "pro", previewCommentsEnabled: false, private: false, - readyState: "QUEUED", + readyState: "BUILDING", type: "LAMBDAS", - url: "https://frail-designation.com", + url: "https://vengeful-pile.net/", userId: "", }; ``` diff --git a/docs/models/teamlimited.md b/docs/models/teamlimited.md index 915d79c0..0b756dcd 100644 --- a/docs/models/teamlimited.md +++ b/docs/models/teamlimited.md @@ -31,10 +31,10 @@ let value: TeamLimited = { avatar: "6eb07268bcfadd309905ffb1579354084c24655c", membership: { confirmed: false, - confirmedAt: 1541.17, - role: "MEMBER", - createdAt: 5929.46, - created: 6124.25, + confirmedAt: 9309.42, + role: "DEVELOPER", + createdAt: 7193.17, + created: 3090.49, }, created: "", createdAt: 1630748523395, diff --git a/docs/models/teams.md b/docs/models/teams.md index aa2f65dd..aa8af964 100644 --- a/docs/models/teams.md +++ b/docs/models/teams.md @@ -38,10 +38,10 @@ const value: models.TeamLimited = { avatar: "6eb07268bcfadd309905ffb1579354084c24655c", membership: { confirmed: false, - confirmedAt: 6091.64, - role: "VIEWER", - createdAt: 761.45, - created: 1580.60, + confirmedAt: 7304.56, + role: "CONTRIBUTOR", + createdAt: 2814.16, + created: 6906.54, }, created: "", createdAt: 1630748523395, diff --git a/docs/models/tier.md b/docs/models/tier.md index f2a6991f..a451e4f7 100644 --- a/docs/models/tier.md +++ b/docs/models/tier.md @@ -5,7 +5,7 @@ ```typescript import { Tier } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: Tier = "advanced"; +let value: Tier = "standard"; ``` ## Values diff --git a/docs/models/transfer.md b/docs/models/transfer.md index 6bc45162..3148e7ef 100644 --- a/docs/models/transfer.md +++ b/docs/models/transfer.md @@ -9,8 +9,8 @@ import { Transfer } from "@vercel/sdk/models/getedgeconfigsop.js"; let value: Transfer = { fromAccountId: "", - startedAt: 9290.66, - doneAt: 535.30, + startedAt: 9290.67, + doneAt: 535.29, }; ``` diff --git a/docs/models/trustedips1.md b/docs/models/trustedips1.md index 80371792..9d8a697b 100644 --- a/docs/models/trustedips1.md +++ b/docs/models/trustedips1.md @@ -6,7 +6,7 @@ import { TrustedIps1 } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: TrustedIps1 = { - deploymentType: "preview", + deploymentType: "prod_deployment_urls_and_all_previews", addresses: [ { value: "", diff --git a/docs/models/trustedips2.md b/docs/models/trustedips2.md index 8f6d2eab..536322dd 100644 --- a/docs/models/trustedips2.md +++ b/docs/models/trustedips2.md @@ -6,7 +6,7 @@ import { TrustedIps2 } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: TrustedIps2 = { - deploymentType: "preview", + deploymentType: "prod_deployment_urls_and_all_previews", }; ``` diff --git a/docs/models/trustedipsdeploymenttype.md b/docs/models/trustedipsdeploymenttype.md index dcd6d7ab..1ea18872 100644 --- a/docs/models/trustedipsdeploymenttype.md +++ b/docs/models/trustedipsdeploymenttype.md @@ -5,7 +5,7 @@ ```typescript import { TrustedIpsDeploymentType } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: TrustedIpsDeploymentType = "prod_deployment_urls_and_all_previews"; +let value: TrustedIpsDeploymentType = "production"; ``` ## Values diff --git a/docs/models/trustedipsprotectionmode.md b/docs/models/trustedipsprotectionmode.md index ae7dc14e..e3f5760a 100644 --- a/docs/models/trustedipsprotectionmode.md +++ b/docs/models/trustedipsprotectionmode.md @@ -5,7 +5,7 @@ ```typescript import { TrustedIpsProtectionMode } from "@vercel/sdk/models/createprojectop.js"; -let value: TrustedIpsProtectionMode = "exclusive"; +let value: TrustedIpsProtectionMode = "additional"; ``` ## Values diff --git a/docs/models/twotarget.md b/docs/models/twotarget.md index 1f0bd83b..9f4061bd 100644 --- a/docs/models/twotarget.md +++ b/docs/models/twotarget.md @@ -5,7 +5,7 @@ ```typescript import { TwoTarget } from "@vercel/sdk/models/createprojectenvop.js"; -let value: TwoTarget = "development"; +let value: TwoTarget = "production"; ``` ## Values diff --git a/docs/models/updateaccessgroupprojectaccessgroupsrole.md b/docs/models/updateaccessgroupprojectaccessgroupsrole.md index 0ea4f7e3..c564351a 100644 --- a/docs/models/updateaccessgroupprojectaccessgroupsrole.md +++ b/docs/models/updateaccessgroupprojectaccessgroupsrole.md @@ -5,7 +5,7 @@ ```typescript import { UpdateAccessGroupProjectAccessGroupsRole } from "@vercel/sdk/models/updateaccessgroupprojectop.js"; -let value: UpdateAccessGroupProjectAccessGroupsRole = "ADMIN"; +let value: UpdateAccessGroupProjectAccessGroupsRole = "PROJECT_DEVELOPER"; ``` ## Values diff --git a/docs/models/updateaccessgroupprojectresponsebody.md b/docs/models/updateaccessgroupprojectresponsebody.md index 6cb59ff6..f73545d3 100644 --- a/docs/models/updateaccessgroupprojectresponsebody.md +++ b/docs/models/updateaccessgroupprojectresponsebody.md @@ -10,8 +10,8 @@ let value: UpdateAccessGroupProjectResponseBody = { accessGroupId: "", projectId: "", role: "ADMIN", - createdAt: "1709756595670", - updatedAt: "1736175566782", + createdAt: "1720234370791", + updatedAt: "1736999512851", }; ``` diff --git a/docs/models/updateattackchallengemoderesponsebody.md b/docs/models/updateattackchallengemoderesponsebody.md index 93a8c9e9..ca479a39 100644 --- a/docs/models/updateattackchallengemoderesponsebody.md +++ b/docs/models/updateattackchallengemoderesponsebody.md @@ -7,7 +7,7 @@ import { UpdateAttackChallengeModeResponseBody } from "@vercel/sdk/models/update let value: UpdateAttackChallengeModeResponseBody = { attackModeEnabled: false, - attackModeUpdatedAt: 8429.35, + attackModeUpdatedAt: 9674.01, }; ``` diff --git a/docs/models/updatecheckcls.md b/docs/models/updatecheckcls.md index 64d89fd6..ff4b9a98 100644 --- a/docs/models/updatecheckcls.md +++ b/docs/models/updatecheckcls.md @@ -6,7 +6,7 @@ import { UpdateCheckCLS } from "@vercel/sdk/models/updatecheckop.js"; let value: UpdateCheckCLS = { - value: 5812.73, + value: 7252.55, source: "web-vitals", }; ``` diff --git a/docs/models/updatecheckconclusion.md b/docs/models/updatecheckconclusion.md index e29790fb..8bfbb387 100644 --- a/docs/models/updatecheckconclusion.md +++ b/docs/models/updatecheckconclusion.md @@ -5,7 +5,7 @@ ```typescript import { UpdateCheckConclusion } from "@vercel/sdk/models/updatecheckop.js"; -let value: UpdateCheckConclusion = "skipped"; +let value: UpdateCheckConclusion = "succeeded"; ``` ## Values diff --git a/docs/models/updatecheckfcp.md b/docs/models/updatecheckfcp.md index a1b4b60a..3110996a 100644 --- a/docs/models/updatecheckfcp.md +++ b/docs/models/updatecheckfcp.md @@ -6,7 +6,7 @@ import { UpdateCheckFCP } from "@vercel/sdk/models/updatecheckop.js"; let value: UpdateCheckFCP = { - value: 3965.06, + value: 8817.36, source: "web-vitals", }; ``` diff --git a/docs/models/updatechecklcp.md b/docs/models/updatechecklcp.md index 93e67dab..047a41ad 100644 --- a/docs/models/updatechecklcp.md +++ b/docs/models/updatechecklcp.md @@ -6,7 +6,7 @@ import { UpdateCheckLCP } from "@vercel/sdk/models/updatecheckop.js"; let value: UpdateCheckLCP = { - value: 8811.03, + value: 6925.32, source: "web-vitals", }; ``` diff --git a/docs/models/updatecheckmetrics.md b/docs/models/updatecheckmetrics.md index 91a625b0..249ce9bf 100644 --- a/docs/models/updatecheckmetrics.md +++ b/docs/models/updatecheckmetrics.md @@ -7,19 +7,19 @@ import { UpdateCheckMetrics } from "@vercel/sdk/models/updatecheckop.js"; let value: UpdateCheckMetrics = { fcp: { - value: 7252.54, + value: 6439.9, source: "web-vitals", }, lcp: { - value: 5013.24, + value: 4238.55, source: "web-vitals", }, cls: { - value: 9560.84, + value: 6063.93, source: "web-vitals", }, tbt: { - value: 6439.90, + value: 191.93, source: "web-vitals", }, }; diff --git a/docs/models/updatecheckresponsebody.md b/docs/models/updatecheckresponsebody.md index 820b7f17..37139053 100644 --- a/docs/models/updatecheckresponsebody.md +++ b/docs/models/updatecheckresponsebody.md @@ -8,12 +8,12 @@ import { UpdateCheckResponseBody } from "@vercel/sdk/models/updatecheckop.js"; let value: UpdateCheckResponseBody = { id: "", name: "", - status: "running", + status: "registered", blocking: false, integrationId: "", deploymentId: "", - createdAt: 6063.93, - updatedAt: 191.93, + createdAt: 6601.74, + updatedAt: 2900.77, }; ``` diff --git a/docs/models/updatecheckstatus.md b/docs/models/updatecheckstatus.md index 260f02c2..4eba5a23 100644 --- a/docs/models/updatecheckstatus.md +++ b/docs/models/updatecheckstatus.md @@ -5,7 +5,7 @@ ```typescript import { UpdateCheckStatus } from "@vercel/sdk/models/updatecheckop.js"; -let value: UpdateCheckStatus = "registered"; +let value: UpdateCheckStatus = "completed"; ``` ## Values diff --git a/docs/models/updatechecktbt.md b/docs/models/updatechecktbt.md index 36b270cc..e48f18a3 100644 --- a/docs/models/updatechecktbt.md +++ b/docs/models/updatechecktbt.md @@ -6,7 +6,7 @@ import { UpdateCheckTBT } from "@vercel/sdk/models/updatecheckop.js"; let value: UpdateCheckTBT = { - value: 8817.35, + value: 5013.24, source: "web-vitals", }; ``` diff --git a/docs/models/updatecheckvirtualexperiencescore.md b/docs/models/updatecheckvirtualexperiencescore.md index aaf48920..bd563978 100644 --- a/docs/models/updatecheckvirtualexperiencescore.md +++ b/docs/models/updatecheckvirtualexperiencescore.md @@ -6,7 +6,7 @@ import { UpdateCheckVirtualExperienceScore } from "@vercel/sdk/models/updatecheckop.js"; let value: UpdateCheckVirtualExperienceScore = { - value: 6925.32, + value: 9560.84, source: "web-vitals", }; ``` diff --git a/docs/models/updateedgeconfigresponsebody.md b/docs/models/updateedgeconfigresponsebody.md index 19059195..63f2cdbb 100644 --- a/docs/models/updateedgeconfigresponsebody.md +++ b/docs/models/updateedgeconfigresponsebody.md @@ -8,8 +8,8 @@ An Edge Config import { UpdateEdgeConfigResponseBody } from "@vercel/sdk/models/updateedgeconfigop.js"; let value: UpdateEdgeConfigResponseBody = { - sizeInBytes: 2737.33, - itemCount: 4620.98, + sizeInBytes: 2737.32, + itemCount: 4620.97, }; ``` diff --git a/docs/models/updatefirewallconfigaction1.md b/docs/models/updatefirewallconfigaction1.md index 99c795c2..ae65a72f 100644 --- a/docs/models/updatefirewallconfigaction1.md +++ b/docs/models/updatefirewallconfigaction1.md @@ -5,7 +5,7 @@ ```typescript import { UpdateFirewallConfigAction1 } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigAction1 = "challenge"; +let value: UpdateFirewallConfigAction1 = "rate_limit"; ``` ## Values diff --git a/docs/models/updatefirewallconfigactionsecurity1.md b/docs/models/updatefirewallconfigactionsecurity1.md index 368bb7ce..0daa7c1b 100644 --- a/docs/models/updatefirewallconfigactionsecurity1.md +++ b/docs/models/updatefirewallconfigactionsecurity1.md @@ -5,7 +5,7 @@ ```typescript import { UpdateFirewallConfigActionSecurity1 } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigActionSecurity1 = "log"; +let value: UpdateFirewallConfigActionSecurity1 = "deny"; ``` ## Values diff --git a/docs/models/updatefirewallconfigratelimit1.md b/docs/models/updatefirewallconfigratelimit1.md index a986599a..41c64d48 100644 --- a/docs/models/updatefirewallconfigratelimit1.md +++ b/docs/models/updatefirewallconfigratelimit1.md @@ -7,8 +7,8 @@ import { UpdateFirewallConfigRateLimit1 } from "@vercel/sdk/models/updatefirewal let value: UpdateFirewallConfigRateLimit1 = { algo: "token_bucket", - window: 8971.46, - limit: 3800.35, + window: 7420.1, + limit: 8971.46, keys: [ "", ], diff --git a/docs/models/updatefirewallconfigratelimitaction.md b/docs/models/updatefirewallconfigratelimitaction.md index 0112e529..0a224573 100644 --- a/docs/models/updatefirewallconfigratelimitaction.md +++ b/docs/models/updatefirewallconfigratelimitaction.md @@ -6,7 +6,7 @@ ### `models.UpdateFirewallConfigAction1` ```typescript -const value: models.UpdateFirewallConfigAction1 = "deny"; +const value: models.UpdateFirewallConfigAction1 = "challenge"; ``` ### `any` diff --git a/docs/models/updatefirewallconfigratelimitalgo.md b/docs/models/updatefirewallconfigratelimitalgo.md index 8a7ad262..e74d4a5a 100644 --- a/docs/models/updatefirewallconfigratelimitalgo.md +++ b/docs/models/updatefirewallconfigratelimitalgo.md @@ -5,7 +5,7 @@ ```typescript import { UpdateFirewallConfigRateLimitAlgo } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigRateLimitAlgo = "token_bucket"; +let value: UpdateFirewallConfigRateLimitAlgo = "fixed_window"; ``` ## Values diff --git a/docs/models/updatefirewallconfigratelimitsecurity1.md b/docs/models/updatefirewallconfigratelimitsecurity1.md index 057872d7..90fd54ee 100644 --- a/docs/models/updatefirewallconfigratelimitsecurity1.md +++ b/docs/models/updatefirewallconfigratelimitsecurity1.md @@ -7,8 +7,8 @@ import { UpdateFirewallConfigRateLimitSecurity1 } from "@vercel/sdk/models/updat let value: UpdateFirewallConfigRateLimitSecurity1 = { algo: "token_bucket", - window: 6238.68, - limit: 170.30, + window: 8776.19, + limit: 6238.68, keys: [ "", ], diff --git a/docs/models/updatefirewallconfigratelimitsecurityaction.md b/docs/models/updatefirewallconfigratelimitsecurityaction.md index 0bdcb078..bc5fcf01 100644 --- a/docs/models/updatefirewallconfigratelimitsecurityaction.md +++ b/docs/models/updatefirewallconfigratelimitsecurityaction.md @@ -6,7 +6,7 @@ ### `models.UpdateFirewallConfigActionSecurity1` ```typescript -const value: models.UpdateFirewallConfigActionSecurity1 = "rate_limit"; +const value: models.UpdateFirewallConfigActionSecurity1 = "log"; ``` ### `any` diff --git a/docs/models/updatefirewallconfigrequest.md b/docs/models/updatefirewallconfigrequest.md index f96ce143..bceef966 100644 --- a/docs/models/updatefirewallconfigrequest.md +++ b/docs/models/updatefirewallconfigrequest.md @@ -10,7 +10,7 @@ let value: UpdateFirewallConfigRequest = { teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", requestBody: { - action: "rules.remove", + action: "ip.remove", id: "", }, }; diff --git a/docs/models/updatefirewallconfigrequestbody.md b/docs/models/updatefirewallconfigrequestbody.md index 882b516a..623decee 100644 --- a/docs/models/updatefirewallconfigrequestbody.md +++ b/docs/models/updatefirewallconfigrequestbody.md @@ -25,7 +25,7 @@ const value: models.UpdateFirewallConfigRequestBody2 = { conditions: [ { type: "geo_country", - op: "neq", + op: "gt", }, ], }, @@ -48,8 +48,8 @@ const value: models.UpdateFirewallConfigRequestBody3 = { { conditions: [ { - type: "geo_continent", - op: "gte", + type: "query", + op: "sub", }, ], }, @@ -74,7 +74,7 @@ const value: models.UpdateFirewallConfigRequestBody4 = { const value: models.UpdateFirewallConfigRequestBody5 = { action: "rules.priority", id: "", - value: 2355.67, + value: 8513.24, }; ``` @@ -83,7 +83,7 @@ const value: models.UpdateFirewallConfigRequestBody5 = { ```typescript const value: models.RequestBody6 = { action: "crs.update", - id: "sqli", + id: "lfi", value: { active: false, action: "log", @@ -105,9 +105,9 @@ const value: models.RequestBody7 = { const value: models.RequestBody8 = { action: "ip.insert", value: { - hostname: "well-off-distinction.com", - ip: "66.193.187.171", - action: "deny", + hostname: "pricey-valuable.biz", + ip: "79.66.193.187", + action: "log", }, }; ``` @@ -119,9 +119,9 @@ const value: models.RequestBody9 = { action: "ip.update", id: "", value: { - hostname: "total-vanadyl.name", - ip: "b666:4dca:8e4c:14de:cdfa:ac2f:b3f7:ddb2", - action: "bypass", + hostname: "edible-straw.org", + ip: "eb66:64dc:a8e4:c14d:ecdf:aac2:fb3f:7ddb", + action: "deny", }, }; ``` diff --git a/docs/models/updatefirewallconfigrequestbody2.md b/docs/models/updatefirewallconfigrequestbody2.md index 243e1457..c5cd1288 100644 --- a/docs/models/updatefirewallconfigrequestbody2.md +++ b/docs/models/updatefirewallconfigrequestbody2.md @@ -16,8 +16,8 @@ let value: UpdateFirewallConfigRequestBody2 = { { conditions: [ { - type: "protocol", - op: "sub", + type: "geo_continent", + op: "ninc", }, ], }, diff --git a/docs/models/updatefirewallconfigrequestbody3.md b/docs/models/updatefirewallconfigrequestbody3.md index 1064ad47..1ad3f733 100644 --- a/docs/models/updatefirewallconfigrequestbody3.md +++ b/docs/models/updatefirewallconfigrequestbody3.md @@ -17,8 +17,8 @@ let value: UpdateFirewallConfigRequestBody3 = { { conditions: [ { - type: "scheme", - op: "re", + type: "rate_limit_api_id", + op: "pre", }, ], }, diff --git a/docs/models/updatefirewallconfigrequestbody5.md b/docs/models/updatefirewallconfigrequestbody5.md index a409d223..f7c1d7f2 100644 --- a/docs/models/updatefirewallconfigrequestbody5.md +++ b/docs/models/updatefirewallconfigrequestbody5.md @@ -10,7 +10,7 @@ import { UpdateFirewallConfigRequestBody5 } from "@vercel/sdk/models/updatefirew let value: UpdateFirewallConfigRequestBody5 = { action: "rules.priority", id: "", - value: 8675.81, + value: 3815.22, }; ``` diff --git a/docs/models/updatefirewallconfigrequestbodyconditiongroup.md b/docs/models/updatefirewallconfigrequestbodyconditiongroup.md index 0f84f7be..df90a973 100644 --- a/docs/models/updatefirewallconfigrequestbodyconditiongroup.md +++ b/docs/models/updatefirewallconfigrequestbodyconditiongroup.md @@ -8,8 +8,8 @@ import { UpdateFirewallConfigRequestBodyConditionGroup } from "@vercel/sdk/model let value: UpdateFirewallConfigRequestBodyConditionGroup = { conditions: [ { - type: "path", - op: "gt", + type: "cookie", + op: "eq", }, ], }; diff --git a/docs/models/updatefirewallconfigrequestbodyconditions.md b/docs/models/updatefirewallconfigrequestbodyconditions.md index 71f72e3b..35780530 100644 --- a/docs/models/updatefirewallconfigrequestbodyconditions.md +++ b/docs/models/updatefirewallconfigrequestbodyconditions.md @@ -6,8 +6,8 @@ import { UpdateFirewallConfigRequestBodyConditions } from "@vercel/sdk/models/updatefirewallconfigop.js"; let value: UpdateFirewallConfigRequestBodyConditions = { - type: "ja4_digest", - op: "ex", + type: "region", + op: "lt", }; ``` diff --git a/docs/models/updatefirewallconfigrequestbodymitigate.md b/docs/models/updatefirewallconfigrequestbodymitigate.md index 93db867f..30e0aa65 100644 --- a/docs/models/updatefirewallconfigrequestbodymitigate.md +++ b/docs/models/updatefirewallconfigrequestbodymitigate.md @@ -6,7 +6,7 @@ import { UpdateFirewallConfigRequestBodyMitigate } from "@vercel/sdk/models/updatefirewallconfigop.js"; let value: UpdateFirewallConfigRequestBodyMitigate = { - action: "log", + action: "rate_limit", }; ``` diff --git a/docs/models/updatefirewallconfigrequestbodyop.md b/docs/models/updatefirewallconfigrequestbodyop.md index 14a12830..79c60cd4 100644 --- a/docs/models/updatefirewallconfigrequestbodyop.md +++ b/docs/models/updatefirewallconfigrequestbodyop.md @@ -7,7 +7,7 @@ ```typescript import { UpdateFirewallConfigRequestBodyOp } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigRequestBodyOp = "suf"; +let value: UpdateFirewallConfigRequestBodyOp = "nex"; ``` ## Values diff --git a/docs/models/updatefirewallconfigrequestbodyratelimit.md b/docs/models/updatefirewallconfigrequestbodyratelimit.md index f0bf2ae6..d33bd0d6 100644 --- a/docs/models/updatefirewallconfigrequestbodyratelimit.md +++ b/docs/models/updatefirewallconfigrequestbodyratelimit.md @@ -8,8 +8,8 @@ ```typescript const value: models.UpdateFirewallConfigRateLimitSecurity1 = { algo: "fixed_window", - window: 9787.97, - limit: 6813.30, + window: 3779.76, + limit: 9787.97, keys: [ "", ], diff --git a/docs/models/updatefirewallconfigrequestbodysecurityrequest2value.md b/docs/models/updatefirewallconfigrequestbodysecurityrequest2value.md index 0bbeddcd..580850f1 100644 --- a/docs/models/updatefirewallconfigrequestbodysecurityrequest2value.md +++ b/docs/models/updatefirewallconfigrequestbodysecurityrequest2value.md @@ -20,6 +20,6 @@ const value: string[] = [ ### `number` ```typescript -const value: number = 988.46; +const value: number = 2712.16; ``` diff --git a/docs/models/updatefirewallconfigrequestbodysecurityrequest3value.md b/docs/models/updatefirewallconfigrequestbodysecurityrequest3value.md index efb2724d..1f305154 100644 --- a/docs/models/updatefirewallconfigrequestbodysecurityrequest3value.md +++ b/docs/models/updatefirewallconfigrequestbodysecurityrequest3value.md @@ -20,6 +20,6 @@ const value: string[] = [ ### `number` ```typescript -const value: number = 4265.71; +const value: number = 5765.95; ``` diff --git a/docs/models/updatefirewallconfigrequestbodysecurityrequest3valueaction.md b/docs/models/updatefirewallconfigrequestbodysecurityrequest3valueaction.md index f117ed69..b1e8e597 100644 --- a/docs/models/updatefirewallconfigrequestbodysecurityrequest3valueaction.md +++ b/docs/models/updatefirewallconfigrequestbodysecurityrequest3valueaction.md @@ -5,7 +5,8 @@ ```typescript import { UpdateFirewallConfigRequestBodySecurityRequest3ValueAction } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigRequestBodySecurityRequest3ValueAction = "deny"; +let value: UpdateFirewallConfigRequestBodySecurityRequest3ValueAction = + "rate_limit"; ``` ## Values diff --git a/docs/models/updatefirewallconfigrequestbodysecurityrequest8valueaction.md b/docs/models/updatefirewallconfigrequestbodysecurityrequest8valueaction.md index a2befe5c..010b7b12 100644 --- a/docs/models/updatefirewallconfigrequestbodysecurityrequest8valueaction.md +++ b/docs/models/updatefirewallconfigrequestbodysecurityrequest8valueaction.md @@ -5,8 +5,7 @@ ```typescript import { UpdateFirewallConfigRequestBodySecurityRequest8ValueAction } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigRequestBodySecurityRequest8ValueAction = - "bypass"; +let value: UpdateFirewallConfigRequestBodySecurityRequest8ValueAction = "log"; ``` ## Values diff --git a/docs/models/updatefirewallconfigrequestbodysecurityrequest9value.md b/docs/models/updatefirewallconfigrequestbodysecurityrequest9value.md index 700309c3..8be11f7f 100644 --- a/docs/models/updatefirewallconfigrequestbodysecurityrequest9value.md +++ b/docs/models/updatefirewallconfigrequestbodysecurityrequest9value.md @@ -6,9 +6,9 @@ import { UpdateFirewallConfigRequestBodySecurityRequest9Value } from "@vercel/sdk/models/updatefirewallconfigop.js"; let value: UpdateFirewallConfigRequestBodySecurityRequest9Value = { - hostname: "close-dependency.com", - ip: "97.242.67.120", - action: "bypass", + hostname: "legal-cardboard.biz", + ip: "92.97.242.67", + action: "challenge", }; ``` diff --git a/docs/models/updatefirewallconfigrequestbodysecurityrequest9valueaction.md b/docs/models/updatefirewallconfigrequestbodysecurityrequest9valueaction.md index d9e9c276..2950a28b 100644 --- a/docs/models/updatefirewallconfigrequestbodysecurityrequest9valueaction.md +++ b/docs/models/updatefirewallconfigrequestbodysecurityrequest9valueaction.md @@ -5,8 +5,7 @@ ```typescript import { UpdateFirewallConfigRequestBodySecurityRequest9ValueAction } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigRequestBodySecurityRequest9ValueAction = - "challenge"; +let value: UpdateFirewallConfigRequestBodySecurityRequest9ValueAction = "deny"; ``` ## Values diff --git a/docs/models/updatefirewallconfigrequestbodysecurityrequestvalue.md b/docs/models/updatefirewallconfigrequestbodysecurityrequestvalue.md index 93e65fa1..0b612c8e 100644 --- a/docs/models/updatefirewallconfigrequestbodysecurityrequestvalue.md +++ b/docs/models/updatefirewallconfigrequestbodysecurityrequestvalue.md @@ -6,8 +6,8 @@ import { UpdateFirewallConfigRequestBodySecurityRequestValue } from "@vercel/sdk/models/updatefirewallconfigop.js"; let value: UpdateFirewallConfigRequestBodySecurityRequestValue = { - hostname: "sweet-alligator.name", - ip: "f0b4:1cab:0805:4476:f7d3:a1a0:be0e:b7d6", + hostname: "unfortunate-sonar.com", + ip: "df0b:41ca:b080:5447:6f7d:3a1a:0be0:eb7d", action: "challenge", }; ``` diff --git a/docs/models/updatefirewallconfigrequestbodysecuritytype.md b/docs/models/updatefirewallconfigrequestbodysecuritytype.md index c24e1c06..87634d0a 100644 --- a/docs/models/updatefirewallconfigrequestbodysecuritytype.md +++ b/docs/models/updatefirewallconfigrequestbodysecuritytype.md @@ -7,7 +7,7 @@ ```typescript import { UpdateFirewallConfigRequestBodySecurityType } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigRequestBodySecurityType = "target_path"; +let value: UpdateFirewallConfigRequestBodySecurityType = "ja4_digest"; ``` ## Values diff --git a/docs/models/updatefirewallconfigrequestbodysecurityvalue.md b/docs/models/updatefirewallconfigrequestbodysecurityvalue.md index 6707f91b..25ecc063 100644 --- a/docs/models/updatefirewallconfigrequestbodysecurityvalue.md +++ b/docs/models/updatefirewallconfigrequestbodysecurityvalue.md @@ -7,7 +7,7 @@ import { UpdateFirewallConfigRequestBodySecurityValue } from "@vercel/sdk/models let value: UpdateFirewallConfigRequestBodySecurityValue = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/models/updatefirewallconfigrequestbodytype.md b/docs/models/updatefirewallconfigrequestbodytype.md index 3cf3420e..c8ae8047 100644 --- a/docs/models/updatefirewallconfigrequestbodytype.md +++ b/docs/models/updatefirewallconfigrequestbodytype.md @@ -7,7 +7,7 @@ ```typescript import { UpdateFirewallConfigRequestBodyType } from "@vercel/sdk/models/updatefirewallconfigop.js"; -let value: UpdateFirewallConfigRequestBodyType = "user_agent"; +let value: UpdateFirewallConfigRequestBodyType = "host"; ``` ## Values diff --git a/docs/models/updatefirewallconfigrequestbodyvalue.md b/docs/models/updatefirewallconfigrequestbodyvalue.md index 5e68de0d..bb46927a 100644 --- a/docs/models/updatefirewallconfigrequestbodyvalue.md +++ b/docs/models/updatefirewallconfigrequestbodyvalue.md @@ -12,8 +12,8 @@ let value: UpdateFirewallConfigRequestBodyValue = { { conditions: [ { - type: "protocol", - op: "lte", + type: "header", + op: "ninc", }, ], }, diff --git a/docs/models/updateprojectaction.md b/docs/models/updateprojectaction.md index 00375f4c..aacfeed1 100644 --- a/docs/models/updateprojectaction.md +++ b/docs/models/updateprojectaction.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectAction } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectAction = "redirect"; +let value: UpdateProjectAction = "challenge"; ``` ## Values diff --git a/docs/models/updateprojectaliasassigned.md b/docs/models/updateprojectaliasassigned.md index fe2d9cef..8bca9ad9 100644 --- a/docs/models/updateprojectaliasassigned.md +++ b/docs/models/updateprojectaliasassigned.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 2153.98; +const value: number = 8028.94; ``` ### `boolean` diff --git a/docs/models/updateprojectanalytics.md b/docs/models/updateprojectanalytics.md index 2b2a51a5..75cc0f28 100644 --- a/docs/models/updateprojectanalytics.md +++ b/docs/models/updateprojectanalytics.md @@ -7,8 +7,8 @@ import { UpdateProjectAnalytics } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectAnalytics = { id: "", - disabledAt: 1830.33, - enabledAt: 4030.26, + disabledAt: 7452.33, + enabledAt: 5269.07, }; ``` diff --git a/docs/models/updateprojectbranchmatcher.md b/docs/models/updateprojectbranchmatcher.md index 9ebff22f..ec5002b7 100644 --- a/docs/models/updateprojectbranchmatcher.md +++ b/docs/models/updateprojectbranchmatcher.md @@ -6,7 +6,7 @@ import { UpdateProjectBranchMatcher } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectBranchMatcher = { - type: "equals", + type: "startsWith", pattern: "", }; ``` diff --git a/docs/models/updateprojectchecksstate.md b/docs/models/updateprojectchecksstate.md index 7fc4b634..507e0c3c 100644 --- a/docs/models/updateprojectchecksstate.md +++ b/docs/models/updateprojectchecksstate.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectChecksState } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectChecksState = "running"; +let value: UpdateProjectChecksState = "completed"; ``` ## Values diff --git a/docs/models/updateprojectcreator.md b/docs/models/updateprojectcreator.md index 071b3d2f..62ee8afa 100644 --- a/docs/models/updateprojectcreator.md +++ b/docs/models/updateprojectcreator.md @@ -6,9 +6,9 @@ import { UpdateProjectCreator } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectCreator = { - email: "Monroe.Schulist91@gmail.com", + email: "Randi29@yahoo.com", uid: "", - username: "Elda10", + username: "Hazle47", }; ``` diff --git a/docs/models/updateprojectcrons.md b/docs/models/updateprojectcrons.md index 67f8ec4b..56b4fb4e 100644 --- a/docs/models/updateprojectcrons.md +++ b/docs/models/updateprojectcrons.md @@ -6,9 +6,9 @@ import { UpdateProjectCrons } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectCrons = { - enabledAt: 7452.33, - disabledAt: 5269.07, - updatedAt: 4876.76, + enabledAt: 4876.76, + disabledAt: 5.45, + updatedAt: 4254.02, deploymentId: "", definitions: [ { diff --git a/docs/models/updateprojectdatacacheaction.md b/docs/models/updateprojectdatacacheaction.md index 76bbdc3a..69a8f00f 100644 --- a/docs/models/updateprojectdatacacheaction.md +++ b/docs/models/updateprojectdatacacheaction.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheAction } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheAction = "bypass"; +let value: UpdateProjectDataCacheAction = "redirect"; ``` ## Values diff --git a/docs/models/updateprojectdatacachealiasassigned.md b/docs/models/updateprojectdatacachealiasassigned.md index 5a3551a3..46f74464 100644 --- a/docs/models/updateprojectdatacachealiasassigned.md +++ b/docs/models/updateprojectdatacachealiasassigned.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 8726.51; +const value: number = 9527.92; ``` ### `boolean` diff --git a/docs/models/updateprojectdatacachebranchmatcher.md b/docs/models/updateprojectdatacachebranchmatcher.md index bb0ebefa..6dc6c76c 100644 --- a/docs/models/updateprojectdatacachebranchmatcher.md +++ b/docs/models/updateprojectdatacachebranchmatcher.md @@ -6,7 +6,7 @@ import { UpdateProjectDataCacheBranchMatcher } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: UpdateProjectDataCacheBranchMatcher = { - type: "equals", + type: "endsWith", pattern: "", }; ``` diff --git a/docs/models/updateprojectdatacachechecksconclusion.md b/docs/models/updateprojectdatacachechecksconclusion.md index 6e61e3f5..129c70f1 100644 --- a/docs/models/updateprojectdatacachechecksconclusion.md +++ b/docs/models/updateprojectdatacachechecksconclusion.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheChecksConclusion } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheChecksConclusion = "succeeded"; +let value: UpdateProjectDataCacheChecksConclusion = "canceled"; ``` ## Values diff --git a/docs/models/updateprojectdatacachecreator.md b/docs/models/updateprojectdatacachecreator.md index 32f9dedc..b0844f38 100644 --- a/docs/models/updateprojectdatacachecreator.md +++ b/docs/models/updateprojectdatacachecreator.md @@ -6,9 +6,9 @@ import { UpdateProjectDataCacheCreator } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: UpdateProjectDataCacheCreator = { - email: "Cruz.Renner@hotmail.com", + email: "Creola.Balistreri@gmail.com", uid: "", - username: "Alden.Kassulke46", + username: "Jamaal_McGlynn", }; ``` diff --git a/docs/models/updateprojectdatacacheframework.md b/docs/models/updateprojectdatacacheframework.md index 9bf953e2..a48507ad 100644 --- a/docs/models/updateprojectdatacacheframework.md +++ b/docs/models/updateprojectdatacacheframework.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheFramework } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheFramework = "nuxtjs"; +let value: UpdateProjectDataCacheFramework = "ionic-angular"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheissuermode.md b/docs/models/updateprojectdatacacheissuermode.md index e4012ba5..c9490f51 100644 --- a/docs/models/updateprojectdatacacheissuermode.md +++ b/docs/models/updateprojectdatacacheissuermode.md @@ -7,7 +7,7 @@ ```typescript import { UpdateProjectDataCacheIssuerMode } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheIssuerMode = "team"; +let value: UpdateProjectDataCacheIssuerMode = "global"; ``` ## Values diff --git a/docs/models/updateprojectdatacachelinkdeployhooks.md b/docs/models/updateprojectdatacachelinkdeployhooks.md index 3f094541..6591a4e5 100644 --- a/docs/models/updateprojectdatacachelinkdeployhooks.md +++ b/docs/models/updateprojectdatacachelinkdeployhooks.md @@ -9,7 +9,7 @@ let value: UpdateProjectDataCacheLinkDeployHooks = { id: "", name: "", ref: "", - url: "https://poor-minority.biz/", + url: "https://pleased-lox.name", }; ``` diff --git a/docs/models/updateprojectdatacachemitigate.md b/docs/models/updateprojectdatacachemitigate.md index 6f250052..f8321167 100644 --- a/docs/models/updateprojectdatacachemitigate.md +++ b/docs/models/updateprojectdatacachemitigate.md @@ -6,7 +6,7 @@ import { UpdateProjectDataCacheMitigate } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: UpdateProjectDataCacheMitigate = { - action: "log", + action: "deny", ruleId: "", }; ``` diff --git a/docs/models/updateprojectdatacachenodeversion.md b/docs/models/updateprojectdatacachenodeversion.md index db2f1616..272d669f 100644 --- a/docs/models/updateprojectdatacachenodeversion.md +++ b/docs/models/updateprojectdatacachenodeversion.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheNodeVersion } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheNodeVersion = "16.x"; +let value: UpdateProjectDataCacheNodeVersion = "10.x"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheplan.md b/docs/models/updateprojectdatacacheplan.md index 100279b2..4d9b3517 100644 --- a/docs/models/updateprojectdatacacheplan.md +++ b/docs/models/updateprojectdatacacheplan.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCachePlan } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCachePlan = "enterprise"; +let value: UpdateProjectDataCachePlan = "pro"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheprojectsbranchmatcher.md b/docs/models/updateprojectdatacacheprojectsbranchmatcher.md new file mode 100644 index 00000000..8be7c950 --- /dev/null +++ b/docs/models/updateprojectdatacacheprojectsbranchmatcher.md @@ -0,0 +1,19 @@ +# UpdateProjectDataCacheProjectsBranchMatcher + +## Example Usage + +```typescript +import { UpdateProjectDataCacheProjectsBranchMatcher } from "@vercel/sdk/models/updateprojectdatacacheop.js"; + +let value: UpdateProjectDataCacheProjectsBranchMatcher = { + type: "equals", + pattern: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `type` | [models.UpdateProjectDataCacheProjectsResponse200ApplicationJSONType](../models/updateprojectdatacacheprojectsresponse200applicationjsontype.md) | :heavy_check_mark: | N/A | +| `pattern` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateprojectdatacacheprojectschecksconclusion.md b/docs/models/updateprojectdatacacheprojectschecksconclusion.md index 4c369388..6ebba907 100644 --- a/docs/models/updateprojectdatacacheprojectschecksconclusion.md +++ b/docs/models/updateprojectdatacacheprojectschecksconclusion.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheProjectsChecksConclusion } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheProjectsChecksConclusion = "failed"; +let value: UpdateProjectDataCacheProjectsChecksConclusion = "skipped"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheprojectschecksstate.md b/docs/models/updateprojectdatacacheprojectschecksstate.md index 050c749b..449cda75 100644 --- a/docs/models/updateprojectdatacacheprojectschecksstate.md +++ b/docs/models/updateprojectdatacacheprojectschecksstate.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheProjectsChecksState } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheProjectsChecksState = "completed"; +let value: UpdateProjectDataCacheProjectsChecksState = "registered"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheprojectscreator.md b/docs/models/updateprojectdatacacheprojectscreator.md index 1c6bb17d..2bc95d61 100644 --- a/docs/models/updateprojectdatacacheprojectscreator.md +++ b/docs/models/updateprojectdatacacheprojectscreator.md @@ -6,9 +6,9 @@ import { UpdateProjectDataCacheProjectsCreator } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: UpdateProjectDataCacheProjectsCreator = { - email: "Mckenna_VonRueden99@hotmail.com", + email: "Michael.Cormier-Stroman61@hotmail.com", uid: "", - username: "Sanford84", + username: "Rosendo6", }; ``` diff --git a/docs/models/updateprojectdatacacheprojectsreadystate.md b/docs/models/updateprojectdatacacheprojectsreadystate.md index 7a24820f..f3d1f2a7 100644 --- a/docs/models/updateprojectdatacacheprojectsreadystate.md +++ b/docs/models/updateprojectdatacacheprojectsreadystate.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheProjectsReadyState } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheProjectsReadyState = "INITIALIZING"; +let value: UpdateProjectDataCacheProjectsReadyState = "READY"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheprojectsreadysubstate.md b/docs/models/updateprojectdatacacheprojectsreadysubstate.md index 9fc194c0..4641f228 100644 --- a/docs/models/updateprojectdatacacheprojectsreadysubstate.md +++ b/docs/models/updateprojectdatacacheprojectsreadysubstate.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheProjectsReadySubstate } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheProjectsReadySubstate = "STAGED"; +let value: UpdateProjectDataCacheProjectsReadySubstate = "PROMOTED"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodysecurityfirewallroutestype.md b/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodysecurityfirewallroutestype.md index 62db5a5d..3713e8b9 100644 --- a/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodysecurityfirewallroutestype.md +++ b/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodysecurityfirewallroutestype.md @@ -9,7 +9,7 @@ import { let value: UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = - "region"; + "path"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodysecuritytype.md b/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodysecuritytype.md index 8cbdea14..75867998 100644 --- a/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodysecuritytype.md +++ b/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodysecuritytype.md @@ -7,7 +7,7 @@ import { UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySec let value: UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = - "environment"; + "region"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodytargetstype.md b/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodytargetstype.md index 24aa5646..ebf572bd 100644 --- a/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodytargetstype.md +++ b/docs/models/updateprojectdatacacheprojectsresponse200applicationjsonresponsebodytargetstype.md @@ -7,7 +7,7 @@ import { UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTar let value: UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType = - "endsWith"; + "equals"; ``` ## Values diff --git a/docs/models/updateprojectdatacachereadystate.md b/docs/models/updateprojectdatacachereadystate.md index 780e2ec8..444e515e 100644 --- a/docs/models/updateprojectdatacachereadystate.md +++ b/docs/models/updateprojectdatacachereadystate.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheReadyState } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheReadyState = "CANCELED"; +let value: UpdateProjectDataCacheReadyState = "READY"; ``` ## Values diff --git a/docs/models/updateprojectdatacacheresourceconfig.md b/docs/models/updateprojectdatacacheresourceconfig.md index cc082c51..4bfe342a 100644 --- a/docs/models/updateprojectdatacacheresourceconfig.md +++ b/docs/models/updateprojectdatacacheresourceconfig.md @@ -12,7 +12,9 @@ let value: UpdateProjectDataCacheResourceConfig = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `functionDefaultRegion` | *string* | :heavy_minus_sign: | N/A | | `functionDefaultTimeout` | *number* | :heavy_minus_sign: | N/A | | `functionDefaultMemoryType` | [models.FunctionDefaultMemoryType](../models/functiondefaultmemorytype.md) | :heavy_minus_sign: | N/A | +| `functionZeroConfigFailover` | *boolean* | :heavy_minus_sign: | N/A | | `allowServerlessConcurrency` | *boolean* | :heavy_minus_sign: | N/A | | `elasticConcurrencyEnabled` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updateprojectdatacacheresponsebody.md b/docs/models/updateprojectdatacacheresponsebody.md index 2307774f..cd0479df 100644 --- a/docs/models/updateprojectdatacacheresponsebody.md +++ b/docs/models/updateprojectdatacacheresponsebody.md @@ -8,9 +8,9 @@ import { UpdateProjectDataCacheResponseBody } from "@vercel/sdk/models/updatepro let value: UpdateProjectDataCacheResponseBody = { accountId: "", crons: { - enabledAt: 3685.85, - disabledAt: 1369.00, - updatedAt: 8221.18, + enabledAt: 5113.19, + disabledAt: 2243.17, + updatedAt: 978.44, deploymentId: "", definitions: [ { @@ -25,44 +25,44 @@ let value: UpdateProjectDataCacheResponseBody = { latestDeployments: [ { id: "", - createdAt: 1898.48, + createdAt: 8621.92, createdIn: "", creator: { - email: "Dana96@yahoo.com", + email: "Victor.Ryan@hotmail.com", uid: "", - username: "Ona.Bode23", + username: "Darion1", }, deploymentHostname: "", name: "", plan: "pro", previewCommentsEnabled: false, private: false, - readyState: "READY", + readyState: "BUILDING", type: "LAMBDAS", - url: "https://somber-cheetah.com/", + url: "https://rectangular-developmental.info/", userId: "", }, ], name: "", - nodeVersion: "22.x", + nodeVersion: "14.x", targets: { "key": { id: "", - createdAt: 6720.48, + createdAt: 8605.52, createdIn: "", creator: { - email: "Helen_Stoltenberg27@gmail.com", + email: "Don.Bednar@hotmail.com", uid: "", - username: "Amya68", + username: "Marjory18", }, deploymentHostname: "", name: "", plan: "pro", previewCommentsEnabled: false, private: false, - readyState: "INITIALIZING", + readyState: "READY", type: "LAMBDAS", - url: "https://spotless-babushka.net/", + url: "https://sour-disposer.info", userId: "", }, }, diff --git a/docs/models/updateprojectdatacachessoprotection.md b/docs/models/updateprojectdatacachessoprotection.md index 4d62101c..4999ce5b 100644 --- a/docs/models/updateprojectdatacachessoprotection.md +++ b/docs/models/updateprojectdatacachessoprotection.md @@ -6,7 +6,7 @@ import { UpdateProjectDataCacheSsoProtection } from "@vercel/sdk/models/updateprojectdatacacheop.js"; let value: UpdateProjectDataCacheSsoProtection = { - deploymentType: "all", + deploymentType: "preview", }; ``` diff --git a/docs/models/updateprojectdatacachetarget1.md b/docs/models/updateprojectdatacachetarget1.md index 0b7c5d3f..fd15bce8 100644 --- a/docs/models/updateprojectdatacachetarget1.md +++ b/docs/models/updateprojectdatacachetarget1.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheTarget1 } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheTarget1 = "production"; +let value: UpdateProjectDataCacheTarget1 = "preview"; ``` ## Values diff --git a/docs/models/updateprojectdatacachetarget2.md b/docs/models/updateprojectdatacachetarget2.md index d4e0c21e..e3741c3d 100644 --- a/docs/models/updateprojectdatacachetarget2.md +++ b/docs/models/updateprojectdatacachetarget2.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheTarget2 } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheTarget2 = "production"; +let value: UpdateProjectDataCacheTarget2 = "preview"; ``` ## Values diff --git a/docs/models/updateprojectdatacachetrustedips.md b/docs/models/updateprojectdatacachetrustedips.md index dae75b2c..ac984516 100644 --- a/docs/models/updateprojectdatacachetrustedips.md +++ b/docs/models/updateprojectdatacachetrustedips.md @@ -7,7 +7,7 @@ ```typescript const value: models.TrustedIps1 = { - deploymentType: "production", + deploymentType: "all", addresses: [ { value: "", @@ -21,7 +21,7 @@ const value: models.TrustedIps1 = { ```typescript const value: models.TrustedIps2 = { - deploymentType: "prod_deployment_urls_and_all_previews", + deploymentType: "preview", }; ``` diff --git a/docs/models/updateprojectdatacachetrustedipsdeploymenttype.md b/docs/models/updateprojectdatacachetrustedipsdeploymenttype.md index 1e64b99e..812ed9c5 100644 --- a/docs/models/updateprojectdatacachetrustedipsdeploymenttype.md +++ b/docs/models/updateprojectdatacachetrustedipsdeploymenttype.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectDataCacheTrustedIpsDeploymentType } from "@vercel/sdk/models/updateprojectdatacacheop.js"; -let value: UpdateProjectDataCacheTrustedIpsDeploymentType = "production"; +let value: UpdateProjectDataCacheTrustedIpsDeploymentType = "preview"; ``` ## Values diff --git a/docs/models/updateprojectdeploymenttype.md b/docs/models/updateprojectdeploymenttype.md index 29471a3e..c2cae97d 100644 --- a/docs/models/updateprojectdeploymenttype.md +++ b/docs/models/updateprojectdeploymenttype.md @@ -7,7 +7,8 @@ Specify if the Vercel Authentication (SSO Protection) will apply to every Deploy ```typescript import { UpdateProjectDeploymentType } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectDeploymentType = "preview"; +let value: UpdateProjectDeploymentType = + "prod_deployment_urls_and_all_previews"; ``` ## Values diff --git a/docs/models/updateprojectdomainverification.md b/docs/models/updateprojectdomainverification.md index ce240330..02d10bb4 100644 --- a/docs/models/updateprojectdomainverification.md +++ b/docs/models/updateprojectdomainverification.md @@ -9,7 +9,7 @@ import { UpdateProjectDomainVerification } from "@vercel/sdk/models/updateprojec let value: UpdateProjectDomainVerification = { type: "", - domain: "wavy-viability.net", + domain: "self-assured-following.biz", value: "", reason: "", }; diff --git a/docs/models/updateprojecterl.md b/docs/models/updateprojecterl.md index 5cb29b53..3943f754 100644 --- a/docs/models/updateprojecterl.md +++ b/docs/models/updateprojecterl.md @@ -6,9 +6,9 @@ import { UpdateProjectErl } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectErl = { - algo: "fixed_window", - window: 9391.61, - limit: 5063.12, + algo: "token_bucket", + window: 9998.09, + limit: 1972.59, keys: [ "", ], diff --git a/docs/models/updateprojectframework.md b/docs/models/updateprojectframework.md index 1b635b10..c1e607bf 100644 --- a/docs/models/updateprojectframework.md +++ b/docs/models/updateprojectframework.md @@ -7,7 +7,7 @@ The framework that is being used for this project. When `null` is used no framew ```typescript import { UpdateProjectFramework } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectFramework = "sanity-v3"; +let value: UpdateProjectFramework = "parcel"; ``` ## Values diff --git a/docs/models/updateprojectfunctiondefaultmemorytype.md b/docs/models/updateprojectfunctiondefaultmemorytype.md index f6fdc545..3670bd9a 100644 --- a/docs/models/updateprojectfunctiondefaultmemorytype.md +++ b/docs/models/updateprojectfunctiondefaultmemorytype.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectFunctionDefaultMemoryType } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectFunctionDefaultMemoryType = "performance"; +let value: UpdateProjectFunctionDefaultMemoryType = "standard"; ``` ## Values diff --git a/docs/models/updateprojecthandle.md b/docs/models/updateprojecthandle.md index b13a0add..5955a844 100644 --- a/docs/models/updateprojecthandle.md +++ b/docs/models/updateprojecthandle.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectHandle } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectHandle = "init"; +let value: UpdateProjectHandle = "finalize"; ``` ## Values diff --git a/docs/models/updateprojecthas.md b/docs/models/updateprojecthas.md index 67aaf348..b50fabb2 100644 --- a/docs/models/updateprojecthas.md +++ b/docs/models/updateprojecthas.md @@ -6,7 +6,7 @@ import { UpdateProjectHas } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectHas = { - type: "header", + type: "scheme", }; ``` diff --git a/docs/models/updateprojectissuermode.md b/docs/models/updateprojectissuermode.md index 2b1f879c..ebefefd3 100644 --- a/docs/models/updateprojectissuermode.md +++ b/docs/models/updateprojectissuermode.md @@ -7,7 +7,7 @@ team: `https://oidc.vercel.com/[team_slug]` global: `https://oidc.vercel.com` ```typescript import { UpdateProjectIssuerMode } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectIssuerMode = "global"; +let value: UpdateProjectIssuerMode = "team"; ``` ## Values diff --git a/docs/models/updateprojectlastaliasrequest.md b/docs/models/updateprojectlastaliasrequest.md index d63f6368..96d9ffeb 100644 --- a/docs/models/updateprojectlastaliasrequest.md +++ b/docs/models/updateprojectlastaliasrequest.md @@ -8,8 +8,8 @@ import { UpdateProjectLastAliasRequest } from "@vercel/sdk/models/updateprojecto let value: UpdateProjectLastAliasRequest = { fromDeploymentId: "", toDeploymentId: "", - jobStatus: "in-progress", - requestedAt: 1623.58, + jobStatus: "failed", + requestedAt: 1797.95, type: "promote", }; ``` diff --git a/docs/models/updateprojectlatestdeployments.md b/docs/models/updateprojectlatestdeployments.md index d990569f..5a1fe2f6 100644 --- a/docs/models/updateprojectlatestdeployments.md +++ b/docs/models/updateprojectlatestdeployments.md @@ -7,21 +7,21 @@ import { UpdateProjectLatestDeployments } from "@vercel/sdk/models/updateproject let value: UpdateProjectLatestDeployments = { id: "", - createdAt: 4097.26, + createdAt: 5156.38, createdIn: "", creator: { - email: "Jordyn69@yahoo.com", + email: "Myriam_Powlowski71@hotmail.com", uid: "", - username: "Mercedes35", + username: "Jayne_Herzog92", }, deploymentHostname: "", name: "", - plan: "hobby", + plan: "enterprise", previewCommentsEnabled: false, private: false, - readyState: "ERROR", + readyState: "QUEUED", type: "LAMBDAS", - url: "https://peppery-veto.com/", + url: "https://crazy-discourse.org", userId: "", }; ``` diff --git a/docs/models/updateprojectlink.md b/docs/models/updateprojectlink.md index c3a18e3e..0312c96c 100644 --- a/docs/models/updateprojectlink.md +++ b/docs/models/updateprojectlink.md @@ -12,7 +12,7 @@ const value: models.UpdateProjectLink1 = { id: "", name: "", ref: "", - url: "https://key-merit.name/", + url: "https://poor-kiss.org", }, ], }; @@ -27,7 +27,7 @@ const value: models.UpdateProjectLink2 = { id: "", name: "", ref: "", - url: "https://tricky-order.info/", + url: "https://important-heartbeat.net", }, ], }; @@ -42,7 +42,7 @@ const value: models.UpdateProjectLink3 = { id: "", name: "", ref: "", - url: "https://stunning-follower.biz/", + url: "https://each-bakeware.org/", }, ], }; diff --git a/docs/models/updateprojectlink1.md b/docs/models/updateprojectlink1.md index 54766fb2..bb344930 100644 --- a/docs/models/updateprojectlink1.md +++ b/docs/models/updateprojectlink1.md @@ -11,7 +11,7 @@ let value: UpdateProjectLink1 = { id: "", name: "", ref: "", - url: "https://coordinated-subsidy.info", + url: "https://jubilant-jogging.info", }, ], }; diff --git a/docs/models/updateprojectlink2.md b/docs/models/updateprojectlink2.md index 7048ecee..31997ab6 100644 --- a/docs/models/updateprojectlink2.md +++ b/docs/models/updateprojectlink2.md @@ -11,7 +11,7 @@ let value: UpdateProjectLink2 = { id: "", name: "", ref: "", - url: "https://shabby-elevation.name", + url: "https://orderly-saw.net/", }, ], }; diff --git a/docs/models/updateprojectlink3.md b/docs/models/updateprojectlink3.md index 31431dcb..f793120b 100644 --- a/docs/models/updateprojectlink3.md +++ b/docs/models/updateprojectlink3.md @@ -11,7 +11,7 @@ let value: UpdateProjectLink3 = { id: "", name: "", ref: "", - url: "https://mundane-ferret.biz/", + url: "https://giving-hydrolyze.info/", }, ], }; diff --git a/docs/models/updateprojectlinkdeployhooks.md b/docs/models/updateprojectlinkdeployhooks.md index 868b4531..457031ce 100644 --- a/docs/models/updateprojectlinkdeployhooks.md +++ b/docs/models/updateprojectlinkdeployhooks.md @@ -9,7 +9,7 @@ let value: UpdateProjectLinkDeployHooks = { id: "", name: "", ref: "", - url: "https://stale-flu.net", + url: "https://somber-receptor.com/", }; ``` diff --git a/docs/models/updateprojectlinkprojectsdeployhooks.md b/docs/models/updateprojectlinkprojectsdeployhooks.md index 5490fec0..c17d7641 100644 --- a/docs/models/updateprojectlinkprojectsdeployhooks.md +++ b/docs/models/updateprojectlinkprojectsdeployhooks.md @@ -9,7 +9,7 @@ let value: UpdateProjectLinkProjectsDeployHooks = { id: "", name: "", ref: "", - url: "https://irresponsible-formation.org/", + url: "https://unwritten-rawhide.net/", }; ``` diff --git a/docs/models/updateprojectlinkprojectsresponsedeployhooks.md b/docs/models/updateprojectlinkprojectsresponsedeployhooks.md index d5abbbc2..04d52190 100644 --- a/docs/models/updateprojectlinkprojectsresponsedeployhooks.md +++ b/docs/models/updateprojectlinkprojectsresponsedeployhooks.md @@ -9,7 +9,7 @@ let value: UpdateProjectLinkProjectsResponseDeployHooks = { id: "", name: "", ref: "", - url: "https://trusty-junior.org/", + url: "https://unrealistic-convection.name/", }; ``` diff --git a/docs/models/updateprojectmicrofrontends.md b/docs/models/updateprojectmicrofrontends.md index 1668078a..2ebf3570 100644 --- a/docs/models/updateprojectmicrofrontends.md +++ b/docs/models/updateprojectmicrofrontends.md @@ -6,7 +6,7 @@ import { UpdateProjectMicrofrontends } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectMicrofrontends = { - updatedAt: 593.83, + updatedAt: 9185.47, groupIds: [ "", ], diff --git a/docs/models/updateprojectmissing.md b/docs/models/updateprojectmissing.md index 7e4dc36d..ffcde547 100644 --- a/docs/models/updateprojectmissing.md +++ b/docs/models/updateprojectmissing.md @@ -6,7 +6,7 @@ import { UpdateProjectMissing } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectMissing = { - type: "scheme", + type: "region", }; ``` diff --git a/docs/models/updateprojectmitigate.md b/docs/models/updateprojectmitigate.md index c30f8c6e..95a04bbd 100644 --- a/docs/models/updateprojectmitigate.md +++ b/docs/models/updateprojectmitigate.md @@ -6,7 +6,7 @@ import { UpdateProjectMitigate } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectMitigate = { - action: "redirect", + action: "bypass", ruleId: "", }; ``` diff --git a/docs/models/updateprojectnodeversion.md b/docs/models/updateprojectnodeversion.md index c5c5e197..a99d75b6 100644 --- a/docs/models/updateprojectnodeversion.md +++ b/docs/models/updateprojectnodeversion.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectNodeVersion } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectNodeVersion = "18.x"; +let value: UpdateProjectNodeVersion = "12.x"; ``` ## Values diff --git a/docs/models/updateprojectplan.md b/docs/models/updateprojectplan.md index aed3a03f..9523a034 100644 --- a/docs/models/updateprojectplan.md +++ b/docs/models/updateprojectplan.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectPlan } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectPlan = "enterprise"; +let value: UpdateProjectPlan = "hobby"; ``` ## Values diff --git a/docs/models/updateprojectprojectsaliasassigned.md b/docs/models/updateprojectprojectsaliasassigned.md index 927231a8..a74452c0 100644 --- a/docs/models/updateprojectprojectsaliasassigned.md +++ b/docs/models/updateprojectprojectsaliasassigned.md @@ -6,7 +6,7 @@ ### `number` ```typescript -const value: number = 1753.72; +const value: number = 8998.67; ``` ### `boolean` diff --git a/docs/models/updateprojectprojectscreator.md b/docs/models/updateprojectprojectscreator.md index 98e205f4..6e0dca26 100644 --- a/docs/models/updateprojectprojectscreator.md +++ b/docs/models/updateprojectprojectscreator.md @@ -6,9 +6,9 @@ import { UpdateProjectProjectsCreator } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectProjectsCreator = { - email: "Salma.Hills75@gmail.com", + email: "Fredy.Rosenbaum@yahoo.com", uid: "", - username: "Madyson55", + username: "Jazmyne_Luettgen72", }; ``` diff --git a/docs/models/updateprojectprojectsdeploymenttype.md b/docs/models/updateprojectprojectsdeploymenttype.md index 2c4f1af0..f0e05358 100644 --- a/docs/models/updateprojectprojectsdeploymenttype.md +++ b/docs/models/updateprojectprojectsdeploymenttype.md @@ -7,7 +7,7 @@ Specify if the Trusted IPs will apply to every Deployment Target or just Preview ```typescript import { UpdateProjectProjectsDeploymentType } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectProjectsDeploymentType = "preview"; +let value: UpdateProjectProjectsDeploymentType = "all"; ``` ## Values diff --git a/docs/models/updateprojectprojectsframework.md b/docs/models/updateprojectprojectsframework.md index 857ccca2..3b51283e 100644 --- a/docs/models/updateprojectprojectsframework.md +++ b/docs/models/updateprojectprojectsframework.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectProjectsFramework } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectProjectsFramework = "fasthtml"; +let value: UpdateProjectProjectsFramework = "vitepress"; ``` ## Values diff --git a/docs/models/updateprojectprojectsnodeversion.md b/docs/models/updateprojectprojectsnodeversion.md index 6495844e..1aec7a18 100644 --- a/docs/models/updateprojectprojectsnodeversion.md +++ b/docs/models/updateprojectprojectsnodeversion.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectProjectsNodeVersion } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectProjectsNodeVersion = "8.10.x"; +let value: UpdateProjectProjectsNodeVersion = "22.x"; ``` ## Values diff --git a/docs/models/updateprojectprojectsreadystate.md b/docs/models/updateprojectprojectsreadystate.md index 327d2112..2f14fcb5 100644 --- a/docs/models/updateprojectprojectsreadystate.md +++ b/docs/models/updateprojectprojectsreadystate.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectProjectsReadyState } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectProjectsReadyState = "BUILDING"; +let value: UpdateProjectProjectsReadyState = "ERROR"; ``` ## Values diff --git a/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodysecurityfirewallroutestype.md b/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodysecurityfirewallroutestype.md index 2b52e401..d0e186d6 100644 --- a/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodysecurityfirewallroutestype.md +++ b/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodysecurityfirewallroutestype.md @@ -9,7 +9,7 @@ import { let value: UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = - "query"; + "path"; ``` ## Values diff --git a/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodysecuritytype.md b/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodysecuritytype.md index 66e48cea..b756b79a 100644 --- a/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodysecuritytype.md +++ b/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodysecuritytype.md @@ -7,7 +7,7 @@ import { UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType let value: UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = - "header"; + "query"; ``` ## Values diff --git a/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodytype.md b/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodytype.md index c642bce6..ddc3016a 100644 --- a/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodytype.md +++ b/docs/models/updateprojectprojectsresponse200applicationjsonresponsebodytype.md @@ -6,7 +6,7 @@ import { UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType = - "equals"; + "endsWith"; ``` ## Values diff --git a/docs/models/updateprojectprotectionbypass.md b/docs/models/updateprojectprotectionbypass.md index 4bdebe72..f4fbba33 100644 --- a/docs/models/updateprojectprotectionbypass.md +++ b/docs/models/updateprojectprotectionbypass.md @@ -6,7 +6,7 @@ import { UpdateProjectProtectionBypass } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectProtectionBypass = { - createdAt: 1797.95, + createdAt: 4800.61, createdBy: "", scope: "automation-bypass", }; diff --git a/docs/models/updateprojectprotectionbypassprotectionbypass.md b/docs/models/updateprojectprotectionbypassprotectionbypass.md index 9e6db432..73b53f81 100644 --- a/docs/models/updateprojectprotectionbypassprotectionbypass.md +++ b/docs/models/updateprojectprotectionbypassprotectionbypass.md @@ -6,7 +6,7 @@ import { UpdateProjectProtectionBypassProtectionBypass } from "@vercel/sdk/models/updateprojectprotectionbypassop.js"; let value: UpdateProjectProtectionBypassProtectionBypass = { - createdAt: 5525.81, + createdAt: 9623.96, createdBy: "", scope: "automation-bypass", }; diff --git a/docs/models/updateprojectreadystate.md b/docs/models/updateprojectreadystate.md index 1b4baa4a..d5e86042 100644 --- a/docs/models/updateprojectreadystate.md +++ b/docs/models/updateprojectreadystate.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectReadyState } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectReadyState = "CANCELED"; +let value: UpdateProjectReadyState = "INITIALIZING"; ``` ## Values diff --git a/docs/models/updateprojectreadysubstate.md b/docs/models/updateprojectreadysubstate.md index 85d976ce..1058060d 100644 --- a/docs/models/updateprojectreadysubstate.md +++ b/docs/models/updateprojectreadysubstate.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectReadySubstate } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectReadySubstate = "PROMOTED"; +let value: UpdateProjectReadySubstate = "STAGED"; ``` ## Values diff --git a/docs/models/updateprojectresourceconfig.md b/docs/models/updateprojectresourceconfig.md index 35f61c44..81be71d3 100644 --- a/docs/models/updateprojectresourceconfig.md +++ b/docs/models/updateprojectresourceconfig.md @@ -12,7 +12,9 @@ let value: UpdateProjectResourceConfig = {}; | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `functionDefaultRegion` | *string* | :heavy_minus_sign: | N/A | | `functionDefaultTimeout` | *number* | :heavy_minus_sign: | N/A | | `functionDefaultMemoryType` | [models.UpdateProjectFunctionDefaultMemoryType](../models/updateprojectfunctiondefaultmemorytype.md) | :heavy_minus_sign: | N/A | +| `functionZeroConfigFailover` | *boolean* | :heavy_minus_sign: | N/A | | `allowServerlessConcurrency` | *boolean* | :heavy_minus_sign: | N/A | | `elasticConcurrencyEnabled` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updateprojectresponsebody.md b/docs/models/updateprojectresponsebody.md index 39f891ce..e623a9fd 100644 --- a/docs/models/updateprojectresponsebody.md +++ b/docs/models/updateprojectresponsebody.md @@ -10,9 +10,9 @@ import { UpdateProjectResponseBody } from "@vercel/sdk/models/updateprojectop.js let value: UpdateProjectResponseBody = { accountId: "", crons: { - enabledAt: 2902.48, - disabledAt: 3041.74, - updatedAt: 5910.65, + enabledAt: 5910.65, + disabledAt: 9217.19, + updatedAt: 8052.64, deploymentId: "", definitions: [ { @@ -27,44 +27,44 @@ let value: UpdateProjectResponseBody = { latestDeployments: [ { id: "", - createdAt: 9217.19, + createdAt: 7239.42, createdIn: "", creator: { - email: "Mittie87@hotmail.com", + email: "Theodore21@yahoo.com", uid: "", - username: "Cristal.Anderson", + username: "Adolfo_Fay73", }, deploymentHostname: "", name: "", - plan: "hobby", + plan: "enterprise", previewCommentsEnabled: false, private: false, - readyState: "BUILDING", + readyState: "CANCELED", type: "LAMBDAS", - url: "https://warmhearted-deed.net", + url: "https://remarkable-mozzarella.com/", userId: "", }, ], name: "", - nodeVersion: "14.x", + nodeVersion: "16.x", targets: { "key": { id: "", - createdAt: 100.64, + createdAt: 7087.71, createdIn: "", creator: { - email: "Melody_Thompson3@yahoo.com", + email: "Shane.Bartell@gmail.com", uid: "", - username: "Vella.Breitenberg45", + username: "Benton.Koch", }, deploymentHostname: "", name: "", - plan: "enterprise", + plan: "pro", previewCommentsEnabled: false, private: false, - readyState: "INITIALIZING", + readyState: "QUEUED", type: "LAMBDAS", - url: "https://oval-resource.biz/", + url: "https://esteemed-oil.name", userId: "", }, }, diff --git a/docs/models/updateprojectssoprotection.md b/docs/models/updateprojectssoprotection.md index f68f83da..cddef618 100644 --- a/docs/models/updateprojectssoprotection.md +++ b/docs/models/updateprojectssoprotection.md @@ -6,7 +6,7 @@ import { UpdateProjectSsoProtection } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectSsoProtection = { - deploymentType: "all", + deploymentType: "preview", }; ``` diff --git a/docs/models/updateprojecttarget.md b/docs/models/updateprojecttarget.md index 259de5ad..c5ea7919 100644 --- a/docs/models/updateprojecttarget.md +++ b/docs/models/updateprojecttarget.md @@ -14,6 +14,6 @@ const value: string[] = [ ### `models.UpdateProjectTarget2` ```typescript -const value: models.UpdateProjectTarget2 = "preview"; +const value: models.UpdateProjectTarget2 = "production"; ``` diff --git a/docs/models/updateprojecttargets.md b/docs/models/updateprojecttargets.md index 025eadcb..f603275c 100644 --- a/docs/models/updateprojecttargets.md +++ b/docs/models/updateprojecttargets.md @@ -7,21 +7,21 @@ import { UpdateProjectTargets } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectTargets = { id: "", - createdAt: 2168.70, + createdAt: 429.24, createdIn: "", creator: { - email: "Ally.Bradtke82@hotmail.com", + email: "Bailee.Schuppe15@gmail.com", uid: "", - username: "Camille.Schulist22", + username: "Raquel.Farrell", }, deploymentHostname: "", name: "", - plan: "hobby", + plan: "pro", previewCommentsEnabled: false, private: false, - readyState: "INITIALIZING", + readyState: "READY", type: "LAMBDAS", - url: "https://secret-fisherman.net/", + url: "https://shabby-singing.biz/", userId: "", }; ``` diff --git a/docs/models/updateprojecttier.md b/docs/models/updateprojecttier.md index 8d33d315..4ad0fceb 100644 --- a/docs/models/updateprojecttier.md +++ b/docs/models/updateprojecttier.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectTier } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectTier = "advanced"; +let value: UpdateProjectTier = "standard"; ``` ## Values diff --git a/docs/models/updateprojecttrustedips.md b/docs/models/updateprojecttrustedips.md index 54bb7755..c8b6abe0 100644 --- a/docs/models/updateprojecttrustedips.md +++ b/docs/models/updateprojecttrustedips.md @@ -7,7 +7,7 @@ ```typescript const value: models.UpdateProjectTrustedIps1 = { - deploymentType: "all", + deploymentType: "preview", addresses: [ { value: "", diff --git a/docs/models/updateprojecttrustedips1.md b/docs/models/updateprojecttrustedips1.md index 7ff0ddf0..3bfa8ac3 100644 --- a/docs/models/updateprojecttrustedips1.md +++ b/docs/models/updateprojecttrustedips1.md @@ -6,7 +6,7 @@ import { UpdateProjectTrustedIps1 } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectTrustedIps1 = { - deploymentType: "prod_deployment_urls_and_all_previews", + deploymentType: "all", addresses: [ { value: "", diff --git a/docs/models/updateprojecttrustedips2.md b/docs/models/updateprojecttrustedips2.md index 47c10d3d..3892b386 100644 --- a/docs/models/updateprojecttrustedips2.md +++ b/docs/models/updateprojecttrustedips2.md @@ -6,7 +6,7 @@ import { UpdateProjectTrustedIps2 } from "@vercel/sdk/models/updateprojectop.js"; let value: UpdateProjectTrustedIps2 = { - deploymentType: "preview", + deploymentType: "prod_deployment_urls_and_all_previews", }; ``` diff --git a/docs/models/updateprojecttrustedipsdeploymenttype.md b/docs/models/updateprojecttrustedipsdeploymenttype.md index 43666373..ca099793 100644 --- a/docs/models/updateprojecttrustedipsdeploymenttype.md +++ b/docs/models/updateprojecttrustedipsdeploymenttype.md @@ -5,7 +5,8 @@ ```typescript import { UpdateProjectTrustedIpsDeploymentType } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectTrustedIpsDeploymentType = "all"; +let value: UpdateProjectTrustedIpsDeploymentType = + "prod_deployment_urls_and_all_previews"; ``` ## Values diff --git a/docs/models/updateprojecttrustedipsprojectsdeploymenttype.md b/docs/models/updateprojecttrustedipsprojectsdeploymenttype.md index 42147ff2..1873a848 100644 --- a/docs/models/updateprojecttrustedipsprojectsdeploymenttype.md +++ b/docs/models/updateprojecttrustedipsprojectsdeploymenttype.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectTrustedIpsProjectsDeploymentType } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectTrustedIpsProjectsDeploymentType = "preview"; +let value: UpdateProjectTrustedIpsProjectsDeploymentType = "all"; ``` ## Values diff --git a/docs/models/updateprojecttrustedipsprotectionmode.md b/docs/models/updateprojecttrustedipsprotectionmode.md index b063ad85..974835b2 100644 --- a/docs/models/updateprojecttrustedipsprotectionmode.md +++ b/docs/models/updateprojecttrustedipsprotectionmode.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectTrustedIpsProtectionMode } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectTrustedIpsProtectionMode = "exclusive"; +let value: UpdateProjectTrustedIpsProtectionMode = "additional"; ``` ## Values diff --git a/docs/models/updateprojecttype.md b/docs/models/updateprojecttype.md index d007bf04..d9c9ffe3 100644 --- a/docs/models/updateprojecttype.md +++ b/docs/models/updateprojecttype.md @@ -5,7 +5,7 @@ ```typescript import { UpdateProjectType } from "@vercel/sdk/models/updateprojectop.js"; -let value: UpdateProjectType = "system"; +let value: UpdateProjectType = "secret"; ``` ## Values diff --git a/docs/models/updateresourcesecretsbyidrequest.md b/docs/models/updateresourcesecretsbyidrequest.md new file mode 100644 index 00000000..b3f88660 --- /dev/null +++ b/docs/models/updateresourcesecretsbyidrequest.md @@ -0,0 +1,20 @@ +# UpdateResourceSecretsByIdRequest + +## Example Usage + +```typescript +import { UpdateResourceSecretsByIdRequest } from "@vercel/sdk/models/updateresourcesecretsbyidop.js"; + +let value: UpdateResourceSecretsByIdRequest = { + integrationConfigurationId: "", + resourceId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `integrationConfigurationId` | *string* | :heavy_check_mark: | N/A | +| `resourceId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [models.UpdateResourceSecretsByIdRequestBody](../models/updateresourcesecretsbyidrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updateresourcesecretsbyidrequestbody.md b/docs/models/updateresourcesecretsbyidrequestbody.md new file mode 100644 index 00000000..e9c982a3 --- /dev/null +++ b/docs/models/updateresourcesecretsbyidrequestbody.md @@ -0,0 +1,22 @@ +# UpdateResourceSecretsByIdRequestBody + +## Example Usage + +```typescript +import { UpdateResourceSecretsByIdRequestBody } from "@vercel/sdk/models/updateresourcesecretsbyidop.js"; + +let value: UpdateResourceSecretsByIdRequestBody = { + secrets: [ + { + name: "", + value: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `secrets` | [models.UpdateResourceSecretsByIdSecrets](../models/updateresourcesecretsbyidsecrets.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateresourcesecretsbyidsecrets.md b/docs/models/updateresourcesecretsbyidsecrets.md new file mode 100644 index 00000000..e19c6b90 --- /dev/null +++ b/docs/models/updateresourcesecretsbyidsecrets.md @@ -0,0 +1,20 @@ +# UpdateResourceSecretsByIdSecrets + +## Example Usage + +```typescript +import { UpdateResourceSecretsByIdSecrets } from "@vercel/sdk/models/updateresourcesecretsbyidop.js"; + +let value: UpdateResourceSecretsByIdSecrets = { + name: "", + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `value` | *string* | :heavy_check_mark: | N/A | +| `prefix` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/uploadcertresponsebody.md b/docs/models/uploadcertresponsebody.md index d91f0123..e8c5e1df 100644 --- a/docs/models/uploadcertresponsebody.md +++ b/docs/models/uploadcertresponsebody.md @@ -7,8 +7,8 @@ import { UploadCertResponseBody } from "@vercel/sdk/models/uploadcertop.js"; let value: UploadCertResponseBody = { id: "", - createdAt: 3677.13, - expiresAt: 2975.85, + createdAt: 3461.64, + expiresAt: 2935.12, autoRenew: false, cns: [ "", diff --git a/docs/models/verification.md b/docs/models/verification.md index b2c41f0c..25af7fac 100644 --- a/docs/models/verification.md +++ b/docs/models/verification.md @@ -9,7 +9,7 @@ import { Verification } from "@vercel/sdk/models/getprojectdomainop.js"; let value: Verification = { type: "", - domain: "common-instructor.com", + domain: "black-typewriter.org", value: "", reason: "", }; diff --git a/docs/models/verified.md b/docs/models/verified.md index 768f7aac..a31bd479 100644 --- a/docs/models/verified.md +++ b/docs/models/verified.md @@ -7,7 +7,7 @@ Filters domains based on their verification status. ```typescript import { Verified } from "@vercel/sdk/models/getprojectdomainsop.js"; -let value: Verified = "false"; +let value: Verified = "true"; ``` ## Values diff --git a/docs/models/version.md b/docs/models/version.md index 359a479f..b999a62f 100644 --- a/docs/models/version.md +++ b/docs/models/version.md @@ -1,6 +1,6 @@ # Version -The user's version. Will either be unset or `northstar`. +The user's version. Will always be `northstar`. ## Example Usage diff --git a/docs/models/xss.md b/docs/models/xss.md index baee7f7f..28028da1 100644 --- a/docs/models/xss.md +++ b/docs/models/xss.md @@ -9,7 +9,7 @@ import { Xss } from "@vercel/sdk/models/putfirewallconfigop.js"; let value: Xss = { active: false, - action: "deny", + action: "log", }; ``` diff --git a/docs/sdks/accessgroups/README.md b/docs/sdks/accessgroups/README.md index e182576e..7eea9559 100644 --- a/docs/sdks/accessgroups/README.md +++ b/docs/sdks/accessgroups/README.md @@ -121,10 +121,7 @@ async function run() { requestBody: { name: "My access group", projects: [ - { - projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", - role: "ADMIN", - }, + ], }, }); @@ -158,10 +155,7 @@ async function run() { requestBody: { name: "My access group", projects: [ - { - projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", - role: "ADMIN", - }, + ], }, }); @@ -478,10 +472,7 @@ async function run() { requestBody: { name: "My access group", projects: [ - { - projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", - role: "ADMIN", - }, + ], }, }); @@ -514,10 +505,7 @@ async function run() { requestBody: { name: "My access group", projects: [ - { - projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", - role: "ADMIN", - }, + ], }, }); diff --git a/docs/sdks/edgeconfig/README.md b/docs/sdks/edgeconfig/README.md index 3288d72a..e6a42e7b 100644 --- a/docs/sdks/edgeconfig/README.md +++ b/docs/sdks/edgeconfig/README.md @@ -965,7 +965,7 @@ async function run() { slug: "my-team-url-slug", requestBody: { tokens: [ - "", + ], }, }); @@ -997,7 +997,7 @@ async function run() { slug: "my-team-url-slug", requestBody: { tokens: [ - "", + ], }, }); diff --git a/docs/sdks/environment/README.md b/docs/sdks/environment/README.md new file mode 100644 index 00000000..89897c2e --- /dev/null +++ b/docs/sdks/environment/README.md @@ -0,0 +1,429 @@ +# Environment +(*environment*) + +## Overview + +### Available Operations + +* [postV1ProjectsIdOrNameCustomEnvironments](#postv1projectsidornamecustomenvironments) - Create a custom environment for the current project. +* [getV9ProjectsIdOrNameCustomEnvironments](#getv9projectsidornamecustomenvironments) - Retrieve custom environments +* [getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId](#getv9projectsidornamecustomenvironmentsenvironmentslugorid) - Retrieve a custom environment +* [patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId](#patchv9projectsidornamecustomenvironmentsenvironmentslugorid) - Update a custom environment +* [deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId](#deletev9projectsidornamecustomenvironmentsenvironmentslugorid) - Remove a custom environment + +## postV1ProjectsIdOrNameCustomEnvironments + +Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'. + +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + const result = await vercel.environment.postV1ProjectsIdOrNameCustomEnvironments({ + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { environmentPostV1ProjectsIdOrNameCustomEnvironments } from "@vercel/sdk/funcs/environmentPostV1ProjectsIdOrNameCustomEnvironments.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await environmentPostV1ProjectsIdOrNameCustomEnvironments(vercel, { + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.PostV1ProjectsIdOrNameCustomEnvironmentsRequest](../../models/postv1projectsidornamecustomenvironmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody](../../models/postv1projectsidornamecustomenvironmentsresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## getV9ProjectsIdOrNameCustomEnvironments + +Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'. + +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + const result = await vercel.environment.getV9ProjectsIdOrNameCustomEnvironments({ + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { environmentGetV9ProjectsIdOrNameCustomEnvironments } from "@vercel/sdk/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironments.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await environmentGetV9ProjectsIdOrNameCustomEnvironments(vercel, { + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.GetV9ProjectsIdOrNameCustomEnvironmentsRequest](../../models/getv9projectsidornamecustomenvironmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody](../../models/getv9projectsidornamecustomenvironmentsresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId + +Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'. + +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + const result = await vercel.environment.getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({ + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "@vercel/sdk/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId(vercel, { + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest](../../models/getv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody](../../models/getv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.VercelNotFoundError | 404 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId + +Update a custom environment for the project. Must not be named 'Production' or 'Preview'. + +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + const result = await vercel.environment.patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({ + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "@vercel/sdk/funcs/environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId(vercel, { + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest](../../models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody](../../models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId + +Remove a custom environment for the project. Must not be named 'Production' or 'Preview'. + +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + const result = await vercel.environment.deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({ + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "@vercel/sdk/funcs/environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId(vercel, { + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest](../../models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody](../../models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/marketplace/README.md b/docs/sdks/marketplace/README.md index 1830d8f9..90d01d42 100644 --- a/docs/sdks/marketplace/README.md +++ b/docs/sdks/marketplace/README.md @@ -12,7 +12,8 @@ * [submitInvoice](#submitinvoice) - Submit Invoice * [getInvoice](#getinvoice) - Get Invoice * [updateInvoice](#updateinvoice) - Invoice Actions -* [updateResourceSecrets](#updateresourcesecrets) - Update Resource Secrets +* [updateResourceSecrets](#updateresourcesecrets) - Update Resource Secrets (Deprecated) +* [updateResourceSecretsById](#updateresourcesecretsbyid) - Update Resource Secrets * [exchangeSsoToken](#exchangessotoken) - SSO Token Exchange ## getAccountInfo @@ -288,8 +289,8 @@ async function run() { { billingPlanId: "", name: "", - price: "330.95", - quantity: 5852.75, + price: "161.25", + quantity: 8824.47, units: "", total: "", }, @@ -354,16 +355,18 @@ async function run() { start: new Date("2022-06-25T19:04:50.518Z"), end: new Date("2023-10-18T01:18:36.230Z"), }, - billing: [ - { - billingPlanId: "", - name: "", - price: "495.99", - quantity: 8962.85, - units: "", - total: "", - }, - ], + billing: { + items: [ + { + billingPlanId: "", + name: "", + price: "161.25", + quantity: 8824.47, + units: "", + total: "", + }, + ], + }, usage: [ { resourceId: "", @@ -726,7 +729,7 @@ run(); ## updateResourceSecrets -This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
+This endpoint is deprecated and replaced with the endpoint [Update Resource Secrets](#update-resource-secrets).
This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
### Example Usage @@ -744,10 +747,7 @@ async function run() { resourceId: "", requestBody: { secrets: [ - { - name: "", - value: "", - }, + ], }, }); @@ -779,10 +779,7 @@ async function run() { resourceId: "", requestBody: { secrets: [ - { - name: "", - value: "", - }, + ], }, }); @@ -821,6 +818,85 @@ run(); | models.VercelNotFoundError | 404 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | +## updateResourceSecretsById + +This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
+ +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + await vercel.marketplace.updateResourceSecretsById({ + integrationConfigurationId: "", + resourceId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { marketplaceUpdateResourceSecretsById } from "@vercel/sdk/funcs/marketplaceUpdateResourceSecretsById.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await marketplaceUpdateResourceSecretsById(vercel, { + integrationConfigurationId: "", + resourceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.UpdateResourceSecretsByIdRequest](../../models/updateresourcesecretsbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.VercelNotFoundError | 404 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + ## exchangeSsoToken During the autorization process, Vercel sends the user to the provider [redirectLoginUrl](https://vercel.com/docs/integrations/create-integration/submit-integration#redirect-login-url), that includes the OAuth authorization `code` parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Vercel account using deep-link parameters included the redirectLoginUrl. This is used to verify the identity of the user during the [**Open in Provider** flow](https://vercel.com/docs/integrations/marketplace-flows#open-in-provider-button-flow). Providers should not persist the returned `id_token` in a database since the token will expire. diff --git a/docs/sdks/projects/README.md b/docs/sdks/projects/README.md index f6e4d995..228480a5 100644 --- a/docs/sdks/projects/README.md +++ b/docs/sdks/projects/README.md @@ -468,6 +468,7 @@ const vercel = new Vercel({ async function run() { const result = await vercel.projects.getProjectDomains({ idOrName: "", + customEnvironmentId: "env_123abc4567", redirect: "example.com", limit: 20, since: 1609499532000, @@ -500,6 +501,7 @@ const vercel = new VercelCore({ async function run() { const res = await projectsGetProjectDomains(vercel, { idOrName: "", + customEnvironmentId: "env_123abc4567", redirect: "example.com", limit: 20, since: 1609499532000, @@ -1002,6 +1004,8 @@ async function run() { gitBranch: "feature-1", decrypt: "true", source: "vercel-cli:pull", + customEnvironmentId: "env_123abc4567", + customEnvironmentSlug: "my-custom-env", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", }); @@ -1033,6 +1037,8 @@ async function run() { gitBranch: "feature-1", decrypt: "true", source: "vercel-cli:pull", + customEnvironmentId: "env_123abc4567", + customEnvironmentSlug: "my-custom-env", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", }); @@ -1276,6 +1282,7 @@ async function run() { const result = await vercel.projects.removeProjectEnv({ idOrName: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA", id: "XMbOEya1gUUO1ir4", + customEnvironmentId: "env_123abc4567", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", }); @@ -1305,6 +1312,7 @@ async function run() { const res = await projectsRemoveProjectEnv(vercel, { idOrName: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA", id: "XMbOEya1gUUO1ir4", + customEnvironmentId: "env_123abc4567", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", }); diff --git a/docs/sdks/security/README.md b/docs/sdks/security/README.md index ba209dc0..5e7e00ce 100644 --- a/docs/sdks/security/README.md +++ b/docs/sdks/security/README.md @@ -9,6 +9,9 @@ * [putFirewallConfig](#putfirewallconfig) - Put Firewall Configuration * [updateFirewallConfig](#updatefirewallconfig) - Update Firewall Configuration * [getFirewallConfig](#getfirewallconfig) - Read Firewall Configuration +* [getBypassIp](#getbypassip) - Read System Bypass +* [addBypassIp](#addbypassip) - Create System Bypass Rule +* [removeBypassIp](#removebypassip) - Remove System Bypass Rule ## updateAttackChallengeMode @@ -357,6 +360,257 @@ run(); ### Errors +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.VercelNotFoundError | 404 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## getBypassIp + +Retrieve the system bypass rules configured for the specified project + +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + const result = await vercel.security.getBypassIp({ + projectId: "", + limit: 10, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { securityGetBypassIp } from "@vercel/sdk/funcs/securityGetBypassIp.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await securityGetBypassIp(vercel, { + projectId: "", + limit: 10, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.GetBypassIpRequest](../../models/getbypassiprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.GetBypassIpResponseBody](../../models/getbypassipresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.VercelNotFoundError | 404 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## addBypassIp + +Create new system bypass rules + +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + const result = await vercel.security.addBypassIp({ + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { securityAddBypassIp } from "@vercel/sdk/funcs/securityAddBypassIp.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await securityAddBypassIp(vercel, { + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.AddBypassIpRequest](../../models/addbypassiprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.AddBypassIpResponseBody](../../models/addbypassipresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models.VercelBadRequestError | 400 | application/json | +| models.VercelForbiddenError | 401 | application/json | +| models.VercelNotFoundError | 404 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## removeBypassIp + +Remove system bypass rules + +### Example Usage + +```typescript +import { Vercel } from "@vercel/sdk"; + +const vercel = new Vercel({ + bearerToken: "", +}); + +async function run() { + const result = await vercel.security.removeBypassIp({ + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { VercelCore } from "@vercel/sdk/core.js"; +import { securityRemoveBypassIp } from "@vercel/sdk/funcs/securityRemoveBypassIp.js"; + +// Use `VercelCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const vercel = new VercelCore({ + bearerToken: "", +}); + +async function run() { + const res = await securityRemoveBypassIp(vercel, { + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.RemoveBypassIpRequest](../../models/removebypassiprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.RemoveBypassIpResponseBody](../../models/removebypassipresponsebody.md)\>** + +### Errors + | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | models.VercelBadRequestError | 400 | application/json | diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 785179f8..07045c09 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -30,7 +30,7 @@ async function run() { requestBody: { url: "https://woeful-yin.biz", events: [ - "deployment-checks-completed", + ], }, }); @@ -63,7 +63,7 @@ async function run() { requestBody: { url: "https://woeful-yin.biz", events: [ - "test-webhook", + ], }, }); diff --git a/jsr.json b/jsr.json index d3d15e74..ed9db1c7 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@vercel/sdk", - "version": "1.2.2", + "version": "1.3.0", "exports": { ".": "./src/index.ts", "./models": "./src/models/index.ts", diff --git a/package.json b/package.json index 85308167..a9ff939e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vercel/sdk", - "version": "1.2.2", + "version": "1.3.0", "author": "Speakeasy", "type": "module", "main": "./esm/index.js", @@ -28,6 +28,8 @@ "url": "https://github.com/vercel/sdk.git" }, "scripts": { + "test": "vitest run src --reporter=junit --outputFile=.speakeasy/reports/tests.xml --reporter=default", + "check": "npm run test && npm run lint", "lint": "eslint --max-warnings=0 src", "build": "tsc", "prepublishOnly": "npm run build" @@ -36,12 +38,15 @@ "zod": ">= 3" }, "devDependencies": { + "@types/node": "^18.19.3", "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", + "@vitest/ui": "^1.5.0", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", "typescript": "^5.4.5", + "vitest": "^1.5.0", "zod": "^3.23.4" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 610d987a..b3311fd5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,90 +1,520 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@typescript-eslint/eslint-plugin': - specifier: ^7.7.1 - version: 7.7.1(@typescript-eslint/parser@7.7.1)(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': - specifier: ^7.7.1 - version: 7.7.1(eslint@8.57.0)(typescript@5.4.5) - eslint: - specifier: ^8.57.0 - version: 8.57.0 - eslint-import-resolver-typescript: - specifier: ^3.6.1 - version: 3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: - specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - typescript: - specifier: ^5.4.5 - version: 5.4.5 - zod: - specifier: ^3.23.4 - version: 3.23.4 +lockfileVersion: '6.0' + +devDependencies: + '@types/node': + specifier: ^18.19.3 + version: 18.19.3 + '@typescript-eslint/eslint-plugin': + specifier: ^7.7.1 + version: 7.7.1(@typescript-eslint/parser@7.7.1)(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': + specifier: ^7.7.1 + version: 7.7.1(eslint@8.57.0)(typescript@5.4.5) + '@vitest/ui': + specifier: ^1.5.0 + version: 1.5.0(vitest@1.5.0) + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-import-resolver-typescript: + specifier: ^3.6.1 + version: 3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: + specifier: ^2.29.1 + version: 2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + typescript: + specifier: ^5.4.5 + version: 5.4.5 + vitest: + specifier: ^1.5.0 + version: 1.5.0(@types/node@18.19.3)(@vitest/ui@1.5.0) + zod: + specifier: ^3.23.4 + version: 3.23.4 packages: - '@eslint-community/eslint-utils@4.4.1': + /@esbuild/aix-ppc64@0.21.5: + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.21.5: + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.21.5: + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.21.5: + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.21.5: + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.21.5: + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.21.5: + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.21.5: + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.21.5: + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.21.5: + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.21.5: + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.21.5: + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.21.5: + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.21.5: + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.21.5: + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.21.5: + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.21.5: + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.21.5: + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.21.5: + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.21.5: + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.21.5: + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.21.5: + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.21.5: + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@eslint-community/eslint-utils@4.4.1(eslint@8.57.0): resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.57.0 + eslint-visitor-keys: 3.4.3 + dev: true - '@eslint-community/regexpp@4.12.1': + /@eslint-community/regexpp@4.12.1: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true - '@eslint/eslintrc@2.1.4': + /@eslint/eslintrc@2.1.4: resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.4.0 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true - '@eslint/js@8.57.0': + /@eslint/js@8.57.0: resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true - '@humanwhocodes/config-array@0.11.14': + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} deprecated: Use @eslint/config-array instead + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.4.0 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true - '@humanwhocodes/module-importer@1.0.1': + /@humanwhocodes/module-importer@1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} + dev: true - '@humanwhocodes/object-schema@2.0.3': + /@humanwhocodes/object-schema@2.0.3: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead + dev: true + + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.27.8 + dev: true - '@nodelib/fs.scandir@2.1.5': + /@jridgewell/sourcemap-codec@1.5.0: + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + dev: true + + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true - '@nodelib/fs.stat@2.0.5': + /@nodelib/fs.stat@2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} + dev: true - '@nodelib/fs.walk@1.2.8': + /@nodelib/fs.walk@1.2.8: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - - '@types/json-schema@7.0.15': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.18.0 + dev: true + + /@polka/url@1.0.0-next.28: + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + dev: true + + /@rollup/rollup-android-arm-eabi@4.30.1: + resolution: {integrity: sha512-pSWY+EVt3rJ9fQ3IqlrEUtXh3cGqGtPDH1FQlNZehO2yYxCHEX1SPsz1M//NXwYfbTlcKr9WObLnJX9FsS9K1Q==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.30.1: + resolution: {integrity: sha512-/NA2qXxE3D/BRjOJM8wQblmArQq1YoBVJjrjoTSBS09jgUisq7bqxNHJ8kjCHeV21W/9WDGwJEWSN0KQ2mtD/w==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.30.1: + resolution: {integrity: sha512-r7FQIXD7gB0WJ5mokTUgUWPl0eYIH0wnxqeSAhuIwvnnpjdVB8cRRClyKLQr7lgzjctkbp5KmswWszlwYln03Q==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.30.1: + resolution: {integrity: sha512-x78BavIwSH6sqfP2xeI1hd1GpHL8J4W2BXcVM/5KYKoAD3nNsfitQhvWSw+TFtQTLZ9OmlF+FEInEHyubut2OA==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-freebsd-arm64@4.30.1: + resolution: {integrity: sha512-HYTlUAjbO1z8ywxsDFWADfTRfTIIy/oUlfIDmlHYmjUP2QRDTzBuWXc9O4CXM+bo9qfiCclmHk1x4ogBjOUpUQ==} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-freebsd-x64@4.30.1: + resolution: {integrity: sha512-1MEdGqogQLccphhX5myCJqeGNYTNcmTyaic9S7CG3JhwuIByJ7J05vGbZxsizQthP1xpVx7kd3o31eOogfEirw==} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.30.1: + resolution: {integrity: sha512-PaMRNBSqCx7K3Wc9QZkFx5+CX27WFpAMxJNiYGAXfmMIKC7jstlr32UhTgK6T07OtqR+wYlWm9IxzennjnvdJg==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-musleabihf@4.30.1: + resolution: {integrity: sha512-B8Rcyj9AV7ZlEFqvB5BubG5iO6ANDsRKlhIxySXcF1axXYUyqwBok+XZPgIYGBgs7LDXfWfifxhw0Ik57T0Yug==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.30.1: + resolution: {integrity: sha512-hqVyueGxAj3cBKrAI4aFHLV+h0Lv5VgWZs9CUGqr1z0fZtlADVV1YPOij6AhcK5An33EXaxnDLmJdQikcn5NEw==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.30.1: + resolution: {integrity: sha512-i4Ab2vnvS1AE1PyOIGp2kXni69gU2DAUVt6FSXeIqUCPIR3ZlheMW3oP2JkukDfu3PsexYRbOiJrY+yVNSk9oA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-loongarch64-gnu@4.30.1: + resolution: {integrity: sha512-fARcF5g296snX0oLGkVxPmysetwUk2zmHcca+e9ObOovBR++9ZPOhqFUM61UUZ2EYpXVPN1redgqVoBB34nTpQ==} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-powerpc64le-gnu@4.30.1: + resolution: {integrity: sha512-GLrZraoO3wVT4uFXh67ElpwQY0DIygxdv0BNW9Hkm3X34wu+BkqrDrkcsIapAY+N2ATEbvak0XQ9gxZtCIA5Rw==} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.30.1: + resolution: {integrity: sha512-0WKLaAUUHKBtll0wvOmh6yh3S0wSU9+yas923JIChfxOaaBarmb/lBKPF0w/+jTVozFnOXJeRGZ8NvOxvk/jcw==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-s390x-gnu@4.30.1: + resolution: {integrity: sha512-GWFs97Ruxo5Bt+cvVTQkOJ6TIx0xJDD/bMAOXWJg8TCSTEK8RnFeOeiFTxKniTc4vMIaWvCplMAFBt9miGxgkA==} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.30.1: + resolution: {integrity: sha512-UtgGb7QGgXDIO+tqqJ5oZRGHsDLO8SlpE4MhqpY9Llpzi5rJMvrK6ZGhsRCST2abZdBqIBeXW6WPD5fGK5SDwg==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.30.1: + resolution: {integrity: sha512-V9U8Ey2UqmQsBT+xTOeMzPzwDzyXmnAoO4edZhL7INkwQcaW1Ckv3WJX3qrrp/VHaDkEWIBWhRwP47r8cdrOow==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.30.1: + resolution: {integrity: sha512-WabtHWiPaFF47W3PkHnjbmWawnX/aE57K47ZDT1BXTS5GgrBUEpvOzq0FI0V/UYzQJgdb8XlhVNH8/fwV8xDjw==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.30.1: + resolution: {integrity: sha512-pxHAU+Zv39hLUTdQQHUVHf4P+0C47y/ZloorHpzs2SXMRqeAWmGghzAhfOlzFHHwjvgokdFAhC4V+6kC1lRRfw==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.30.1: + resolution: {integrity: sha512-D6qjsXGcvhTjv0kI4fU8tUuBDF/Ueee4SVX79VfNDXZa64TfCW1Slkb6Z7O1p7vflqZjcmOVdZlqf8gvJxc6og==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@sinclair/typebox@0.27.8: + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + dev: true + + /@types/estree@1.0.6: + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + dev: true + + /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + dev: true - '@types/json5@0.0.29': + /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + dev: true + + /@types/node@18.19.3: + resolution: {integrity: sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==} + dependencies: + undici-types: 5.26.5 + dev: true - '@types/semver@7.5.8': + /@types/semver@7.5.8: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + dev: true - '@typescript-eslint/eslint-plugin@7.7.1': + /@typescript-eslint/eslint-plugin@7.7.1(@typescript-eslint/parser@7.7.1)(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -94,8 +524,26 @@ packages: peerDependenciesMeta: typescript: optional: true + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.7.1 + '@typescript-eslint/type-utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.7.1 + debug: 4.4.0 + eslint: 8.57.0 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true - '@typescript-eslint/parser@7.7.1': + /@typescript-eslint/parser@7.7.1(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -104,12 +552,27 @@ packages: peerDependenciesMeta: typescript: optional: true + dependencies: + '@typescript-eslint/scope-manager': 7.7.1 + '@typescript-eslint/types': 7.7.1 + '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.7.1 + debug: 4.4.0 + eslint: 8.57.0 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true - '@typescript-eslint/scope-manager@7.7.1': + /@typescript-eslint/scope-manager@7.7.1: resolution: {integrity: sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==} engines: {node: ^18.18.0 || >=20.0.0} + dependencies: + '@typescript-eslint/types': 7.7.1 + '@typescript-eslint/visitor-keys': 7.7.1 + dev: true - '@typescript-eslint/type-utils@7.7.1': + /@typescript-eslint/type-utils@7.7.1(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -118,12 +581,23 @@ packages: peerDependenciesMeta: typescript: optional: true + dependencies: + '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) + '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + debug: 4.4.0 + eslint: 8.57.0 + ts-api-utils: 1.4.3(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true - '@typescript-eslint/types@7.7.1': + /@typescript-eslint/types@7.7.1: resolution: {integrity: sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==} engines: {node: ^18.18.0 || >=20.0.0} + dev: true - '@typescript-eslint/typescript-estree@7.7.1': + /@typescript-eslint/typescript-estree@7.7.1(typescript@5.4.5): resolution: {integrity: sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -131,213 +605,643 @@ packages: peerDependenciesMeta: typescript: optional: true + dependencies: + '@typescript-eslint/types': 7.7.1 + '@typescript-eslint/visitor-keys': 7.7.1 + debug: 4.4.0 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: true - '@typescript-eslint/utils@7.7.1': + /@typescript-eslint/utils@7.7.1(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 7.7.1 + '@typescript-eslint/types': 7.7.1 + '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) + eslint: 8.57.0 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + - typescript + dev: true - '@typescript-eslint/visitor-keys@7.7.1': + /@typescript-eslint/visitor-keys@7.7.1: resolution: {integrity: sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==} engines: {node: ^18.18.0 || >=20.0.0} + dependencies: + '@typescript-eslint/types': 7.7.1 + eslint-visitor-keys: 3.4.3 + dev: true - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + /@ungap/structured-clone@1.2.1: + resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==} + dev: true - acorn-jsx@5.3.2: + /@vitest/expect@1.5.0: + resolution: {integrity: sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==} + dependencies: + '@vitest/spy': 1.5.0 + '@vitest/utils': 1.5.0 + chai: 4.5.0 + dev: true + + /@vitest/runner@1.5.0: + resolution: {integrity: sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==} + dependencies: + '@vitest/utils': 1.5.0 + p-limit: 5.0.0 + pathe: 1.1.2 + dev: true + + /@vitest/snapshot@1.5.0: + resolution: {integrity: sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==} + dependencies: + magic-string: 0.30.17 + pathe: 1.1.2 + pretty-format: 29.7.0 + dev: true + + /@vitest/spy@1.5.0: + resolution: {integrity: sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==} + dependencies: + tinyspy: 2.2.1 + dev: true + + /@vitest/ui@1.5.0(vitest@1.5.0): + resolution: {integrity: sha512-ETcToK2TzICf/Oartvt19IH7yR4oCs8GrQk5hRhZ5oZFaSdDHTh6o3EdzyxOaY24NZ20cXYYNGjj1se/5vHfFg==} + peerDependencies: + vitest: 1.5.0 + dependencies: + '@vitest/utils': 1.5.0 + fast-glob: 3.3.3 + fflate: 0.8.2 + flatted: 3.3.2 + pathe: 1.1.2 + picocolors: 1.1.1 + sirv: 2.0.4 + vitest: 1.5.0(@types/node@18.19.3)(@vitest/ui@1.5.0) + dev: true + + /@vitest/utils@1.5.0: + resolution: {integrity: sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==} + dependencies: + diff-sequences: 29.6.3 + estree-walker: 3.0.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + dev: true + + /acorn-jsx@5.3.2(acorn@8.14.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.14.0 + dev: true + + /acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + dependencies: + acorn: 8.14.0 + dev: true - acorn@8.14.0: + /acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true + dev: true - ajv@6.12.6: + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true - ansi-regex@5.0.1: + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + dev: true - ansi-styles@4.3.0: + /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true - argparse@2.0.1: + /ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + dev: true + + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true - array-buffer-byte-length@1.0.1: - resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + /array-buffer-byte-length@1.0.2: + resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + is-array-buffer: 3.0.5 + dev: true - array-includes@3.1.8: + /array-includes@3.1.8: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-object-atoms: 1.1.1 + get-intrinsic: 1.2.7 + is-string: 1.1.1 + dev: true - array-union@2.1.0: + /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + dev: true - array.prototype.findlastindex@1.2.5: + /array.prototype.findlastindex@1.2.5: resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + es-shim-unscopables: 1.0.2 + dev: true - array.prototype.flat@1.3.2: - resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + /array.prototype.flat@1.3.3: + resolution: {integrity: sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-shim-unscopables: 1.0.2 + dev: true - array.prototype.flatmap@1.3.2: - resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + /array.prototype.flatmap@1.3.3: + resolution: {integrity: sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-shim-unscopables: 1.0.2 + dev: true - arraybuffer.prototype.slice@1.0.3: - resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + /arraybuffer.prototype.slice@1.0.4: + resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.2 + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + is-array-buffer: 3.0.5 + dev: true - available-typed-arrays@1.0.7: + /assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: true + + /available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + dependencies: + possible-typed-array-names: 1.0.0 + dev: true - balanced-match@1.0.2: + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true - brace-expansion@1.1.11: + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true - brace-expansion@2.0.1: + /brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true - braces@3.0.3: + /braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + dependencies: + fill-range: 7.1.1 + dev: true + + /cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + + /call-bind-apply-helpers@1.0.1: + resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + dev: true + + /call-bind@1.0.8: + resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + engines: {node: '>= 0.4'} + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + get-intrinsic: 1.2.7 + set-function-length: 1.2.2 + dev: true - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + /call-bound@1.0.3: + resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} engines: {node: '>= 0.4'} + dependencies: + call-bind-apply-helpers: 1.0.1 + get-intrinsic: 1.2.7 + dev: true - callsites@3.1.0: + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + dev: true - chalk@4.1.2: + /chai@4.5.0: + resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.4 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.1.0 + dev: true + + /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + dependencies: + get-func-name: 2.0.2 + dev: true - color-convert@2.0.1: + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true - color-name@1.1.4: + /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true - concat-map@0.0.1: + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true - cross-spawn@7.0.6: + /confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + dev: true + + /cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true - data-view-buffer@1.0.1: - resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + /data-view-buffer@1.0.2: + resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-data-view: 1.0.2 + dev: true - data-view-byte-length@1.0.1: - resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + /data-view-byte-length@1.0.2: + resolution: {integrity: sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-data-view: 1.0.2 + dev: true - data-view-byte-offset@1.0.0: - resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + /data-view-byte-offset@1.0.1: + resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-data-view: 1.0.2 + dev: true - debug@3.2.7: + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: supports-color: '*' peerDependenciesMeta: supports-color: optional: true + dependencies: + ms: 2.1.3 + dev: true - debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + /debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' peerDependenciesMeta: supports-color: optional: true + dependencies: + ms: 2.1.3 + dev: true + + /deep-eql@4.1.4: + resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.1.0 + dev: true - deep-is@0.1.4: + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true - define-data-property@1.1.4: + /define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + dev: true - define-properties@1.2.1: + /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + dev: true - dir-glob@3.0.1: + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true - doctrine@2.1.0: + /doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + dependencies: + esutils: 2.0.3 + dev: true - doctrine@3.0.0: + /doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + dependencies: + call-bind-apply-helpers: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + dev: true - enhanced-resolve@5.17.1: - resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} + /enhanced-resolve@5.18.0: + resolution: {integrity: sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==} engines: {node: '>=10.13.0'} + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + dev: true - es-abstract@1.23.5: - resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} + /es-abstract@1.23.9: + resolution: {integrity: sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==} engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.2 + arraybuffer.prototype.slice: 1.0.4 + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 + data-view-buffer: 1.0.2 + data-view-byte-length: 1.0.2 + data-view-byte-offset: 1.0.1 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + es-set-tostringtag: 2.1.0 + es-to-primitive: 1.3.0 + function.prototype.name: 1.1.8 + get-intrinsic: 1.2.7 + get-proto: 1.0.1 + get-symbol-description: 1.1.0 + globalthis: 1.0.4 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + has-proto: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + internal-slot: 1.1.0 + is-array-buffer: 3.0.5 + is-callable: 1.2.7 + is-data-view: 1.0.2 + is-regex: 1.2.1 + is-shared-array-buffer: 1.0.4 + is-string: 1.1.1 + is-typed-array: 1.1.15 + is-weakref: 1.1.0 + math-intrinsics: 1.1.0 + object-inspect: 1.13.3 + object-keys: 1.1.1 + object.assign: 4.1.7 + own-keys: 1.0.1 + regexp.prototype.flags: 1.5.4 + safe-array-concat: 1.1.3 + safe-push-apply: 1.0.0 + safe-regex-test: 1.1.0 + set-proto: 1.0.0 + string.prototype.trim: 1.2.10 + string.prototype.trimend: 1.0.9 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.3 + typed-array-byte-length: 1.0.3 + typed-array-byte-offset: 1.0.4 + typed-array-length: 1.0.7 + unbox-primitive: 1.1.0 + which-typed-array: 1.1.18 + dev: true - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + /es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} + dev: true - es-errors@1.3.0: + /es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + dev: true - es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + /es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + dev: true - es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + /es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + dev: true - es-shim-unscopables@1.0.2: + /es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + dependencies: + hasown: 2.0.2 + dev: true - es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + /es-to-primitive@1.3.0: + resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.7 + is-date-object: 1.1.0 + is-symbol: 1.1.1 + dev: true - escape-string-regexp@4.0.0: + /esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + dev: true + + /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + dev: true - eslint-import-resolver-node@0.3.9: + /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + dependencies: + debug: 3.2.7 + is-core-module: 2.16.1 + resolve: 1.22.10 + transitivePeerDependencies: + - supports-color + dev: true - eslint-import-resolver-typescript@3.6.1: + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0): resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '*' eslint-plugin-import: '*' + dependencies: + debug: 4.4.0 + enhanced-resolve: 5.18.0 + eslint: 8.57.0 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + fast-glob: 3.3.3 + get-tsconfig: 4.8.1 + is-core-module: 2.16.1 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + dev: true - eslint-module-utils@2.12.0: + /eslint-module-utils@2.12.0(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} engines: {node: '>=4'} peerDependencies: @@ -357,8 +1261,17 @@ packages: optional: true eslint-import-resolver-webpack: optional: true + dependencies: + '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + debug: 3.2.7 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + dev: true - eslint-plugin-import@2.29.1: + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -367,1758 +1280,1688 @@ packages: peerDependenciesMeta: '@typescript-eslint/parser': optional: true + dependencies: + '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.3 + array.prototype.flatmap: 1.3.3 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.16.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.1 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@3.4.3: + /eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true - eslint@8.57.0: + /eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.0) + '@eslint-community/regexpp': 4.12.1 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.1 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.0 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true - espree@9.6.1: + /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 3.4.3 + dev: true - esquery@1.6.0: + /esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true - esrecurse@4.3.0: + /esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} + dependencies: + estraverse: 5.3.0 + dev: true - estraverse@5.3.0: + /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} + dev: true + + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.6 + dev: true - esutils@2.0.3: + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + dev: true - fast-deep-equal@3.1.3: + /execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + dependencies: + cross-spawn: 7.0.6 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + dev: true + + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + /fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + dev: true - fast-json-stable-stringify@2.1.0: + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true - fast-levenshtein@2.0.6: + /fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: true + + /fastq@1.18.0: + resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} + dependencies: + reusify: 1.0.4 + dev: true - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + /fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + dev: true - file-entry-cache@6.0.1: + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flat-cache: 3.2.0 + dev: true - fill-range@7.1.1: + /fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true - find-up@5.0.0: + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true - flat-cache@3.2.0: + /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + rimraf: 3.0.2 + dev: true - flatted@3.3.2: + /flatted@3.3.2: resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + dev: true - for-each@0.3.3: + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: true - fs.realpath@1.0.0: + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true - function-bind@1.1.2: + /function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: true - function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + /function.prototype.name@1.1.8: + resolution: {integrity: sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + functions-have-names: 1.2.3 + hasown: 2.0.2 + is-callable: 1.2.7 + dev: true - functions-have-names@1.2.3: + /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: true + + /get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + dev: true + + /get-intrinsic@1.2.7: + resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + dev: true - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + /get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + dev: true + + /get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + dev: true - get-symbol-description@1.0.2: - resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + /get-symbol-description@1.1.0: + resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + dev: true - get-tsconfig@4.8.1: + /get-tsconfig@4.8.1: resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true - glob-parent@5.1.2: + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true - glob-parent@6.0.2: + /glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true - glob@7.2.3: + /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true - globals@13.24.0: + /globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true - globalthis@1.0.4: + /globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.1 + gopd: 1.2.0 + dev: true - globby@11.1.0: + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.3 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + dev: true - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + /gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + dev: true - graceful-fs@4.2.11: + /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true - graphemer@1.4.0: + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + dev: true - has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + /has-bigints@1.1.0: + resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} + engines: {node: '>= 0.4'} + dev: true - has-flag@4.0.0: + /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + dev: true - has-property-descriptors@1.0.2: + /has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + dependencies: + es-define-property: 1.0.1 + dev: true - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + /has-proto@1.2.0: + resolution: {integrity: sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==} engines: {node: '>= 0.4'} + dependencies: + dunder-proto: 1.0.1 + dev: true - has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + /has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} + dev: true - has-tostringtag@1.0.2: + /has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.1.0 + dev: true - hasown@2.0.2: + /hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + + /human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + dev: true - ignore@5.3.2: + /ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} + dev: true - import-fresh@3.3.0: + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true - imurmurhash@0.1.4: + /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + dev: true - inflight@1.0.6: + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true - inherits@2.0.4: + /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true - internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + /internal-slot@1.1.0: + resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + hasown: 2.0.2 + side-channel: 1.1.0 + dev: true - is-array-buffer@3.0.4: - resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + /is-array-buffer@3.0.5: + resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + get-intrinsic: 1.2.7 + dev: true - is-async-function@2.0.0: - resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + /is-async-function@2.1.0: + resolution: {integrity: sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + get-proto: 1.0.1 + has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 + dev: true - is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + /is-bigint@1.1.0: + resolution: {integrity: sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==} + engines: {node: '>= 0.4'} + dependencies: + has-bigints: 1.1.0 + dev: true - is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + /is-boolean-object@1.2.1: + resolution: {integrity: sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + dev: true - is-callable@1.2.7: + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} + dev: true - is-core-module@2.15.1: - resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + /is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} + dependencies: + hasown: 2.0.2 + dev: true - is-data-view@1.0.1: - resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + /is-data-view@1.0.2: + resolution: {integrity: sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + get-intrinsic: 1.2.7 + is-typed-array: 1.1.15 + dev: true - is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + /is-date-object@1.1.0: + resolution: {integrity: sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + dev: true - is-extglob@2.1.1: + /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + dev: true - is-finalizationregistry@1.1.0: - resolution: {integrity: sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==} + /is-finalizationregistry@1.1.1: + resolution: {integrity: sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + dev: true - is-generator-function@1.0.10: - resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + /is-generator-function@1.1.0: + resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + get-proto: 1.0.1 + has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 + dev: true - is-glob@4.0.3: + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true - is-map@2.0.3: + /is-map@2.0.3: resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} + dev: true - is-negative-zero@2.0.3: - resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} - engines: {node: '>= 0.4'} - - is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + /is-number-object@1.1.1: + resolution: {integrity: sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + dev: true - is-number@7.0.0: + /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + dev: true - is-path-inside@3.0.3: + /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} + dev: true - is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + /is-regex@1.2.1: + resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + dev: true - is-set@2.0.3: + /is-set@2.0.3: resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} engines: {node: '>= 0.4'} + dev: true - is-shared-array-buffer@1.0.3: - resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + /is-shared-array-buffer@1.0.4: + resolution: {integrity: sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + dev: true - is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + /is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + + /is-string@1.1.1: + resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + dev: true - is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + /is-symbol@1.1.1: + resolution: {integrity: sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + has-symbols: 1.1.0 + safe-regex-test: 1.1.0 + dev: true - is-typed-array@1.1.13: - resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + /is-typed-array@1.1.15: + resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} engines: {node: '>= 0.4'} + dependencies: + which-typed-array: 1.1.18 + dev: true - is-weakmap@2.0.2: + /is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} + dev: true - is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + /is-weakref@1.1.0: + resolution: {integrity: sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==} + engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + dev: true - is-weakset@2.0.3: - resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} + /is-weakset@2.0.4: + resolution: {integrity: sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + get-intrinsic: 1.2.7 + dev: true - isarray@2.0.5: + /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true - isexe@2.0.0: + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true - js-yaml@4.1.0: + /js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + dev: true + + /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + dependencies: + argparse: 2.0.1 + dev: true - json-buffer@3.0.1: + /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: true - json-schema-traverse@0.4.1: + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true - json-stable-stringify-without-jsonify@1.0.1: + /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: true - json5@1.0.2: + /json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true + dependencies: + minimist: 1.2.8 + dev: true - keyv@4.5.4: + /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: true - levn@0.4.1: + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true - locate-path@6.0.0: + /local-pkg@0.5.1: + resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==} + engines: {node: '>=14'} + dependencies: + mlly: 1.7.4 + pkg-types: 1.3.1 + dev: true + + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true - lodash.merge@4.6.2: + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + + /loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + dependencies: + get-func-name: 2.0.2 + dev: true + + /magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + dev: true - merge2@1.4.1: + /math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + dev: true + + /merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + dev: true + + /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + dev: true - micromatch@4.0.8: + /micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + dev: true - minimatch@3.1.2: + /mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + dev: true + + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true - minimatch@9.0.5: + /minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true - minimist@1.2.8: + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + + /mlly@1.7.4: + resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} + dependencies: + acorn: 8.14.0 + pathe: 2.0.1 + pkg-types: 1.3.1 + ufo: 1.5.4 + dev: true + + /mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} + dev: true - ms@2.1.3: + /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + dev: true - natural-compare@1.4.0: + /nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + path-key: 4.0.0 + dev: true - object-inspect@1.13.3: + /object-inspect@1.13.3: resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} engines: {node: '>= 0.4'} + dev: true - object-keys@1.1.1: + /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + dev: true - object.assign@4.1.5: - resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + /object.assign@4.1.7: + resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + es-object-atoms: 1.1.1 + has-symbols: 1.1.0 + object-keys: 1.1.1 + dev: true - object.fromentries@2.0.8: + /object.fromentries@2.0.8: resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-object-atoms: 1.1.1 + dev: true - object.groupby@1.0.3: + /object.groupby@1.0.3: resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + dev: true - object.values@1.2.0: - resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + /object.values@1.2.1: + resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + es-object-atoms: 1.1.1 + dev: true - once@1.4.0: + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + dependencies: + mimic-fn: 4.0.0 + dev: true - optionator@0.9.4: + /optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + dev: true - p-limit@3.1.0: + /own-keys@1.0.1: + resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.7 + object-keys: 1.1.1 + safe-push-apply: 1.0.0 + dev: true + + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-limit@5.0.0: + resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} + engines: {node: '>=18'} + dependencies: + yocto-queue: 1.1.1 + dev: true - p-locate@5.0.0: + /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true - parent-module@1.0.1: + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true - path-exists@4.0.0: + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + dev: true - path-is-absolute@1.0.1: + /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} + dev: true - path-key@3.1.1: + /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + dev: true - path-parse@1.0.7: + /path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: true + + /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true - path-type@4.0.0: + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + dev: true + + /pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + dev: true + + /pathe@2.0.1: + resolution: {integrity: sha512-6jpjMpOth5S9ITVu5clZ7NOgHNsv5vRQdheL9ztp2vZmM6fRbLvyua1tiBIL4lk8SAe3ARzeXEly6siXCjDHDw==} + dev: true + + /pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true - picomatch@2.3.1: + /picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + dev: true + + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + dev: true + + /pkg-types@1.3.1: + resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + dependencies: + confbox: 0.1.8 + mlly: 1.7.4 + pathe: 2.0.1 + dev: true - possible-typed-array-names@1.0.0: + /possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} + dev: true + + /postcss@8.5.1: + resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.8 + picocolors: 1.1.1 + source-map-js: 1.2.1 + dev: true - prelude-ls@1.2.1: + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + dev: true + + /pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + dev: true - punycode@2.3.1: + /punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + dev: true - queue-microtask@1.2.3: + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + dev: true - reflect.getprototypeof@1.0.7: - resolution: {integrity: sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g==} + /reflect.getprototypeof@1.0.10: + resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + get-intrinsic: 1.2.7 + get-proto: 1.0.1 + which-builtin-type: 1.2.1 + dev: true - regexp.prototype.flags@1.5.3: - resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} + /regexp.prototype.flags@1.5.4: + resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-errors: 1.3.0 + get-proto: 1.0.1 + gopd: 1.2.0 + set-function-name: 2.0.2 + dev: true - resolve-from@4.0.0: + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} + dev: true - resolve-pkg-maps@1.0.0: + /resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true - resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + /resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} hasBin: true + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true - reusify@1.0.4: + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true - rimraf@3.0.2: + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true + dependencies: + glob: 7.2.3 + dev: true - run-parallel@1.2.0: + /rollup@4.30.1: + resolution: {integrity: sha512-mlJ4glW020fPuLi7DkM/lN97mYEZGWeqBnrljzN0gs7GLctqX3lNWxKQ7Gl712UAX+6fog/L3jh4gb7R6aVi3w==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.30.1 + '@rollup/rollup-android-arm64': 4.30.1 + '@rollup/rollup-darwin-arm64': 4.30.1 + '@rollup/rollup-darwin-x64': 4.30.1 + '@rollup/rollup-freebsd-arm64': 4.30.1 + '@rollup/rollup-freebsd-x64': 4.30.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.30.1 + '@rollup/rollup-linux-arm-musleabihf': 4.30.1 + '@rollup/rollup-linux-arm64-gnu': 4.30.1 + '@rollup/rollup-linux-arm64-musl': 4.30.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.30.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.30.1 + '@rollup/rollup-linux-riscv64-gnu': 4.30.1 + '@rollup/rollup-linux-s390x-gnu': 4.30.1 + '@rollup/rollup-linux-x64-gnu': 4.30.1 + '@rollup/rollup-linux-x64-musl': 4.30.1 + '@rollup/rollup-win32-arm64-msvc': 4.30.1 + '@rollup/rollup-win32-ia32-msvc': 4.30.1 + '@rollup/rollup-win32-x64-msvc': 4.30.1 + fsevents: 2.3.3 + dev: true + + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true - safe-array-concat@1.1.2: - resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + /safe-array-concat@1.1.3: + resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + get-intrinsic: 1.2.7 + has-symbols: 1.1.0 + isarray: 2.0.5 + dev: true + + /safe-push-apply@1.0.0: + resolution: {integrity: sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + isarray: 2.0.5 + dev: true - safe-regex-test@1.0.3: - resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + /safe-regex-test@1.1.0: + resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-regex: 1.2.1 + dev: true - semver@6.3.1: + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + dev: true - semver@7.6.3: + /semver@7.6.3: resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true + dev: true - set-function-length@1.2.2: + /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.7 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + dev: true - set-function-name@2.0.2: + /set-function-name@2.0.2: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + dev: true + + /set-proto@1.0.0: + resolution: {integrity: sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==} + engines: {node: '>= 0.4'} + dependencies: + dunder-proto: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + dev: true - shebang-command@2.0.0: + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true - shebang-regex@3.0.0: + /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + dev: true + + /side-channel-list@1.0.0: + resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.3 + dev: true + + /side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + object-inspect: 1.13.3 + dev: true - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + /side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + object-inspect: 1.13.3 + side-channel-map: 1.0.1 + dev: true - slash@3.0.0: + /side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.3 + side-channel-list: 1.0.0 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + dev: true + + /siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true + + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: true + + /sirv@2.0.4: + resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} + engines: {node: '>= 10'} + dependencies: + '@polka/url': 1.0.0-next.28 + mrmime: 2.0.0 + totalist: 3.0.1 + dev: true + + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + dev: true + + /source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + dev: true + + /stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + dev: true - string.prototype.trim@1.2.9: - resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + /std-env@3.8.0: + resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + dev: true + + /string.prototype.trim@1.2.10: + resolution: {integrity: sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-data-property: 1.1.4 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-object-atoms: 1.1.1 + has-property-descriptors: 1.0.2 + dev: true - string.prototype.trimend@1.0.8: - resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + /string.prototype.trimend@1.0.9: + resolution: {integrity: sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + es-object-atoms: 1.1.1 + dev: true - string.prototype.trimstart@1.0.8: + /string.prototype.trimstart@1.0.8: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-object-atoms: 1.1.1 + dev: true - strip-ansi@6.0.1: + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true - strip-bom@3.0.0: + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} + dev: true - strip-json-comments@3.1.1: + /strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + dev: true + + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + dev: true + + /strip-literal@2.1.1: + resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==} + dependencies: + js-tokens: 9.0.1 + dev: true - supports-color@7.2.0: + /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true - supports-preserve-symlinks-flag@1.0.0: + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + dev: true - tapable@2.2.1: + /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} + dev: true - text-table@0.2.0: + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: true + + /tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + dev: true - to-regex-range@5.0.1: + /tinypool@0.8.4: + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy@2.2.1: + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} + dev: true + + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true - ts-api-utils@1.4.1: - resolution: {integrity: sha512-5RU2/lxTA3YUZxju61HO2U6EoZLvBLtmV2mbTvqyu4a/7s7RmJPT+1YekhMVsQhznRWk/czIwDUg+V8Q9ZuG4w==} + /totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + dev: true + + /ts-api-utils@1.4.3(typescript@5.4.5): + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' + dependencies: + typescript: 5.4.5 + dev: true - tsconfig-paths@3.15.0: + /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.2 + minimist: 1.2.8 + strip-bom: 3.0.0 + dev: true - type-check@0.4.0: + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + engines: {node: '>=4'} + dev: true - type-fest@0.20.2: + /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} + dev: true - typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + /typed-array-buffer@1.0.3: + resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-typed-array: 1.1.15 + dev: true - typed-array-byte-length@1.0.1: - resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + /typed-array-byte-length@1.0.3: + resolution: {integrity: sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + for-each: 0.3.3 + gopd: 1.2.0 + has-proto: 1.2.0 + is-typed-array: 1.1.15 + dev: true - typed-array-byte-offset@1.0.3: - resolution: {integrity: sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==} + /typed-array-byte-offset@1.0.4: + resolution: {integrity: sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==} engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + for-each: 0.3.3 + gopd: 1.2.0 + has-proto: 1.2.0 + is-typed-array: 1.1.15 + reflect.getprototypeof: 1.0.10 + dev: true - typed-array-length@1.0.7: + /typed-array-length@1.0.7: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.8 + for-each: 0.3.3 + gopd: 1.2.0 + is-typed-array: 1.1.15 + possible-typed-array-names: 1.0.0 + reflect.getprototypeof: 1.0.10 + dev: true - typescript@5.4.5: + /typescript@5.4.5: resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true + dev: true - unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - - which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - - which-builtin-type@1.2.0: - resolution: {integrity: sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA==} - engines: {node: '>= 0.4'} - - which-collection@1.0.2: - resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} - engines: {node: '>= 0.4'} + /ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + dev: true - which-typed-array@1.1.15: - resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + /unbox-primitive@1.1.0: + resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} + dependencies: + call-bound: 1.0.3 + has-bigints: 1.1.0 + has-symbols: 1.1.0 + which-boxed-primitive: 1.1.1 + dev: true - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - - zod@3.23.4: - resolution: {integrity: sha512-/AtWOKbBgjzEYYQRNfoGKHObgfAZag6qUJX1VbHo2PRBgS+wfWagEY2mizjfyAPcGesrJOcx/wcl0L9WnVrHFw==} - -snapshots: + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true - '@eslint-community/eslint-utils@4.4.1(eslint@8.57.0)': + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: - eslint: 8.57.0 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.12.1': {} + punycode: 2.3.1 + dev: true - '@eslint/eslintrc@2.1.4': + /vite-node@1.5.0(@types/node@18.19.3): + resolution: {integrity: sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true dependencies: - ajv: 6.12.6 - debug: 4.3.7 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.2 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 + cac: 6.7.14 + debug: 4.4.0 + pathe: 1.1.2 + picocolors: 1.1.1 + vite: 5.4.11(@types/node@18.19.3) transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + dev: true - '@eslint/js@8.57.0': {} - - '@humanwhocodes/config-array@0.11.14': + /vite@5.4.11(@types/node@18.19.3): + resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 - minimatch: 3.1.2 + '@types/node': 18.19.3 + esbuild: 0.21.5 + postcss: 8.5.1 + rollup: 4.30.1 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vitest@1.5.0(@types/node@18.19.3)(@vitest/ui@1.5.0): + resolution: {integrity: sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 1.5.0 + '@vitest/ui': 1.5.0 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + dependencies: + '@types/node': 18.19.3 + '@vitest/expect': 1.5.0 + '@vitest/runner': 1.5.0 + '@vitest/snapshot': 1.5.0 + '@vitest/spy': 1.5.0 + '@vitest/ui': 1.5.0(vitest@1.5.0) + '@vitest/utils': 1.5.0 + acorn-walk: 8.3.4 + chai: 4.5.0 + debug: 4.4.0 + execa: 8.0.1 + local-pkg: 0.5.1 + magic-string: 0.30.17 + pathe: 1.1.2 + picocolors: 1.1.1 + std-env: 3.8.0 + strip-literal: 2.1.1 + tinybench: 2.9.0 + tinypool: 0.8.4 + vite: 5.4.11(@types/node@18.19.3) + vite-node: 1.5.0(@types/node@18.19.3) + why-is-node-running: 2.3.0 transitivePeerDependencies: + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + dev: true - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/object-schema@2.0.3': {} - - '@nodelib/fs.scandir@2.1.5': + /which-boxed-primitive@1.1.1: + resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} + engines: {node: '>= 0.4'} dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - '@nodelib/fs.stat@2.0.5': {} + is-bigint: 1.1.0 + is-boolean-object: 1.2.1 + is-number-object: 1.1.1 + is-string: 1.1.1 + is-symbol: 1.1.1 + dev: true - '@nodelib/fs.walk@1.2.8': + /which-builtin-type@1.2.1: + resolution: {integrity: sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==} + engines: {node: '>= 0.4'} dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 - - '@types/json-schema@7.0.15': {} - - '@types/json5@0.0.29': {} - - '@types/semver@7.5.8': {} + call-bound: 1.0.3 + function.prototype.name: 1.1.8 + has-tostringtag: 1.0.2 + is-async-function: 2.1.0 + is-date-object: 1.1.0 + is-finalizationregistry: 1.1.1 + is-generator-function: 1.1.0 + is-regex: 1.2.1 + is-weakref: 1.1.0 + isarray: 2.0.5 + which-boxed-primitive: 1.1.1 + which-collection: 1.0.2 + which-typed-array: 1.1.18 + dev: true - '@typescript-eslint/eslint-plugin@7.7.1(@typescript-eslint/parser@7.7.1)(eslint@8.57.0)(typescript@5.4.5)': + /which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.7.1 - '@typescript-eslint/type-utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.7.1 - debug: 4.3.7 - eslint: 8.57.0 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - semver: 7.6.3 - ts-api-utils: 1.4.1(typescript@5.4.5) - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.4 + dev: true - '@typescript-eslint/parser@7.7.1(eslint@8.57.0)(typescript@5.4.5)': + /which-typed-array@1.1.18: + resolution: {integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==} + engines: {node: '>= 0.4'} dependencies: - '@typescript-eslint/scope-manager': 7.7.1 - '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.7.1 - debug: 4.3.7 - eslint: 8.57.0 - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 + for-each: 0.3.3 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + dev: true - '@typescript-eslint/scope-manager@7.7.1': + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true dependencies: - '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/visitor-keys': 7.7.1 + isexe: 2.0.0 + dev: true - '@typescript-eslint/type-utils@7.7.1(eslint@8.57.0)(typescript@5.4.5)': + /why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true dependencies: - '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.7 - eslint: 8.57.0 - ts-api-utils: 1.4.1(typescript@5.4.5) - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true - '@typescript-eslint/types@7.7.1': {} + /word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + dev: true - '@typescript-eslint/typescript-estree@7.7.1(typescript@5.4.5)': - dependencies: - '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/visitor-keys': 7.7.1 - debug: 4.3.7 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.1(typescript@5.4.5) - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true - '@typescript-eslint/utils@7.7.1(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.7.1 - '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - eslint: 8.57.0 - semver: 7.6.3 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@7.7.1': - dependencies: - '@typescript-eslint/types': 7.7.1 - eslint-visitor-keys: 3.4.3 - - '@ungap/structured-clone@1.2.0': {} - - acorn-jsx@5.3.2(acorn@8.14.0): - dependencies: - acorn: 8.14.0 - - acorn@8.14.0: {} - - ajv@6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - - ansi-regex@5.0.1: {} - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - argparse@2.0.1: {} - - array-buffer-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - is-array-buffer: 3.0.4 - - array-includes@3.1.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - es-object-atoms: 1.0.0 - get-intrinsic: 1.2.4 - is-string: 1.0.7 - - array-union@2.1.0: {} - - array.prototype.findlastindex@1.2.5: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-shim-unscopables: 1.0.2 - - array.prototype.flat@1.3.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - es-shim-unscopables: 1.0.2 - - array.prototype.flatmap@1.3.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - es-shim-unscopables: 1.0.2 - - arraybuffer.prototype.slice@1.0.3: - dependencies: - array-buffer-byte-length: 1.0.1 - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - is-array-buffer: 3.0.4 - is-shared-array-buffer: 1.0.3 - - available-typed-arrays@1.0.7: - dependencies: - possible-typed-array-names: 1.0.0 - - balanced-match@1.0.2: {} - - brace-expansion@1.1.11: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - - brace-expansion@2.0.1: - dependencies: - balanced-match: 1.0.2 - - braces@3.0.3: - dependencies: - fill-range: 7.1.1 - - call-bind@1.0.7: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - set-function-length: 1.2.2 - - callsites@3.1.0: {} - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - - concat-map@0.0.1: {} - - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - data-view-buffer@1.0.1: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - data-view-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - data-view-byte-offset@1.0.0: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - debug@3.2.7: - dependencies: - ms: 2.1.3 - - debug@4.3.7: - dependencies: - ms: 2.1.3 - - deep-is@0.1.4: {} - - define-data-property@1.1.4: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - gopd: 1.0.1 - - define-properties@1.2.1: - dependencies: - define-data-property: 1.1.4 - has-property-descriptors: 1.0.2 - object-keys: 1.1.1 - - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - - doctrine@2.1.0: - dependencies: - esutils: 2.0.3 - - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - - enhanced-resolve@5.17.1: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.2.1 - - es-abstract@1.23.5: - dependencies: - array-buffer-byte-length: 1.0.1 - arraybuffer.prototype.slice: 1.0.3 - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - data-view-buffer: 1.0.1 - data-view-byte-length: 1.0.1 - data-view-byte-offset: 1.0.0 - es-define-property: 1.0.0 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-set-tostringtag: 2.0.3 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 - get-symbol-description: 1.0.2 - globalthis: 1.0.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - internal-slot: 1.0.7 - is-array-buffer: 3.0.4 - is-callable: 1.2.7 - is-data-view: 1.0.1 - is-negative-zero: 2.0.3 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.3 - is-string: 1.0.7 - is-typed-array: 1.1.13 - is-weakref: 1.0.2 - object-inspect: 1.13.3 - object-keys: 1.1.1 - object.assign: 4.1.5 - regexp.prototype.flags: 1.5.3 - safe-array-concat: 1.1.2 - safe-regex-test: 1.0.3 - string.prototype.trim: 1.2.9 - string.prototype.trimend: 1.0.8 - string.prototype.trimstart: 1.0.8 - typed-array-buffer: 1.0.2 - typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.3 - typed-array-length: 1.0.7 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 - - es-define-property@1.0.0: - dependencies: - get-intrinsic: 1.2.4 - - es-errors@1.3.0: {} - - es-object-atoms@1.0.0: - dependencies: - es-errors: 1.3.0 - - es-set-tostringtag@2.0.3: - dependencies: - get-intrinsic: 1.2.4 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - - es-shim-unscopables@1.0.2: - dependencies: - hasown: 2.0.2 - - es-to-primitive@1.2.1: - dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - - escape-string-regexp@4.0.0: {} - - eslint-import-resolver-node@0.3.9: - dependencies: - debug: 3.2.7 - is-core-module: 2.15.1 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0): - dependencies: - debug: 4.3.7 - enhanced-resolve: 5.17.1 - eslint: 8.57.0 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - fast-glob: 3.3.2 - get-tsconfig: 4.8.1 - is-core-module: 2.15.1 - is-glob: 4.0.3 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - - eslint-module-utils@2.12.0(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): - dependencies: - '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - debug: 3.2.7 - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - transitivePeerDependencies: - - supports-color - - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): - dependencies: - '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - hasown: 2.0.2 - is-core-module: 2.15.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.0 - semver: 6.3.1 - tsconfig-paths: 3.15.0 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint@8.57.0: - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.0) - '@eslint-community/regexpp': 4.12.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.3.7 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - espree@9.6.1: - dependencies: - acorn: 8.14.0 - acorn-jsx: 5.3.2(acorn@8.14.0) - eslint-visitor-keys: 3.4.3 - - esquery@1.6.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@5.3.0: {} - - esutils@2.0.3: {} - - fast-deep-equal@3.1.3: {} - - fast-glob@3.3.2: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - - fast-json-stable-stringify@2.1.0: {} - - fast-levenshtein@2.0.6: {} - - fastq@1.17.1: - dependencies: - reusify: 1.0.4 - - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - - fill-range@7.1.1: - dependencies: - to-regex-range: 5.0.1 - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat-cache@3.2.0: - dependencies: - flatted: 3.3.2 - keyv: 4.5.4 - rimraf: 3.0.2 - - flatted@3.3.2: {} - - for-each@0.3.3: - dependencies: - is-callable: 1.2.7 - - fs.realpath@1.0.0: {} - - function-bind@1.1.2: {} - - function.prototype.name@1.1.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - functions-have-names: 1.2.3 - - functions-have-names@1.2.3: {} - - get-intrinsic@1.2.4: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - - get-symbol-description@1.0.2: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - - get-tsconfig@4.8.1: - dependencies: - resolve-pkg-maps: 1.0.0 - - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - - globalthis@1.0.4: - dependencies: - define-properties: 1.2.1 - gopd: 1.0.1 - - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 - - gopd@1.0.1: - dependencies: - get-intrinsic: 1.2.4 - - graceful-fs@4.2.11: {} - - graphemer@1.4.0: {} - - has-bigints@1.0.2: {} - - has-flag@4.0.0: {} - - has-property-descriptors@1.0.2: - dependencies: - es-define-property: 1.0.0 - - has-proto@1.0.3: {} - - has-symbols@1.0.3: {} - - has-tostringtag@1.0.2: - dependencies: - has-symbols: 1.0.3 - - hasown@2.0.2: - dependencies: - function-bind: 1.1.2 - - ignore@5.3.2: {} - - import-fresh@3.3.0: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - - imurmurhash@0.1.4: {} - - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - - internal-slot@1.0.7: - dependencies: - es-errors: 1.3.0 - hasown: 2.0.2 - side-channel: 1.0.6 - - is-array-buffer@3.0.4: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - - is-async-function@2.0.0: - dependencies: - has-tostringtag: 1.0.2 - - is-bigint@1.0.4: - dependencies: - has-bigints: 1.0.2 - - is-boolean-object@1.1.2: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - - is-callable@1.2.7: {} - - is-core-module@2.15.1: - dependencies: - hasown: 2.0.2 - - is-data-view@1.0.1: - dependencies: - is-typed-array: 1.1.13 - - is-date-object@1.0.5: - dependencies: - has-tostringtag: 1.0.2 - - is-extglob@2.1.1: {} - - is-finalizationregistry@1.1.0: - dependencies: - call-bind: 1.0.7 - - is-generator-function@1.0.10: - dependencies: - has-tostringtag: 1.0.2 - - is-glob@4.0.3: - dependencies: - is-extglob: 2.1.1 - - is-map@2.0.3: {} - - is-negative-zero@2.0.3: {} - - is-number-object@1.0.7: - dependencies: - has-tostringtag: 1.0.2 - - is-number@7.0.0: {} - - is-path-inside@3.0.3: {} - - is-regex@1.1.4: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - - is-set@2.0.3: {} - - is-shared-array-buffer@1.0.3: - dependencies: - call-bind: 1.0.7 - - is-string@1.0.7: - dependencies: - has-tostringtag: 1.0.2 - - is-symbol@1.0.4: - dependencies: - has-symbols: 1.0.3 - - is-typed-array@1.1.13: - dependencies: - which-typed-array: 1.1.15 - - is-weakmap@2.0.2: {} - - is-weakref@1.0.2: - dependencies: - call-bind: 1.0.7 - - is-weakset@2.0.3: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - - isarray@2.0.5: {} - - isexe@2.0.0: {} - - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - - json-buffer@3.0.1: {} - - json-schema-traverse@0.4.1: {} - - json-stable-stringify-without-jsonify@1.0.1: {} - - json5@1.0.2: - dependencies: - minimist: 1.2.8 - - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - lodash.merge@4.6.2: {} - - merge2@1.4.1: {} - - micromatch@4.0.8: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.11 - - minimatch@9.0.5: - dependencies: - brace-expansion: 2.0.1 - - minimist@1.2.8: {} - - ms@2.1.3: {} - - natural-compare@1.4.0: {} - - object-inspect@1.13.3: {} - - object-keys@1.1.1: {} - - object.assign@4.1.5: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - has-symbols: 1.0.3 - object-keys: 1.1.1 - - object.fromentries@2.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - es-object-atoms: 1.0.0 - - object.groupby@1.0.3: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - - object.values@1.2.0: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - once@1.4.0: - dependencies: - wrappy: 1.0.2 - - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - - path-exists@4.0.0: {} - - path-is-absolute@1.0.1: {} - - path-key@3.1.1: {} - - path-parse@1.0.7: {} - - path-type@4.0.0: {} - - picomatch@2.3.1: {} - - possible-typed-array-names@1.0.0: {} - - prelude-ls@1.2.1: {} - - punycode@2.3.1: {} - - queue-microtask@1.2.3: {} - - reflect.getprototypeof@1.0.7: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - which-builtin-type: 1.2.0 - - regexp.prototype.flags@1.5.3: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-errors: 1.3.0 - set-function-name: 2.0.2 - - resolve-from@4.0.0: {} - - resolve-pkg-maps@1.0.0: {} - - resolve@1.22.8: - dependencies: - is-core-module: 2.15.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - - reusify@1.0.4: {} - - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - - run-parallel@1.2.0: - dependencies: - queue-microtask: 1.2.3 - - safe-array-concat@1.1.2: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 - isarray: 2.0.5 - - safe-regex-test@1.0.3: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-regex: 1.1.4 - - semver@6.3.1: {} - - semver@7.6.3: {} - - set-function-length@1.2.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - - set-function-name@2.0.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - functions-have-names: 1.2.3 - has-property-descriptors: 1.0.2 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - side-channel@1.0.6: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - object-inspect: 1.13.3 - - slash@3.0.0: {} - - string.prototype.trim@1.2.9: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.5 - es-object-atoms: 1.0.0 - - string.prototype.trimend@1.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - string.prototype.trimstart@1.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-bom@3.0.0: {} - - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-preserve-symlinks-flag@1.0.0: {} - - tapable@2.2.1: {} - - text-table@0.2.0: {} - - to-regex-range@5.0.1: - dependencies: - is-number: 7.0.0 - - ts-api-utils@1.4.1(typescript@5.4.5): - dependencies: - typescript: 5.4.5 - - tsconfig-paths@3.15.0: - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - - type-fest@0.20.2: {} - - typed-array-buffer@1.0.2: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-typed-array: 1.1.13 - - typed-array-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-byte-offset@1.0.3: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - reflect.getprototypeof: 1.0.7 - - typed-array-length@1.0.7: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - is-typed-array: 1.1.13 - possible-typed-array-names: 1.0.0 - reflect.getprototypeof: 1.0.7 - - typescript@5.4.5: {} - - unbox-primitive@1.0.2: - dependencies: - call-bind: 1.0.7 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - - which-boxed-primitive@1.0.2: - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - - which-builtin-type@1.2.0: - dependencies: - call-bind: 1.0.7 - function.prototype.name: 1.1.6 - has-tostringtag: 1.0.2 - is-async-function: 2.0.0 - is-date-object: 1.0.5 - is-finalizationregistry: 1.1.0 - is-generator-function: 1.0.10 - is-regex: 1.1.4 - is-weakref: 1.0.2 - isarray: 2.0.5 - which-boxed-primitive: 1.0.2 - which-collection: 1.0.2 - which-typed-array: 1.1.15 - - which-collection@1.0.2: - dependencies: - is-map: 2.0.3 - is-set: 2.0.3 - is-weakmap: 2.0.2 - is-weakset: 2.0.3 - - which-typed-array@1.1.15: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.2 - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - word-wrap@1.2.5: {} - - wrappy@1.0.2: {} + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true - yocto-queue@0.1.0: {} + /yocto-queue@1.1.1: + resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} + engines: {node: '>=12.20'} + dev: true - zod@3.23.4: {} + /zod@3.23.4: + resolution: {integrity: sha512-/AtWOKbBgjzEYYQRNfoGKHObgfAZag6qUJX1VbHo2PRBgS+wfWagEY2mizjfyAPcGesrJOcx/wcl0L9WnVrHFw==} + dev: true diff --git a/speakeasyusagegen/.speakeasy/testfiles/example.file b/speakeasyusagegen/.speakeasy/testfiles/example.file new file mode 100644 index 00000000..3b18e512 --- /dev/null +++ b/speakeasyusagegen/.speakeasy/testfiles/example.file @@ -0,0 +1 @@ +hello world diff --git a/speakeasyusagegen/src/__tests__/mockserver/testdata/example.file b/speakeasyusagegen/src/__tests__/mockserver/testdata/example.file new file mode 100644 index 00000000..3b18e512 --- /dev/null +++ b/speakeasyusagegen/src/__tests__/mockserver/testdata/example.file @@ -0,0 +1 @@ +hello world diff --git a/src/__tests__/accessgroups.test.ts b/src/__tests__/accessgroups.test.ts new file mode 100644 index 00000000..f1d5196d --- /dev/null +++ b/src/__tests__/accessgroups.test.ts @@ -0,0 +1,441 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Access Groups Read Access Group", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("readAccessGroup"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.readAccessGroup({ + idOrName: "", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + isDsyncManaged: false, + name: "my-access-group", + createdAt: "1588720733602", + teamId: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + updatedAt: "1588720733602", + accessGroupId: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + membersCount: 5, + projectsCount: 2, + }); +}); + +test("Access Groups Read Access Group Id", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("readAccessGroup-id"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.readAccessGroup({ + idOrName: "ag_1a2b3c4d5e6f7g8h9i0j", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + isDsyncManaged: false, + name: "my-access-group", + createdAt: "1588720733602", + teamId: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + updatedAt: "1588720733602", + accessGroupId: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + membersCount: 5, + projectsCount: 2, + }); +}); + +test("Access Groups Read Access Group Name", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("readAccessGroup-name"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.readAccessGroup({ + idOrName: "My Access Group", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + isDsyncManaged: false, + name: "my-access-group", + createdAt: "1588720733602", + teamId: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + updatedAt: "1588720733602", + accessGroupId: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + membersCount: 5, + projectsCount: 2, + }); +}); + +test("Access Groups Update Access Group", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateAccessGroup"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.updateAccessGroup({ + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "My access group", + projects: [], + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + name: "my-access-group", + createdAt: "1588720733602", + teamId: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + updatedAt: "1588720733602", + accessGroupId: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + membersCount: 5, + projectsCount: 2, + }); +}); + +test("Access Groups Delete Access Group", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteAccessGroup"), + bearerToken: "", + }); + + await vercel.accessGroups.deleteAccessGroup({ + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Access Groups List Access Group Members", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listAccessGroupMembers"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.listAccessGroupMembers({ + idOrName: "ag_pavWOn1iLObbXLRiwVvzmPrTWyTf", + limit: 20, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + members: [ + { + email: "Jaida_Rogahn@yahoo.com", + uid: "", + username: "Karianne_Bernier", + teamRole: "VIEWER", + }, + ], + pagination: { + count: 3878.47, + next: "", + }, + }); +}); + +test("Access Groups List Access Groups", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listAccessGroups"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.listAccessGroups({ + projectId: "prj_pavWOn1iLObbx3RowVvzmPrTWyTf", + search: "example", + membersLimit: 20, + projectsLimit: 20, + limit: 20, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Access Groups Create Access Group", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createAccessGroup"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.createAccessGroup({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "My access group", + projects: [], + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + membersCount: 591.78, + projectsCount: 3787.91, + name: "my-access-group", + createdAt: "1588720733602", + teamId: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + updatedAt: "1588720733602", + accessGroupId: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + }); +}); + +test("Access Groups List Access Group Projects", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listAccessGroupProjects"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.listAccessGroupProjects({ + idOrName: "ag_pavWOn1iLObbXLRiwVvzmPrTWyTf", + limit: 20, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + projects: [], + pagination: { + count: 7604.02, + next: "", + }, + }); +}); + +test("Access Groups Create Access Group Project", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createAccessGroupProject"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.createAccessGroupProject({ + accessGroupIdOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", + role: "ADMIN", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamId: "", + accessGroupId: "", + projectId: "", + role: "PROJECT_VIEWER", + createdAt: "", + updatedAt: "", + }); +}); + +test("Access Groups Read Access Group Project", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("readAccessGroupProject"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.readAccessGroupProject({ + accessGroupIdOrName: "", + projectId: "", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamId: "", + accessGroupId: "", + projectId: "", + role: "ADMIN", + createdAt: "", + updatedAt: "", + }); +}); + +test("Access Groups Read Access Group Project Id", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("readAccessGroupProject-id"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.readAccessGroupProject({ + accessGroupIdOrName: "ag_1a2b3c4d5e6f7g8h9i0j", + projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamId: "", + accessGroupId: "", + projectId: "", + role: "ADMIN", + createdAt: "1706854122023", + updatedAt: "1735905380072", + }); +}); + +test("Access Groups Read Access Group Project Name", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("readAccessGroupProject-name"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.readAccessGroupProject({ + accessGroupIdOrName: "My Access Group", + projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamId: "", + accessGroupId: "", + projectId: "", + role: "PROJECT_DEVELOPER", + createdAt: "1731124284693", + updatedAt: "1735836411388", + }); +}); + +test("Access Groups Update Access Group Project", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateAccessGroupProject"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.updateAccessGroupProject({ + accessGroupIdOrName: "", + projectId: "", + requestBody: { + role: "ADMIN", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamId: "", + accessGroupId: "", + projectId: "", + role: "ADMIN", + createdAt: "", + updatedAt: "", + }); +}); + +test("Access Groups Update Access Group Project Id", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateAccessGroupProject-id"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.updateAccessGroupProject({ + accessGroupIdOrName: "ag_1a2b3c4d5e6f7g8h9i0j", + projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + role: "ADMIN", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamId: "", + accessGroupId: "", + projectId: "", + role: "ADMIN", + createdAt: "1706645964469", + updatedAt: "1735872085577", + }); +}); + +test("Access Groups Update Access Group Project Name", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateAccessGroupProject-name"), + bearerToken: "", + }); + + const result = await vercel.accessGroups.updateAccessGroupProject({ + accessGroupIdOrName: "My Access Group", + projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + role: "ADMIN", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamId: "", + accessGroupId: "", + projectId: "", + role: "ADMIN", + createdAt: "1708158031858", + updatedAt: "1735838146635", + }); +}); + +test("Access Groups Delete Access Group Project Id", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteAccessGroupProject-id"), + bearerToken: "", + }); + + await vercel.accessGroups.deleteAccessGroupProject({ + accessGroupIdOrName: "ag_1a2b3c4d5e6f7g8h9i0j", + projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Access Groups Delete Access Group Project Name", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteAccessGroupProject-name"), + bearerToken: "", + }); + + await vercel.accessGroups.deleteAccessGroupProject({ + accessGroupIdOrName: "My Access Group", + projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Access Groups Delete Access Group Project", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteAccessGroupProject"), + bearerToken: "", + }); + + await vercel.accessGroups.deleteAccessGroupProject({ + accessGroupIdOrName: "", + projectId: "", + }); +}); diff --git a/src/__tests__/aliases.test.ts b/src/__tests__/aliases.test.ts new file mode 100644 index 00000000..34c14323 --- /dev/null +++ b/src/__tests__/aliases.test.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Aliases List Aliases", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listAliases"), + bearerToken: "", + }); + + const result = await vercel.aliases.listAliases({ + domain: "my-test-domain.com", + from: 1540095775951, + limit: 10, + projectId: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + since: 1540095775941, + until: 1540095775951, + rollbackDeploymentId: "dpl_XXX", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + aliases: [], + pagination: { + count: 20, + next: 1540095775951, + prev: 1540095775951, + }, + }); +}); + +test("Aliases Get Alias", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getAlias"), + bearerToken: "", + }); + + const result = await vercel.aliases.getAlias({ + from: 1540095775951, + idOrAlias: "example.vercel.app", + projectId: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + since: 1540095775941, + until: 1540095775951, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + alias: "my-alias.vercel.app", + created: new Date("2017-04-26T23:00:34.232Z"), + createdAt: 1540095775941, + creator: { + uid: "96SnxkFiMyVKsK3pnoHfx3Hz", + email: "john-doe@gmail.com", + username: "john-doe", + }, + deletedAt: 1540095775941, + deployment: { + id: "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx", + url: "my-instant-deployment-3ij3cxz9qr.now.sh", + meta: "{}", + }, + deploymentId: "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx", + projectId: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + uid: "", + updatedAt: 1540095775941, + }); +}); + +test("Aliases Delete Alias", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteAlias"), + bearerToken: "", + }); + + const result = await vercel.aliases.deleteAlias({ + aliasId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + status: "SUCCESS", + }); +}); + +test("Aliases List Deployment Aliases", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listDeploymentAliases"), + bearerToken: "", + }); + + const result = await vercel.aliases.listDeploymentAliases({ + id: "dpl_FjvFJncQHQcZMznrUm9EoB8sFuPa", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + aliases: [], + }); +}); + +test("Aliases Assign Alias", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("assignAlias"), + bearerToken: "", + }); + + const result = await vercel.aliases.assignAlias({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + alias: "my-alias.vercel.app", + redirect: null, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + uid: "2WjyKQmM8ZnGcJsPWMrHRHrE", + alias: "my-alias.vercel.app", + created: new Date("2017-04-26T23:00:34.232Z"), + oldDeploymentId: "dpl_FjvFJncQHQcZMznrUm9EoB8sFuPa", + }); +}); diff --git a/src/__tests__/artifacts.test.ts b/src/__tests__/artifacts.test.ts new file mode 100644 index 00000000..79b3a899 --- /dev/null +++ b/src/__tests__/artifacts.test.ts @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { filesToByteArray, streamToByteArray } from "./files.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Artifacts Record Events", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("recordEvents"), + bearerToken: "", + }); + + await vercel.artifacts.recordEvents({ + xArtifactClientCi: "VERCEL", + xArtifactClientInteractive: 0, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: [ + { + sessionId: "", + source: "LOCAL", + event: "HIT", + hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + duration: 400, + }, + ], + }); +}); + +test("Artifacts Status", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("status"), + bearerToken: "", + }); + + const result = await vercel.artifacts.status({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + status: "enabled", + }); +}); + +test("Artifacts Download Artifact", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("downloadArtifact"), + bearerToken: "", + }); + + const result = await vercel.artifacts.downloadArtifact({ + xArtifactClientCi: "VERCEL", + xArtifactClientInteractive: 0, + hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(new Uint8Array(await streamToByteArray(result))).toEqual( + await filesToByteArray(".speakeasy/testfiles/example.file"), + ); +}); + +test("Artifacts Artifact Exists", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("artifactExists"), + bearerToken: "", + }); + + await vercel.artifacts.artifactExists({ + hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Artifacts Artifact Query", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("artifactQuery"), + bearerToken: "", + }); + + const result = await vercel.artifacts.artifactQuery({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + hashes: [ + "12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + "34HKQaOmR5t5Uy6vasdasdasdasd", + ], + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + "key": { + error: { + message: "", + }, + }, + "key1": { + size: 9698.01, + taskDurationMs: 1946.74, + }, + "key2": { + size: 1135.95, + taskDurationMs: 5348.41, + }, + }); +}); diff --git a/src/__tests__/assertions.ts b/src/__tests__/assertions.ts new file mode 100644 index 00000000..c05351d0 --- /dev/null +++ b/src/__tests__/assertions.ts @@ -0,0 +1,13 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { fail } from "assert"; + +export function assertDefined(value: any): any { + if (value === undefined) { + fail("value is undefined"); + } + + return value; +} diff --git a/src/__tests__/authentication.test.ts b/src/__tests__/authentication.test.ts new file mode 100644 index 00000000..341ed4bd --- /dev/null +++ b/src/__tests__/authentication.test.ts @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Authentication List Auth Tokens", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listAuthTokens"), + bearerToken: "", + }); + + const result = await vercel.authentication.listAuthTokens(); + expect(result).toBeDefined(); + expect(result).toEqual({ + tokens: [ + { + id: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + name: "", + type: "oauth2-token", + origin: "github", + expiresAt: 1632816536002, + activeAt: 1632816536002, + createdAt: 1632816536002, + }, + { + id: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + name: "", + type: "oauth2-token", + origin: "github", + expiresAt: 1632816536002, + activeAt: 1632816536002, + createdAt: 1632816536002, + }, + { + id: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + name: "", + type: "oauth2-token", + origin: "github", + expiresAt: 1632816536002, + activeAt: 1632816536002, + createdAt: 1632816536002, + }, + ], + testingToken: { + id: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + name: "", + type: "oauth2-token", + origin: "github", + expiresAt: 1632816536002, + activeAt: 1632816536002, + createdAt: 1632816536002, + }, + pagination: { + count: 20, + next: 1540095775951, + prev: 1540095775951, + }, + }); +}); + +test("Authentication Create Auth Token", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createAuthToken"), + bearerToken: "", + }); + + const result = await vercel.authentication.createAuthToken({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + token: { + id: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + name: "", + type: "oauth2-token", + origin: "github", + expiresAt: 1632816536002, + activeAt: 1632816536002, + createdAt: 1632816536002, + }, + bearerToken: "uRKJSTt0L4RaSkiMj41QTkxM", + }); +}); + +test("Authentication Get Auth Token", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getAuthToken"), + bearerToken: "", + }); + + const result = await vercel.authentication.getAuthToken({ + tokenId: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + token: { + id: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + name: "", + type: "oauth2-token", + origin: "github", + expiresAt: 1632816536002, + activeAt: 1632816536002, + createdAt: 1632816536002, + }, + }); +}); + +test("Authentication Delete Auth Token", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteAuthToken"), + bearerToken: "", + }); + + const result = await vercel.authentication.deleteAuthToken({ + tokenId: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + tokenId: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + }); +}); diff --git a/src/__tests__/certs.test.ts b/src/__tests__/certs.test.ts new file mode 100644 index 00000000..f468895e --- /dev/null +++ b/src/__tests__/certs.test.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Certs Get Cert By Id", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getCertById"), + bearerToken: "", + }); + + const result = await vercel.certs.getCertById({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + createdAt: 227.13, + expiresAt: 3995.77, + autoRenew: false, + cns: [ + "", + ], + }); +}); + +test("Certs Remove Cert", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("removeCert"), + bearerToken: "", + }); + + const result = await vercel.certs.removeCert({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Certs Issue Cert", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("issueCert"), + bearerToken: "", + }); + + const result = await vercel.certs.issueCert({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: {}, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + createdAt: 1842.08, + expiresAt: 8685.41, + autoRenew: true, + cns: [], + }); +}); + +test("Certs Upload Cert", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("uploadCert"), + bearerToken: "", + }); + + const result = await vercel.certs.uploadCert({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + ca: "", + key: "", + cert: "", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + createdAt: 9219.92, + expiresAt: 5530.55, + autoRenew: true, + cns: [ + "", + "", + ], + }); +}); diff --git a/src/__tests__/checks.test.ts b/src/__tests__/checks.test.ts new file mode 100644 index 00000000..459fe1d8 --- /dev/null +++ b/src/__tests__/checks.test.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Checks Create Check", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createCheck"), + bearerToken: "", + }); + + const result = await vercel.checks.createCheck({ + deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "Performance Check", + path: "/", + blocking: true, + detailsUrl: "http://example.com", + externalId: "1234abc", + rerequestable: true, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "chk_1a2b3c4d5e6f7g8h9i0j", + name: "Performance Check", + status: "completed", + blocking: false, + integrationId: "", + deploymentId: "", + createdAt: 2396.37, + updatedAt: 1065.29, + }); +}); + +test("Checks Get All Checks", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getAllChecks"), + bearerToken: "", + }); + + const result = await vercel.checks.getAllChecks({ + deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + checks: [ + { + createdAt: 4203.11, + id: "", + integrationId: "", + name: "", + rerequestable: false, + status: "registered", + updatedAt: 4461.16, + }, + ], + }); +}); + +test("Checks Get Check", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getCheck"), + bearerToken: "", + }); + + const result = await vercel.checks.getCheck({ + deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6", + checkId: "check_2qn7PZrx89yxY34vEZPD31Y9XVj6", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + name: "", + status: "completed", + blocking: true, + integrationId: "", + deploymentId: "", + createdAt: 2039.14, + updatedAt: 676.34, + }); +}); + +test("Checks Update Check", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateCheck"), + bearerToken: "", + }); + + const result = await vercel.checks.updateCheck({ + deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6", + checkId: "check_2qn7PZrx89yxY34vEZPD31Y9XVj6", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "Performance Check", + path: "/", + detailsUrl: "https://example.com/check/run/1234abc", + output: { + metrics: { + fcp: { + value: 1200, + previousValue: 900, + source: "web-vitals", + }, + lcp: { + value: 1200, + previousValue: 1000, + source: "web-vitals", + }, + cls: { + value: 4, + previousValue: 2, + source: "web-vitals", + }, + tbt: { + value: 3000, + previousValue: 3500, + source: "web-vitals", + }, + virtualExperienceScore: { + value: 30, + previousValue: 35, + source: "web-vitals", + }, + }, + }, + externalId: "1234abc", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + name: "", + status: "completed", + blocking: true, + integrationId: "", + deploymentId: "", + createdAt: 9017.64, + updatedAt: 7909.85, + }); +}); + +test("Checks Rerequest Check", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("rerequestCheck"), + bearerToken: "", + }); + + const result = await vercel.checks.rerequestCheck({ + deploymentId: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6", + checkId: "check_2qn7PZrx89yxY34vEZPD31Y9XVj6", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); diff --git a/src/__tests__/deployments.test.ts b/src/__tests__/deployments.test.ts new file mode 100644 index 00000000..48bcc1aa --- /dev/null +++ b/src/__tests__/deployments.test.ts @@ -0,0 +1,375 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Deployments Get Deployment Events", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getDeploymentEvents"), + bearerToken: "", + }); + + await vercel.deployments.getDeploymentEvents({ + idOrUrl: "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd", + direction: "backward", + follow: 1, + limit: 100, + name: "bld_cotnkcr76", + since: 1540095775941, + until: 1540106318643, + statusCode: "5xx", + delimiter: 1, + builds: 1, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Deployments Get Deployment", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getDeployment"), + bearerToken: "", + }); + + const result = await vercel.deployments.getDeployment({ + idOrUrl: "dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ", + withGitRepoInfo: "true", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + aliasAssigned: false, + bootedAt: 2317.28, + buildingAt: 458.05, + buildSkipped: true, + creator: { + uid: "", + }, + public: true, + status: "ERROR", + id: "", + type: "LAMBDAS", + createdAt: 3161.76, + name: "", + readyState: "READY", + meta: { + "key": "", + "key1": "", + }, + regions: [], + url: "https://disloyal-backburn.info", + version: 1604.95, + }); +}); + +test("Deployments Create Deployment", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createDeployment"), + bearerToken: "", + }); + + const result = await vercel.deployments.createDeployment({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + files: [ + { + file: "folder/file.js", + }, + { + file: "folder/file.js", + }, + ], + gitMetadata: { + remoteUrl: "https://github.com/vercel/next.js", + commitAuthorName: "kyliau", + commitMessage: + "add method to measure Interaction to Next Paint (INP) (#36490)", + commitRef: "main", + commitSha: "dc36199b2234c6586ebe05ec94078a895c707e29", + dirty: true, + }, + meta: { + "foo": "bar", + }, + name: "my-instant-deployment", + project: "my-deployment-project", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + build: { + env: [], + }, + env: [ + "", + "", + "", + ], + inspectorUrl: "https://grave-dredger.com", + isInConcurrentBuildsQueue: false, + isInSystemBuildsQueue: false, + projectSettings: {}, + aliasAssigned: false, + bootedAt: 4336.60, + buildingAt: 7030.55, + buildSkipped: true, + creator: { + uid: "", + }, + public: false, + status: "QUEUED", + type: "LAMBDAS", + createdAt: 5133.44, + name: "", + id: "", + version: 1218.01, + meta: { + "key": "", + "key1": "", + }, + readyState: "INITIALIZING", + regions: [], + url: "https://apprehensive-perp.info/", + projectId: "", + ownerId: "", + routes: [ + { + src: "", + }, + { + src: "", + }, + ], + plan: "pro", + createdIn: "", + }); +}); + +test("Deployments Cancel Deployment", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("cancelDeployment"), + bearerToken: "", + }); + + const result = await vercel.deployments.cancelDeployment({ + id: "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + build: { + env: [ + "", + "", + "", + ], + }, + env: [ + "", + "", + ], + inspectorUrl: "https://concrete-gerbil.org", + isInConcurrentBuildsQueue: false, + isInSystemBuildsQueue: true, + projectSettings: {}, + aliasAssigned: false, + bootedAt: 8528.74, + buildingAt: 7590.78, + buildSkipped: false, + creator: { + uid: "", + }, + public: true, + status: "BUILDING", + id: "", + createdAt: 3071.53, + name: "", + meta: { + "key": "", + "key1": "", + "key2": "", + }, + readyState: "QUEUED", + regions: [ + "", + ], + type: "LAMBDAS", + url: "https://timely-reboot.name", + version: 6067.47, + createdIn: "", + ownerId: "", + plan: "pro", + projectId: "", + routes: [ + { + handle: "resource", + }, + { + src: "", + continue: false, + middleware: 6618.12, + }, + ], + }); +}); + +test("Deployments Upload File", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("uploadFile"), + bearerToken: "", + }); + + const result = await vercel.deployments.uploadFile({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Deployments List Deployment Files", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listDeploymentFiles"), + bearerToken: "", + }); + + const result = await vercel.deployments.listDeploymentFiles({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual([]); +}); + +test("Deployments Get Deployment File Contents", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getDeploymentFileContents"), + bearerToken: "", + }); + + await vercel.deployments.getDeploymentFileContents({ + id: "", + fileId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Deployments Get Deployments", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getDeployments"), + bearerToken: "", + }); + + const result = await vercel.deployments.getDeployments({ + app: "docs", + from: 1612948664566, + limit: 10, + projectId: "QmXGTs7mvAMMC7WW5ebrM33qKG32QK3h4vmQMjmY", + target: "production", + to: 1612948664566, + users: "kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY", + since: 1540095775941, + until: 1540095775951, + state: "BUILDING,READY", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + pagination: { + count: 20, + next: 1540095775951, + prev: 1540095775951, + }, + deployments: [ + { + uid: "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa", + name: "docs", + url: "docs-9jaeg38me.vercel.app", + created: 1609492210000, + deleted: 1609492210000, + undeleted: 1609492210000, + softDeletedByRetention: true, + source: "cli", + state: "READY", + readyState: "READY", + type: "LAMBDAS", + creator: { + uid: "eLrCnEgbKhsHyfbiNR7E8496", + email: "example@example.com", + username: "johndoe", + githubLogin: "johndoe", + gitlabLogin: "johndoe", + }, + target: "production", + createdAt: 1609492210000, + buildingAt: 1609492210000, + ready: 1609492210000, + inspectorUrl: + "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq", + }, + { + uid: "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa", + name: "docs", + url: "docs-9jaeg38me.vercel.app", + created: 1609492210000, + deleted: 1609492210000, + undeleted: 1609492210000, + softDeletedByRetention: true, + source: "cli", + state: "READY", + readyState: "READY", + type: "LAMBDAS", + creator: { + uid: "eLrCnEgbKhsHyfbiNR7E8496", + email: "example@example.com", + username: "johndoe", + githubLogin: "johndoe", + gitlabLogin: "johndoe", + }, + target: "production", + createdAt: 1609492210000, + buildingAt: 1609492210000, + ready: 1609492210000, + inspectorUrl: + "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq", + }, + ], + }); +}); + +test("Deployments Delete Deployment", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteDeployment"), + bearerToken: "", + }); + + const result = await vercel.deployments.deleteDeployment({ + id: "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd", + url: "https://files-orcin-xi.vercel.app/", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + uid: "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd", + state: "DELETED", + }); +}); diff --git a/src/__tests__/dns.test.ts b/src/__tests__/dns.test.ts new file mode 100644 index 00000000..88992df3 --- /dev/null +++ b/src/__tests__/dns.test.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Dns Create Record", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createRecord"), + bearerToken: "", + }); + + const result = await vercel.dns.createRecord({ + domain: "example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + type: "CNAME", + ttl: 60, + https: { + priority: 10, + target: "host.example.com", + params: "alpn=h2,h3", + }, + comment: "used to verify ownership of domain", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + uid: "rec_V0fra8eEgQwEpFhYG2vTzC3K", + }); +}); + +test("Dns Update Record", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateRecord"), + bearerToken: "", + }); + + const result = await vercel.dns.updateRecord({ + recordId: "rec_2qn7pzrx89yxy34vezpd31y9", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "example-1", + value: "google.com", + type: "A", + ttl: 60, + srv: { + target: "example2.com.", + weight: 97604, + port: 570172, + priority: 199524, + }, + https: { + priority: 35000, + target: "example2.com.", + }, + comment: "used to verify ownership of domain", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + creator: "", + domain: "rectangular-peninsula.net", + id: "", + name: "", + recordType: "SRV", + type: "record-sys", + value: "", + }); +}); + +test("Dns Remove Record", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("removeRecord"), + bearerToken: "", + }); + + const result = await vercel.dns.removeRecord({ + domain: "example.com", + recordId: "rec_V0fra8eEgQwEpFhYG2vTzC3K", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); diff --git a/src/__tests__/domains.test.ts b/src/__tests__/domains.test.ts new file mode 100644 index 00000000..16d7375b --- /dev/null +++ b/src/__tests__/domains.test.ts @@ -0,0 +1,306 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Domains Buy Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("buyDomain"), + bearerToken: "", + }); + + const result = await vercel.domains.buyDomain({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "example.com", + expectedPrice: 10, + renew: true, + country: "US", + orgName: "Acme Inc.", + firstName: "Jane", + lastName: "Doe", + address1: "340 S Lemon Ave Suite 4133", + city: "San Francisco", + state: "CA", + postalCode: "91789", + phone: "+1.4158551452", + email: "jane.doe@someplace.com", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + domain: { + uid: "", + ns: [ + "", + "", + "", + ], + verified: false, + created: 9374.80, + pending: false, + }, + }); +}); + +test("Domains Check Domain Price", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("checkDomainPrice"), + bearerToken: "", + }); + + const result = await vercel.domains.checkDomainPrice({ + name: "example.com", + type: "new", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + price: 20, + period: 1, + }); +}); + +test("Domains Check Domain Status", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("checkDomainStatus"), + bearerToken: "", + }); + + const result = await vercel.domains.checkDomainStatus({ + name: "example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + available: true, + }); +}); + +test("Domains Get Domain Transfer", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getDomainTransfer"), + bearerToken: "", + }); + + const result = await vercel.domains.getDomainTransfer({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + domain: "example.com", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + transferable: false, + transferPolicy: "charge-and-renew", + reason: "", + status: "completed", + }); +}); + +test("Domains Get Domain Config", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getDomainConfig"), + bearerToken: "", + }); + + const result = await vercel.domains.getDomainConfig({ + domain: "example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + misconfigured: true, + }); +}); + +test("Domains Get Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getDomain"), + bearerToken: "", + }); + + const result = await vercel.domains.getDomain({ + domain: "example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + domain: { + suffix: true, + verified: true, + nameservers: [ + "ns1.nameserver.net", + "ns2.nameserver.net", + ], + intendedNameservers: [ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com", + ], + customNameservers: [ + "ns1.nameserver.net", + "ns2.nameserver.net", + ], + creator: { + username: "vercel_user", + email: "demo@example.com", + id: "ZspSRT4ljIEEmMHgoDwKWDei", + }, + teamId: "", + boughtAt: 1613602938882, + createdAt: 1613602938882, + expiresAt: 1613602938882, + id: "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + name: "example.com", + orderedAt: 1613602938882, + renew: true, + serviceType: "zeit.world", + transferredAt: 1613602938882, + transferStartedAt: 1613602938882, + userId: "", + }, + }); +}); + +test("Domains Get Domains", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getDomains"), + bearerToken: "", + }); + + const result = await vercel.domains.getDomains({ + limit: 20, + since: 1609499532000, + until: 1612264332000, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + domains: [ + { + verified: true, + nameservers: [ + "ns1.nameserver.net", + "ns2.nameserver.net", + ], + intendedNameservers: [ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com", + ], + customNameservers: [ + "ns1.nameserver.net", + "ns2.nameserver.net", + ], + creator: { + username: "vercel_user", + email: "demo@example.com", + id: "ZspSRT4ljIEEmMHgoDwKWDei", + }, + teamId: "", + createdAt: 1613602938882, + boughtAt: 1613602938882, + expiresAt: 1613602938882, + id: "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + name: "example.com", + orderedAt: 1613602938882, + renew: true, + serviceType: "zeit.world", + transferredAt: 1613602938882, + transferStartedAt: 1613602938882, + userId: "", + }, + ], + pagination: { + count: 20, + next: 1540095775951, + prev: 1540095775951, + }, + }); +}); + +test("Domains Create Or Transfer Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createOrTransferDomain"), + bearerToken: "", + }); + + const result = await vercel.domains.createOrTransferDomain({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "example.com", + method: "transfer-in", + authCode: "fdhfr820ad#@FAdlj$$", + expectedPrice: 8, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + domain: { + verified: true, + nameservers: [ + "ns1.nameserver.net", + "ns2.nameserver.net", + ], + intendedNameservers: [ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com", + ], + customNameservers: [ + "ns1.nameserver.net", + "ns2.nameserver.net", + ], + creator: { + username: "vercel_user", + email: "demo@example.com", + id: "ZspSRT4ljIEEmMHgoDwKWDei", + }, + name: "example.com", + boughtAt: 1613602938882, + createdAt: 1613602938882, + expiresAt: 1613602938882, + id: "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + orderedAt: 1613602938882, + renew: true, + serviceType: "zeit.world", + transferredAt: 1613602938882, + transferStartedAt: 1613602938882, + userId: "", + teamId: "", + }, + }); +}); + +test("Domains Delete Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteDomain"), + bearerToken: "", + }); + + const result = await vercel.domains.deleteDomain({ + domain: "example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + uid: "rec_V0fra8eEgQwEpFhYG2vTzC3K", + }); +}); diff --git a/src/__tests__/edgeconfig.test.ts b/src/__tests__/edgeconfig.test.ts new file mode 100644 index 00000000..35e9dde7 --- /dev/null +++ b/src/__tests__/edgeconfig.test.ts @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Edge Config Get Edge Configs", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getEdgeConfigs"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.getEdgeConfigs({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual([ + { + sizeInBytes: 8239.08, + itemCount: 557.07, + }, + ]); +}); + +test("Edge Config Create Edge Config", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createEdgeConfig"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.createEdgeConfig({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + slug: "", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + sizeInBytes: 145.91, + itemCount: 5042.97, + }); +}); + +test("Edge Config Get Edge Config", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getEdgeConfig"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.getEdgeConfig({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + sizeInBytes: 3967.65, + itemCount: 7010.13, + }); +}); + +test("Edge Config Update Edge Config", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateEdgeConfig"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.updateEdgeConfig({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + slug: "", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + sizeInBytes: 5022.37, + itemCount: 211.31, + }); +}); + +test("Edge Config Delete Edge Config", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteEdgeConfig"), + bearerToken: "", + }); + + await vercel.edgeConfig.deleteEdgeConfig({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Edge Config Get Edge Config Items", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getEdgeConfigItems"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.getEdgeConfigItems({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + key: "", + value: "5002.95", + edgeConfigId: "", + createdAt: 9069.68, + updatedAt: 6276.41, + }); +}); + +test("Edge Config Get Edge Config Schema", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getEdgeConfigSchema"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.getEdgeConfigSchema({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Edge Config Patch Edge Config Schema", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("patchEdgeConfigSchema"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.patchEdgeConfigSchema({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + definition: "", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Edge Config Delete Edge Config Schema", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteEdgeConfigSchema"), + bearerToken: "", + }); + + await vercel.edgeConfig.deleteEdgeConfigSchema({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Edge Config Get Edge Config Item", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getEdgeConfigItem"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.getEdgeConfigItem({ + edgeConfigId: "", + edgeConfigItemKey: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + key: "", + value: "9966.77", + edgeConfigId: "", + createdAt: 1621.85, + updatedAt: 3034.44, + }); +}); + +test("Edge Config Get Edge Config Tokens", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getEdgeConfigTokens"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.getEdgeConfigTokens({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + token: "", + label: "", + id: "", + edgeConfigId: "", + createdAt: 7692.35, + }); +}); + +test("Edge Config Delete Edge Config Tokens", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteEdgeConfigTokens"), + bearerToken: "", + }); + + await vercel.edgeConfig.deleteEdgeConfigTokens({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + tokens: [], + }, + }); +}); + +test("Edge Config Get Edge Config Token", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getEdgeConfigToken"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.getEdgeConfigToken({ + edgeConfigId: "", + token: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + token: "", + label: "", + id: "", + edgeConfigId: "", + createdAt: 3597.77, + }); +}); + +test("Edge Config Create Edge Config Token", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createEdgeConfigToken"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.createEdgeConfigToken({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + label: "", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + token: "", + id: "", + }); +}); + +test("Edge Config Get Edge Config Backups", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getEdgeConfigBackups"), + bearerToken: "", + }); + + const result = await vercel.edgeConfig.getEdgeConfigBackups({ + edgeConfigId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + backups: [ + { + id: "", + lastModified: 2424.25, + }, + { + id: "", + lastModified: 1518.43, + }, + ], + pagination: { + hasNext: true, + }, + }); +}); diff --git a/src/__tests__/environment.test.ts b/src/__tests__/environment.test.ts new file mode 100644 index 00000000..6370e559 --- /dev/null +++ b/src/__tests__/environment.test.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Environment Post /V1 /Projects/{id Or Name}/custom Environments", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient( + "post_/v1/projects/{idOrName}/custom-environments", + ), + bearerToken: "", + }); + + const result = await vercel.environment + .postV1ProjectsIdOrNameCustomEnvironments({ + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Environment Get /V9 /Projects/{id Or Name}/custom Environments", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient( + "get_/v9/projects/{idOrName}/custom-environments", + ), + bearerToken: "", + }); + + const result = await vercel.environment + .getV9ProjectsIdOrNameCustomEnvironments({ + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + environments: [], + }); +}); + +test("Environment Get /V9 /Projects/{id Or Name}/custom Environments/{environment Slug Or Id}", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient( + "get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + ), + bearerToken: "", + }); + + const result = await vercel.environment + .getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({ + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Environment Patch /V9 /Projects/{id Or Name}/custom Environments/{environment Slug Or Id}", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient( + "patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + ), + bearerToken: "", + }); + + const result = await vercel.environment + .patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({ + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Environment Delete /V9 /Projects/{id Or Name}/custom Environments/{environment Slug Or Id}", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient( + "delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + ), + bearerToken: "", + }); + + const result = await vercel.environment + .deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({ + idOrName: "", + environmentSlugOrId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); diff --git a/src/__tests__/files.ts b/src/__tests__/files.ts new file mode 100644 index 00000000..f9995775 --- /dev/null +++ b/src/__tests__/files.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { createReadStream } from "node:fs"; +import { readFile } from "node:fs/promises"; +import { Readable } from "node:stream"; + +export function filesToStream(filePath: string): ReadableStream { + return Readable.toWeb( + createReadStream(filePath), + ) as ReadableStream; +} + +export async function filesToByteArray(filePath: string): Promise { + return new Uint8Array(await readFile(filePath)); +} + +export async function filesToString(filePath: string): Promise { + return readFile(filePath, "utf8"); +} + +export async function streamToByteArray( + stream?: ReadableStream, +): Promise { + if (!stream) { + return Buffer.from(""); + } + + const chunks = []; + const reader = stream.getReader(); + + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; + if (res.value) { + chunks.push(res.value); + } + } + + return Buffer.concat(chunks); +} + +export function bytesToStream(bytes: Uint8Array): ReadableStream { + return new ReadableStream({ + start(controller) { + controller.enqueue(bytes); + }, + pull(controller) { + controller.close(); + }, + cancel() { + }, + }); +} diff --git a/src/__tests__/integrations.test.ts b/src/__tests__/integrations.test.ts new file mode 100644 index 00000000..b0c3d0b6 --- /dev/null +++ b/src/__tests__/integrations.test.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Integrations Get Configuration", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getConfiguration"), + bearerToken: "", + }); + + const result = await vercel.integrations.getConfiguration({ + id: "icfg_cuwj0AdCdH3BwWT4LPijCC7t", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + completedAt: 1558531915505, + createdAt: 1558531915505, + id: "icfg_3bwCLgxL8qt5kjRLcv2Dit7F", + integrationId: "oac_xzpVzcUOgcB1nrVlirtKhbWV", + ownerId: "kr1PsOIzqEL5Xg6M4VZcZosf", + projects: [ + "prj_xQxbutw1HpL6HLYPAzt5h75m8NjO", + ], + source: "marketplace", + slug: "slack", + teamId: "team_nLlpyC6RE1qxydlFKbrxDlud", + type: "integration-configuration", + updatedAt: 1558531915505, + userId: "kr1PsOIzqEL5Xg6M4VZcZosf", + scopes: [ + "read:project", + "read-write:log-drain", + ], + disabledAt: 1558531915505, + deletedAt: 1558531915505, + deleteRequestedAt: 1558531915505, + }); +}); + +test("Integrations Delete Configuration", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteConfiguration"), + bearerToken: "", + }); + + await vercel.integrations.deleteConfiguration({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Integrations Git Namespaces", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("gitNamespaces"), + bearerToken: "", + }); + + const result = await vercel.integrations.gitNamespaces({ + host: "ghes-test.now.systems", + }); + expect(result).toBeDefined(); + expect(result).toEqual([ + { + provider: "", + slug: "", + id: "8350.19", + ownerType: "", + }, + { + provider: "", + slug: "", + id: "4647.99", + ownerType: "", + }, + ]); +}); + +test("Integrations Search Repo", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("searchRepo"), + bearerToken: "", + }); + + const result = await vercel.integrations.searchRepo({ + host: "ghes-test.now.systems", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); diff --git a/src/__tests__/logdrains.test.ts b/src/__tests__/logdrains.test.ts new file mode 100644 index 00000000..5a06a90c --- /dev/null +++ b/src/__tests__/logdrains.test.ts @@ -0,0 +1,220 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Logdrains Get Integration Log Drains", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getIntegrationLogDrains"), + bearerToken: "", + }); + + const result = await vercel.logDrains.getIntegrationLogDrains({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual([]); +}); + +test("Logdrains Create Log Drain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createLogDrain"), + bearerToken: "", + }); + + const result = await vercel.logDrains.createLogDrain({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "My first log drain", + secret: "a1Xsfd325fXcs", + deliveryFormat: "json", + url: "https://example.com/log-drain", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + clientId: "oac_xRhY4LAB7yLhUADD69EvV7ct", + configurationId: "icfg_cuwj0AdCdH3BwWT4LPijCC7t", + createdAt: 1558531915505, + id: "ld_nBuA7zCID8g4QZ8g", + deliveryFormat: "json", + name: "My first log drain", + ownerId: "kr1PsOIzqEL5Xg6M4VZcZosf", + projectId: "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb", + projectIds: [ + "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb", + ], + url: "https://example.com/log-drain", + sources: [ + "external", + ], + createdFrom: "integration", + headers: { + "0": "{", + "1": "\"", + "2": "A", + "3": "u", + "4": "t", + "5": "h", + "6": "o", + "7": "r", + "8": "i", + "9": "z", + "10": "a", + "11": "t", + "12": "i", + "13": "o", + "14": "n", + "15": "\"", + "16": ":", + "17": " ", + "18": "\"", + "19": "B", + "20": "e", + "21": "a", + "22": "r", + "23": "e", + "24": "r", + "25": " ", + "26": "1", + "27": "2", + "28": "3", + "29": "\"", + "30": "}", + }, + environments: [ + "production", + ], + branch: "feature/*", + samplingRate: 0.5, + }); +}); + +test("Logdrains Delete Integration Log Drain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteIntegrationLogDrain"), + bearerToken: "", + }); + + await vercel.logDrains.deleteIntegrationLogDrain({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Logdrains Get Configurable Log Drain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getConfigurableLogDrain"), + bearerToken: "", + }); + + const result = await vercel.logDrains.getConfigurableLogDrain({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + deliveryFormat: "json", + url: "https://pleasant-beret.com/", + name: "", + ownerId: "", + createdAt: 9979.70, + deletedAt: 2589.89, + updatedAt: 1929.64, + environments: [ + "production", + "production", + ], + secret: "", + }); +}); + +test("Logdrains Delete Configurable Log Drain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteConfigurableLogDrain"), + bearerToken: "", + }); + + await vercel.logDrains.deleteConfigurableLogDrain({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Logdrains Get All Log Drains", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getAllLogDrains"), + bearerToken: "", + }); + + const result = await vercel.logDrains.getAllLogDrains({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual([ + { + id: "", + deliveryFormat: "json", + url: "https://perfumed-director.net/", + name: "", + ownerId: "", + createdAt: 5878.41, + deletedAt: 1366.34, + updatedAt: 8559.11, + environments: [ + "production", + ], + }, + ]); +}); + +test("Logdrains Create Configurable Log Drain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createConfigurableLogDrain"), + bearerToken: "", + }); + + const result = await vercel.logDrains.createConfigurableLogDrain({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + deliveryFormat: "json", + url: "https://sugary-technician.name", + sources: [ + "external", + ], + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + deliveryFormat: "json", + url: "https://close-dividend.biz", + name: "", + ownerId: "", + createdAt: 911.21, + deletedAt: 5254.68, + updatedAt: 3248.86, + environments: [ + "preview", + "production", + ], + }); +}); diff --git a/src/__tests__/marketplace.test.ts b/src/__tests__/marketplace.test.ts new file mode 100644 index 00000000..61ecba4c --- /dev/null +++ b/src/__tests__/marketplace.test.ts @@ -0,0 +1,262 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Marketplace Get Account Info", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("get-account-info"), + bearerToken: "", + }); + + const result = await vercel.marketplace.getAccountInfo({ + integrationConfigurationId: "", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + url: "https://friendly-pleasure.info", + contact: { + email: "Horace_Bernhard@yahoo.com", + }, + }); +}); + +test("Marketplace Get Member", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("get-member"), + bearerToken: "", + }); + + const result = await vercel.marketplace.getMember({ + integrationConfigurationId: "", + memberId: "", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + role: "ADMIN", + }); +}); + +test("Marketplace Create Event", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("create-event"), + bearerToken: "", + }); + + await vercel.marketplace.createEvent({ + integrationConfigurationId: "", + requestBody: { + event: { + type: "installation.updated", + }, + }, + }); +}); + +test("Marketplace Submit Billing Data", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("submit-billing-data"), + bearerToken: "", + }); + + await vercel.marketplace.submitBillingData({ + integrationConfigurationId: "", + requestBody: { + timestamp: new Date("2024-09-29T02:38:01.476Z"), + eod: new Date("2022-12-28T23:46:57.523Z"), + period: { + start: new Date("2022-06-25T19:04:50.518Z"), + end: new Date("2023-10-18T01:18:36.230Z"), + }, + billing: { + items: [ + { + billingPlanId: "", + name: "", + price: "161.25", + quantity: 8824.47, + units: "", + total: "", + }, + ], + }, + usage: [ + { + resourceId: "", + name: "", + type: "rate", + units: "", + dayValue: 9439.21, + periodValue: 6958.71, + }, + { + resourceId: "", + name: "", + type: "total", + units: "", + dayValue: 9892.22, + periodValue: 4749.62, + }, + { + resourceId: "", + name: "", + type: "rate", + units: "", + dayValue: 7119.53, + periodValue: 6310.47, + }, + ], + }, + }); +}); + +test("Marketplace Submit Invoice", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("submit-invoice"), + bearerToken: "", + }); + + const result = await vercel.marketplace.submitInvoice({ + integrationConfigurationId: "", + requestBody: { + invoiceDate: new Date("2022-06-05T08:54:16.353Z"), + period: { + start: new Date("2022-07-26T14:15:15.601Z"), + end: new Date("2024-10-08T09:35:48.520Z"), + }, + items: [ + { + billingPlanId: "", + name: "", + price: "905.89", + quantity: 1684.76, + units: "", + total: "", + }, + { + billingPlanId: "", + name: "", + price: "84.05", + quantity: 9130.94, + units: "", + total: "", + }, + ], + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Marketplace Get Invoice", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("get-invoice"), + bearerToken: "", + }); + + const result = await vercel.marketplace.getInvoice({ + integrationConfigurationId: "", + invoiceId: "", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + invoiceId: "", + invoiceDate: "", + period: { + start: "", + end: "", + }, + items: [ + { + billingPlanId: "", + name: "", + price: "317.28", + quantity: 1022.19, + units: "", + total: "", + }, + ], + total: "", + created: "", + updated: "", + state: "scheduled", + test: false, + }); +}); + +test("Marketplace Update Invoice", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("update-invoice"), + bearerToken: "", + }); + + await vercel.marketplace.updateInvoice({ + integrationConfigurationId: "", + invoiceId: "", + requestBody: { + action: "refund", + reason: "", + total: "", + }, + }); +}); + +test("Marketplace Update Resource Secrets", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("update-resource-secrets"), + bearerToken: "", + }); + + await vercel.marketplace.updateResourceSecrets({ + integrationConfigurationId: "", + integrationProductIdOrSlug: "", + resourceId: "", + requestBody: { + secrets: [], + }, + }); +}); + +test("Marketplace Update Resource Secrets By Id", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("update-resource-secrets-by-id"), + bearerToken: "", + }); + + await vercel.marketplace.updateResourceSecretsById({ + integrationConfigurationId: "", + resourceId: "", + }); +}); + +test("Marketplace Exchange Sso Token", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("exchange-sso-token"), + }); + + const result = await vercel.marketplace.exchangeSsoToken({ + code: "", + clientId: "", + clientSecret: "", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + idToken: "", + accessToken: "", + tokenType: "", + }); +}); diff --git a/src/__tests__/mockserver/Dockerfile b/src/__tests__/mockserver/Dockerfile new file mode 100644 index 00000000..efdea18c --- /dev/null +++ b/src/__tests__/mockserver/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.23 + +WORKDIR /usr/src/app + +COPY go.mod go.sum ./ +RUN go mod download && go mod verify +COPY . . +COPY *testdata /usr/local/bin/testdata +RUN go build -v -o /usr/local/bin/mockserver . +EXPOSE 18080 +ENTRYPOINT ["mockserver"] diff --git a/src/__tests__/mockserver/Makefile b/src/__tests__/mockserver/Makefile new file mode 100644 index 00000000..2ae6a36c --- /dev/null +++ b/src/__tests__/mockserver/Makefile @@ -0,0 +1,18 @@ +.PHONY: start + +start: + @if command -v docker >/dev/null 2>&1; then \ + echo "Starting mock server with Docker..."; \ + docker build -t mockserver . && \ + docker run -i -p 18080:18080 -t --rm mockserver; \ + elif command -v go >/dev/null 2>&1; then \ + echo "Docker not found. Starting mock server with Go..."; \ + go run .; \ + else \ + echo "Neither Docker nor Go found. To run the mock server:"; \ + echo "\nOption 1 - Using Docker:"; \ + echo " docker build -t mockserver ."; \ + echo " docker run -i -p 18080:18080 -t --rm mockserver"; \ + echo "\nOption 2 - Using Go:"; \ + echo " go run ."; \ + fi diff --git a/src/__tests__/mockserver/README.md b/src/__tests__/mockserver/README.md new file mode 100644 index 00000000..15b9edc9 --- /dev/null +++ b/src/__tests__/mockserver/README.md @@ -0,0 +1,52 @@ +# Speakeasy Mock Server + +A generated HTTP mock server based on your OpenAPI Specification (OAS). Use this mock server for integration and contract testing. + +## Usage + +The server can be built and started via the [Go programming language toolchain](https://go.dev/) or [Docker](https://www.docker.com/). + +If you have Go installed, start the server directly via: + +```shell +go run . +``` + +Otherwise, if you have Docker installed, build and run the server via: + +```shell +docker build -t mockserver . +docker run -i -p 18080:18080 -t --rm mockserver +``` + +By default, the server runs on port `18080`. + +### Server Paths + +The server contains generated paths from the OAS and the following additional built-in paths. + +| Path | Description | +|---|---| +| [`/_mockserver/health`](https://localhost:18080/_mockserver/health) | verify server is running | +| [`/_mockserver/log`](https://localhost:18080/_mockserver/log) | view per-OAS-operation logs | + +Any request outside the generated and built-in paths will return a `404 Not Found` response. + +### Server Customization + +The server supports the following flags for customization. + +| Flag | Default | Description | +|---|---|---| +| `-address` | `:18080` | server listen address | +| `-log-format` | `text` | logging format (supported: `JSON`, `text`) | +| `-log-level` | `INFO` | logging level (supported: `DEBUG`, `INFO`, `WARN`, `ERROR`) | + +For example, enabling server debug logging: + +```shell +# via `go run` +go run . -log-level=DEBUG +# via `docker run` +docker run -i -p 18080:18080 -t --rm mockserver -log-level=DEBUG +``` diff --git a/src/__tests__/mockserver/go.mod b/src/__tests__/mockserver/go.mod new file mode 100644 index 00000000..38b2d5e8 --- /dev/null +++ b/src/__tests__/mockserver/go.mod @@ -0,0 +1,15 @@ +module mockserver + +go 1.22 + +require ( + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/go-pkgz/expirable-cache/v3 v3.0.0 + github.com/gorilla/mux v1.8.1 +) + +require ( + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/stretchr/testify v1.9.0 // indirect +) diff --git a/src/__tests__/mockserver/go.sum b/src/__tests__/mockserver/go.sum new file mode 100644 index 00000000..fa86a5fc --- /dev/null +++ b/src/__tests__/mockserver/go.sum @@ -0,0 +1,16 @@ +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw= +github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ= +github.com/go-pkgz/expirable-cache/v3 v3.0.0 h1:u3/gcu3sabLYiTCevoRKv+WzjIn5oo7P8XtiXBeRDLw= +github.com/go-pkgz/expirable-cache/v3 v3.0.0/go.mod h1:2OQiDyEGQalYecLWmXprm3maPXeVb5/6/X7yRPYTzec= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/src/__tests__/mockserver/internal/handler/assert/contenttype.go b/src/__tests__/mockserver/internal/handler/assert/contenttype.go new file mode 100644 index 00000000..42afbd06 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/assert/contenttype.go @@ -0,0 +1,99 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +import ( + "fmt" + "mime" + "net/http" + "strings" +) + +func ContentType(req *http.Request, expected string, isRequired bool) error { + got := req.Header.Get("Content-Type") + + if got == "" { + if isRequired { + return fmt.Errorf("expected Content-Type to be set, got: %s", got) + } + return nil + } + + mimeType, _, err := mime.ParseMediaType(got) + if err != nil { + return fmt.Errorf("got Content-Type %s is invalid: %w", got, err) + } + + expectedMimeType, _, err := mime.ParseMediaType(expected) + if err != nil { + return fmt.Errorf("expected Content-Type %s is invalid: %w", expected, err) + } + + if mimeType != expectedMimeType { + return fmt.Errorf( + "expected Content-Type to be %s, got: %s", + expected, + got, + ) + } + + return nil +} + +func AcceptHeader(req *http.Request, expectedValues []string) error { + if len(expectedValues) == 0 { + return nil + } + + gotAccept := req.Header.Get("Accept") + + gotValues := strings.Split(gotAccept, ",") + + for i, gotValue := range gotValues { + mimeType := strings.Split(strings.TrimSpace(gotValue), ";")[0] + + gotMimeType, _, err := mime.ParseMediaType(mimeType) + if err != nil { + return fmt.Errorf("got Accept value %s is invalid: %w", gotValue, err) + } + + gotValues[i] = gotMimeType + } + + allFound := true + + parsedExpectedValues := make([]string, len(expectedValues)) + + for i, expected := range expectedValues { + mimeType := strings.Split(expected, ";")[0] + + expectedMimeType, _, err := mime.ParseMediaType(mimeType) + if err != nil { + return fmt.Errorf("expected Accept value %s is invalid: %w", expected, err) + } + + parsedExpectedValues[i] = expectedMimeType + } + + for _, gotValue := range gotValues { + found := false + + for _, expected := range parsedExpectedValues { + if expected == gotValue { + found = true + break + } + } + + if !found { + allFound = false + break + } + } + + if !allFound { + return fmt.Errorf("expected Accept value to be one of %s, got: %s", strings.Join(parsedExpectedValues, ", "), gotAccept) + } + + return nil +} diff --git a/src/__tests__/mockserver/internal/handler/assert/header.go b/src/__tests__/mockserver/internal/handler/assert/header.go new file mode 100644 index 00000000..50f910d9 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/assert/header.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +import ( + "fmt" + "net/http" +) + +// HeaderExists generically verifies the given request header name exists with +// a single, non-empty value. If an unexpected value is found, it will return an +// error with a diagnostic text body and which should cause the handler to return +// immediately. +func HeaderExists(req *http.Request, name string) error { + values := req.Header.Values(name) + + if len(values) == 0 { + return fmt.Errorf("missing expected header %s", name) + } + + if len(values) > 1 { + return fmt.Errorf("expected single header for %s, got %d values", name, len(values)) + } + + got := values[0] + + if got == "" { + return fmt.Errorf("expected non-empty header %s", name) + } + + return nil +} + +// HeaderValues generically verifies the given request header name has the +// expected values. If an unexpected value is found, it will return an error +// with a diagnostic text body and which should cause the handler to return +// immediately. +func HeaderValues(req *http.Request, name string, expected []string) error { + got := req.Header.Values(name) + + if len(got) == 0 { + return fmt.Errorf( + "missing expected header %s which should be %v", + name, + expected, + ) + } + + if len(got) != len(expected) { + return fmt.Errorf( + "expected header %s to be %v, got: %v", + name, + expected, + got, + ) + } + + for index, expectedValue := range expected { + if got[index] != expectedValue { + return fmt.Errorf( + "expected header %s to be %v, got: %v", + name, + expected, + got, + ) + } + } + + return nil +} diff --git a/src/__tests__/mockserver/internal/handler/assert/parameter.go b/src/__tests__/mockserver/internal/handler/assert/parameter.go new file mode 100644 index 00000000..f8a5e45a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/assert/parameter.go @@ -0,0 +1,110 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +import ( + "fmt" + "net/http" + "net/url" +) + +// ParameterHeaderValues verifies the request header parameter key has the +// expected multiple values. If an unexpected value is found, it will return an +// error with a diagnostic text body and which should cause the handler to +// return immediately. +func ParameterHeaderValues(req *http.Request, key string, expected []string) error { + got := req.Header.Values(key) + + if len(got) == 0 { + return fmt.Errorf( + "missing expected header parameter %s which should be %v", + key, + expected, + ) + } + + if len(got) != len(expected) { + return fmt.Errorf( + "expected header parameter %s to be %s, got: %v", + key, + expected, + got, + ) + } + + for index, expectedValue := range expected { + if got[index] != expectedValue { + return fmt.Errorf( + "expected header parameter %s to be %v, got: %v", + key, + expected, + got, + ) + } + } + + return nil +} + +// ParameterPathValue verifies the request path parameter key has the expected +// value. If an unexpected value is found, it will return an error with +// a diagnostic text body and which should cause the handler to +// return immediately. +func ParameterPathValue(req *http.Request, key string, expected string) error { + got := req.PathValue(key) + + if got != expected { + return fmt.Errorf( + "expected path parameter %s to be %s, got: %s", + key, + expected, + got, + ) + } + + return nil +} + +// ParameterQueryValues verifies the request query parameter key has the +// expected multiple values. If an unexpected value is found, it will return an +// error with a diagnostic text body and which should cause the handler to +// return immediately. +func ParameterQueryValues(req *http.Request, key string, expected []string) error { + queryValues, err := url.ParseQuery(req.URL.RawQuery) + + if err != nil { + return fmt.Errorf("error parsing query parameters: %w", err) + } + + got, ok := queryValues[key] + + if !ok || len(got) == 0 { + return fmt.Errorf( + "missing expected query parameter %s which should be %v", + key, + expected, + ) + } + + if len(got) != len(expected) { + return fmt.Errorf( + "expected query parameter %s to be %s, got: %v", + key, + expected, + got, + ) + } + + for index, expectedValue := range expected { + if got[index] != expectedValue { + return fmt.Errorf( + "expected query parameter %s to be %v, got: %v", + key, + expected, + got, + ) + } + } + + return nil +} diff --git a/src/__tests__/mockserver/internal/handler/assert/pointer.go b/src/__tests__/mockserver/internal/handler/assert/pointer.go new file mode 100644 index 00000000..fa03e4c8 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/assert/pointer.go @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +// Pointer returns a pointer to the given value. +// +// This is intended to simplify inline builtin value expressions that are not +// implemented in the Go language specification, such as a hypothetical +// &"example". +func Pointer[T any](v T) *T { + return &v +} diff --git a/src/__tests__/mockserver/internal/handler/assert/security.go b/src/__tests__/mockserver/internal/handler/assert/security.go new file mode 100644 index 00000000..7d0a714a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/assert/security.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +import ( + "errors" + "fmt" + "net/http" + "strings" +) + +// SecurityAuthorizationHeader verifies the request security Authorization +// header is present and has the expected HTTP Authorization scheme with a value +// if required. If a missing value or multiple values are found, it will +// return an error with a diagnostic text body and which should cause the +// handler to return immediately. +func SecurityAuthorizationHeader(req *http.Request, optional bool, httpAuthorizationScheme string) error { + values := req.Header.Values("Authorization") + + if len(values) == 0 { + if optional { + return nil + } + + return errors.New("missing expected Authorization header") + } + + if len(values) > 1 { + return fmt.Errorf("expected single Authorization header, got %d values", len(values)) + } + + got := values[0] + + if got == "" { + // Should return error, even if optional, as that represents an errant + // client implementation. + return errors.New("expected non-empty Authorization header") + } + + if httpAuthorizationScheme != "" && !strings.HasPrefix(got, httpAuthorizationScheme+" ") { + return fmt.Errorf("expected HTTP Authorization scheme %s, got: %s", httpAuthorizationScheme, got) + } + + return nil +} + +// SecurityHeader verifies the request security header name is present and has +// a value if required. If a missing value or multiple values are found, it will +// return an error with a diagnostic text body and which should cause the +// handler to return immediately. +func SecurityHeader(req *http.Request, name string, optional bool) error { + values := req.Header.Values(name) + + if len(values) == 0 { + if optional { + return nil + } + + return fmt.Errorf("missing expected security header %s", name) + } + + if len(values) > 1 { + return fmt.Errorf("expected single security header for %s, got %d values", name, len(values)) + } + + got := values[0] + + if got == "" { + // Should return error, even if optional, as that represents an errant + // client implementation. + return fmt.Errorf("expected non-empty security header %s", name) + } + + return nil +} diff --git a/src/__tests__/mockserver/internal/handler/doc.go b/src/__tests__/mockserver/internal/handler/doc.go new file mode 100644 index 00000000..a4e60c89 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/doc.go @@ -0,0 +1,5 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +// Package handlers contains all generated HTTP handlers for the server. They +// are listed via the generated GeneratedHandlers() function. +package handler diff --git a/src/__tests__/mockserver/internal/handler/generated_handler.go b/src/__tests__/mockserver/internal/handler/generated_handler.go new file mode 100644 index 00000000..929558ef --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/generated_handler.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "context" + "net/http" +) + +// GeneratedHandler is the type that encapsulates a generated handler. +type GeneratedHandler struct { + // HTTP request handler function. + handlerFunc http.HandlerFunc + + // HTTP method, such as GET. + Method string + + // URL path, such as /path. + Path string +} + +// NewGeneratedHandler creates a generated handler via method, path, and handler +// function. +func NewGeneratedHandler(ctx context.Context, method string, path string, handlerFunc http.HandlerFunc) *GeneratedHandler { + return &GeneratedHandler{ + handlerFunc: handlerFunc, + Method: method, + Path: path, + } +} + +// HandlerFunc returns the underlying HTTP handler function. +func (h GeneratedHandler) HandlerFunc() http.HandlerFunc { + return h.handlerFunc +} diff --git a/src/__tests__/mockserver/internal/handler/generated_handlers.go b/src/__tests__/mockserver/internal/handler/generated_handlers.go new file mode 100644 index 00000000..ea793888 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/generated_handlers.go @@ -0,0 +1,156 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "context" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +// GeneratedHandlers returns all generated handlers. +func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) []*GeneratedHandler { + return []*GeneratedHandler{ + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/access-groups/{accessGroupIdOrName}/projects/{projectId}", pathDeleteV1AccessGroupsAccessGroupIDOrNameProjectsProjectID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/access-groups/{idOrName}", pathDeleteV1AccessGroupsIDOrName(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/edge-config/{edgeConfigId}", pathDeleteV1EdgeConfigEdgeConfigID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/edge-config/{edgeConfigId}/schema", pathDeleteV1EdgeConfigEdgeConfigIDSchema(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/edge-config/{edgeConfigId}/tokens", pathDeleteV1EdgeConfigEdgeConfigIDTokens(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/integrations/configuration/{id}", pathDeleteV1IntegrationsConfigurationID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/integrations/log-drains/{id}", pathDeleteV1IntegrationsLogDrainsID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/log-drains/{id}", pathDeleteV1LogDrainsID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/projects/{idOrName}/members/{uid}", pathDeleteV1ProjectsIDOrNameMembersUID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/security/firewall/bypass", pathDeleteV1SecurityFirewallBypass(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/teams/{teamId}", pathDeleteV1TeamsTeamID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/teams/{teamId}/invites/{inviteId}", pathDeleteV1TeamsTeamIDInvitesInviteID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/teams/{teamId}/members/{uid}", pathDeleteV1TeamsTeamIDMembersUID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/user", pathDeleteV1User(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v1/webhooks/{id}", pathDeleteV1WebhooksID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v13/deployments/{id}", pathDeleteV13DeploymentsID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v2/aliases/{aliasId}", pathDeleteV2AliasesAliasID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v2/domains/{domain}/records/{recordId}", pathDeleteV2DomainsDomainRecordsRecordID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v3/user/tokens/{tokenId}", pathDeleteV3UserTokensTokenID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v6/domains/{domain}", pathDeleteV6DomainsDomain(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v7/certs/{id}", pathDeleteV7CertsID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v9/projects/{idOrName}", pathDeleteV9ProjectsIDOrName(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", pathDeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v9/projects/{idOrName}/domains/{domain}", pathDeleteV9ProjectsIDOrNameDomainsDomain(dir, rt)), + NewGeneratedHandler(ctx, http.MethodDelete, "/v9/projects/{idOrName}/env/{id}", pathDeleteV9ProjectsIDOrNameEnvID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/access-groups", pathGetV1AccessGroups(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/access-groups/{accessGroupIdOrName}/projects/{projectId}", pathGetV1AccessGroupsAccessGroupIDOrNameProjectsProjectID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/access-groups/{idOrName}", pathGetV1AccessGroupsIDOrName(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/access-groups/{idOrName}/members", pathGetV1AccessGroupsIDOrNameMembers(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/access-groups/{idOrName}/projects", pathGetV1AccessGroupsIDOrNameProjects(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/deployments/{deploymentId}/checks", pathGetV1DeploymentsDeploymentIDChecks(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/deployments/{deploymentId}/checks/{checkId}", pathGetV1DeploymentsDeploymentIDChecksCheckID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/domains/{domain}/registry", pathGetV1DomainsDomainRegistry(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/edge-config", pathGetV1EdgeConfig(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/edge-config/{edgeConfigId}", pathGetV1EdgeConfigEdgeConfigID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/edge-config/{edgeConfigId}/backups", pathGetV1EdgeConfigEdgeConfigIDBackups(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/edge-config/{edgeConfigId}/item/{edgeConfigItemKey}", pathGetV1EdgeConfigEdgeConfigIDItemEdgeConfigItemKey(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/edge-config/{edgeConfigId}/items", pathGetV1EdgeConfigEdgeConfigIDItems(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/edge-config/{edgeConfigId}/schema", pathGetV1EdgeConfigEdgeConfigIDSchema(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/edge-config/{edgeConfigId}/token/{token}", pathGetV1EdgeConfigEdgeConfigIDTokenToken(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/edge-config/{edgeConfigId}/tokens", pathGetV1EdgeConfigEdgeConfigIDTokens(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/installations/{integrationConfigurationId}/account", pathGetV1InstallationsIntegrationConfigurationIDAccount(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}", pathGetV1InstallationsIntegrationConfigurationIDBillingInvoicesInvoiceID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/installations/{integrationConfigurationId}/member/{memberId}", pathGetV1InstallationsIntegrationConfigurationIDMemberMemberID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/integrations/configuration/{id}", pathGetV1IntegrationsConfigurationID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/integrations/git-namespaces", pathGetV1IntegrationsGitNamespaces(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/integrations/search-repo", pathGetV1IntegrationsSearchRepo(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/log-drains", pathGetV1LogDrains(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/log-drains/{id}", pathGetV1LogDrainsID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/projects/{idOrName}/env/{id}", pathGetV1ProjectsIDOrNameEnvID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/projects/{projectId}/promote/aliases", pathGetV1ProjectsProjectIDPromoteAliases(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/security/firewall/bypass", pathGetV1SecurityFirewallBypass(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/security/firewall/config/{configVersion}", pathGetV1SecurityFirewallConfigConfigVersion(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/teams/{teamId}/request/{userId}", pathGetV1TeamsTeamIDRequestUserID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/webhooks", pathGetV1Webhooks(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v1/webhooks/{id}", pathGetV1WebhooksID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v13/deployments/{idOrUrl}", pathGetV13DeploymentsIDOrURL(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v2/deployments/{id}/aliases", pathGetV2DeploymentsIDAliases(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v2/integrations/log-drains", pathGetV2IntegrationsLogDrains(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v2/teams", pathGetV2Teams(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v2/teams/{teamId}", pathGetV2TeamsTeamID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v2/teams/{teamId}/members", pathGetV2TeamsTeamIDMembers(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v3/deployments/{idOrUrl}/events", pathGetV3DeploymentsIDOrURLEvents(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v3/events", pathGetV3Events(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v4/aliases", pathGetV4Aliases(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v4/aliases/{idOrAlias}", pathGetV4AliasesIDOrAlias(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v4/domains/price", pathGetV4DomainsPrice(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v4/domains/status", pathGetV4DomainsStatus(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v5/domains", pathGetV5Domains(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v5/domains/{domain}", pathGetV5DomainsDomain(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v5/user/tokens", pathGetV5UserTokens(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v5/user/tokens/{tokenId}", pathGetV5UserTokensTokenID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v6/deployments", pathGetV6Deployments(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v6/deployments/{id}/files", pathGetV6DeploymentsIDFiles(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v6/domains/{domain}/config", pathGetV6DomainsDomainConfig(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v7/certs/{id}", pathGetV7CertsID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v7/deployments/{id}/files/{fileId}", pathGetV7DeploymentsIDFilesFileID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v8/artifacts/status", pathGetV8ArtifactsStatus(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v8/artifacts/{hash}", pathGetV8ArtifactsHash(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v9/projects", pathGetV9Projects(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v9/projects/{idOrName}/custom-environments", pathGetV9ProjectsIDOrNameCustomEnvironments(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", pathGetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v9/projects/{idOrName}/domains", pathGetV9ProjectsIDOrNameDomains(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/v9/projects/{idOrName}/domains/{domain}", pathGetV9ProjectsIDOrNameDomainsDomain(dir, rt)), + NewGeneratedHandler(ctx, http.MethodHead, "/v8/artifacts/{hash}", pathHeadV8ArtifactsHash(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v1/access-groups/{accessGroupIdOrName}/projects/{projectId}", pathPatchV1AccessGroupsAccessGroupIDOrNameProjectsProjectID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v1/data-cache/projects/{projectId}", pathPatchV1DataCacheProjectsProjectID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v1/deployments/{deploymentId}/checks/{checkId}", pathPatchV1DeploymentsDeploymentIDChecksCheckID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v1/domains/records/{recordId}", pathPatchV1DomainsRecordsRecordID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v1/projects/{idOrName}/protection-bypass", pathPatchV1ProjectsIDOrNameProtectionBypass(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v1/security/firewall/config", pathPatchV1SecurityFirewallConfig(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v1/teams/{teamId}/members/{uid}", pathPatchV1TeamsTeamIDMembersUID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v12/deployments/{id}/cancel", pathPatchV12DeploymentsIDCancel(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v2/teams/{teamId}", pathPatchV2TeamsTeamID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v9/projects/{idOrName}", pathPatchV9ProjectsIDOrName(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", pathPatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/v9/projects/{idOrName}/domains/{domain}", pathPatchV9ProjectsIDOrNameDomainsDomain(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/access-groups", pathPostV1AccessGroups(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/access-groups/{accessGroupIdOrName}/projects", pathPostV1AccessGroupsAccessGroupIDOrNameProjects(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/access-groups/{idOrName}", pathPostV1AccessGroupsIDOrName(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/deployments/{deploymentId}/checks", pathPostV1DeploymentsDeploymentIDChecks(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/deployments/{deploymentId}/checks/{checkId}/rerequest", pathPostV1DeploymentsDeploymentIDChecksCheckIDRerequest(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/edge-config", pathPostV1EdgeConfig(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/edge-config/{edgeConfigId}/schema", pathPostV1EdgeConfigEdgeConfigIDSchema(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/edge-config/{edgeConfigId}/token", pathPostV1EdgeConfigEdgeConfigIDToken(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/installations/{integrationConfigurationId}/billing", pathPostV1InstallationsIntegrationConfigurationIDBilling(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/installations/{integrationConfigurationId}/billing/invoices", pathPostV1InstallationsIntegrationConfigurationIDBillingInvoices(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}/actions", pathPostV1InstallationsIntegrationConfigurationIDBillingInvoicesInvoiceIDActions(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/installations/{integrationConfigurationId}/events", pathPostV1InstallationsIntegrationConfigurationIDEvents(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/integrations/sso/token", pathPostV1IntegrationsSsoToken(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/log-drains", pathPostV1LogDrains(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/projects/{idOrName}/custom-environments", pathPostV1ProjectsIDOrNameCustomEnvironments(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/projects/{idOrName}/members", pathPostV1ProjectsIDOrNameMembers(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/security/attack-mode", pathPostV1SecurityAttackMode(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/security/firewall/bypass", pathPostV1SecurityFirewallBypass(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/teams", pathPostV1Teams(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/teams/{teamId}/members/teams/join", pathPostV1TeamsTeamIDMembersTeamsJoin(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/teams/{teamId}/request", pathPostV1TeamsTeamIDRequest(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v1/webhooks", pathPostV1Webhooks(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v10/projects", pathPostV10Projects(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v10/projects/{idOrName}/domains", pathPostV10ProjectsIDOrNameDomains(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v10/projects/{idOrName}/env", pathPostV10ProjectsIDOrNameEnv(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v10/projects/{projectId}/promote/{deploymentId}", pathPostV10ProjectsProjectIDPromoteDeploymentID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v13/deployments", pathPostV13Deployments(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v2/deployments/{id}/aliases", pathPostV2DeploymentsIDAliases(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v2/domains/{domain}/records", pathPostV2DomainsDomainRecords(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v2/files", pathPostV2Files(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v2/integrations/log-drains", pathPostV2IntegrationsLogDrains(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v3/user/tokens", pathPostV3UserTokens(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v5/domains", pathPostV5Domains(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v5/domains/buy", pathPostV5DomainsBuy(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v7/certs", pathPostV7Certs(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v8/artifacts", pathPostV8Artifacts(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v8/artifacts/events", pathPostV8ArtifactsEvents(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/v9/projects/{idOrName}/domains/{domain}/verify", pathPostV9ProjectsIDOrNameDomainsDomainVerify(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPut, "/v1/edge-config/{edgeConfigId}", pathPutV1EdgeConfigEdgeConfigID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPut, "/v1/installations/{integrationConfigurationId}/products/{integrationProductIdOrSlug}/resources/{resourceId}/secrets", pathPutV1InstallationsIntegrationConfigurationIDProductsIntegrationProductIDOrSlugResourcesResourceIDSecrets(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPut, "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/secrets", pathPutV1InstallationsIntegrationConfigurationIDResourcesResourceIDSecrets(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPut, "/v1/security/firewall/config", pathPutV1SecurityFirewallConfig(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPut, "/v7/certs", pathPutV7Certs(dir, rt)), + } +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev13deploymentsid.go b/src/__tests__/mockserver/internal/handler/pathdeletev13deploymentsid.go new file mode 100644 index 00000000..82bf721e --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev13deploymentsid.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV13DeploymentsID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteDeployment[0]": + dir.HandlerFunc("deleteDeployment", testDeleteDeploymentDeleteDeployment0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteDeploymentDeleteDeployment0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.DeleteDeploymentResponseBody{ + UID: "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd", + State: operations.DeleteDeploymentStateDeleted, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1accessgroupsaccessgroupidornameprojectsprojectid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1accessgroupsaccessgroupidornameprojectsprojectid.go new file mode 100644 index 00000000..3bdc6283 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1accessgroupsaccessgroupidornameprojectsprojectid.go @@ -0,0 +1,82 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1AccessGroupsAccessGroupIDOrNameProjectsProjectID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteAccessGroupProject-id[0]": + dir.HandlerFunc("deleteAccessGroupProject", testDeleteAccessGroupProjectDeleteAccessGroupProjectId0)(w, req) + case "deleteAccessGroupProject-name[0]": + dir.HandlerFunc("deleteAccessGroupProject", testDeleteAccessGroupProjectDeleteAccessGroupProjectName0)(w, req) + case "deleteAccessGroupProject[0]": + dir.HandlerFunc("deleteAccessGroupProject", testDeleteAccessGroupProjectDeleteAccessGroupProject0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteAccessGroupProjectDeleteAccessGroupProjectId0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} + +func testDeleteAccessGroupProjectDeleteAccessGroupProjectName0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} + +func testDeleteAccessGroupProjectDeleteAccessGroupProject0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1accessgroupsidorname.go b/src/__tests__/mockserver/internal/handler/pathdeletev1accessgroupsidorname.go new file mode 100644 index 00000000..48254c01 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1accessgroupsidorname.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1AccessGroupsIDOrName(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteAccessGroup[0]": + dir.HandlerFunc("deleteAccessGroup", testDeleteAccessGroupDeleteAccessGroup0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteAccessGroupDeleteAccessGroup0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigid.go new file mode 100644 index 00000000..2a322966 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigid.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1EdgeConfigEdgeConfigID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteEdgeConfig[0]": + dir.HandlerFunc("deleteEdgeConfig", testDeleteEdgeConfigDeleteEdgeConfig0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteEdgeConfigDeleteEdgeConfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigidschema.go b/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigidschema.go new file mode 100644 index 00000000..abe545c4 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigidschema.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1EdgeConfigEdgeConfigIDSchema(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteEdgeConfigSchema[0]": + dir.HandlerFunc("deleteEdgeConfigSchema", testDeleteEdgeConfigSchemaDeleteEdgeConfigSchema0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteEdgeConfigSchemaDeleteEdgeConfigSchema0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigidtokens.go b/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigidtokens.go new file mode 100644 index 00000000..1c5b0be3 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1edgeconfigedgeconfigidtokens.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1EdgeConfigEdgeConfigIDTokens(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteEdgeConfigTokens[0]": + dir.HandlerFunc("deleteEdgeConfigTokens", testDeleteEdgeConfigTokensDeleteEdgeConfigTokens0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteEdgeConfigTokensDeleteEdgeConfigTokens0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1integrationsconfigurationid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1integrationsconfigurationid.go new file mode 100644 index 00000000..84b79ae6 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1integrationsconfigurationid.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1IntegrationsConfigurationID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteConfiguration[0]": + dir.HandlerFunc("deleteConfiguration", testDeleteConfigurationDeleteConfiguration0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteConfigurationDeleteConfiguration0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1integrationslogdrainsid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1integrationslogdrainsid.go new file mode 100644 index 00000000..64e0b855 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1integrationslogdrainsid.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1IntegrationsLogDrainsID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteIntegrationLogDrain[0]": + dir.HandlerFunc("deleteIntegrationLogDrain", testDeleteIntegrationLogDrainDeleteIntegrationLogDrain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteIntegrationLogDrainDeleteIntegrationLogDrain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1logdrainsid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1logdrainsid.go new file mode 100644 index 00000000..6bb49e21 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1logdrainsid.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1LogDrainsID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteConfigurableLogDrain[0]": + dir.HandlerFunc("deleteConfigurableLogDrain", testDeleteConfigurableLogDrainDeleteConfigurableLogDrain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteConfigurableLogDrainDeleteConfigurableLogDrain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1projectsidornamemembersuid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1projectsidornamemembersuid.go new file mode 100644 index 00000000..f580d8a9 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1projectsidornamemembersuid.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1ProjectsIDOrNameMembersUID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "removeProjectMember[0]": + dir.HandlerFunc("removeProjectMember", testRemoveProjectMemberRemoveProjectMember0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRemoveProjectMemberRemoveProjectMember0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RemoveProjectMemberResponseBody{ + ID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1securityfirewallbypass.go b/src/__tests__/mockserver/internal/handler/pathdeletev1securityfirewallbypass.go new file mode 100644 index 00000000..de71df06 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1securityfirewallbypass.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1SecurityFirewallBypass(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "removeBypassIp[0]": + dir.HandlerFunc("removeBypassIp", testRemoveBypassIPRemoveBypassIp0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRemoveBypassIPRemoveBypassIp0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RemoveBypassIPResponseBody{ + Ok: true, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamid.go new file mode 100644 index 00000000..d1318a35 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamid.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1TeamsTeamID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteTeam[0]": + dir.HandlerFunc("deleteTeam", testDeleteTeamDeleteTeam0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteTeamDeleteTeam0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.DeleteTeamResponseBody{ + ID: "team_LLHUOMOoDlqOp8wPE4kFo9pE", + NewDefaultTeamIDError: types.Bool(true), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamidinvitesinviteid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamidinvitesinviteid.go new file mode 100644 index 00000000..45eae61f --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamidinvitesinviteid.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1TeamsTeamIDInvitesInviteID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteTeamInviteCode[0]": + dir.HandlerFunc("deleteTeamInviteCode", testDeleteTeamInviteCodeDeleteTeamInviteCode0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteTeamInviteCodeDeleteTeamInviteCode0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.DeleteTeamInviteCodeResponseBody{ + ID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamidmembersuid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamidmembersuid.go new file mode 100644 index 00000000..14697895 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1teamsteamidmembersuid.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1TeamsTeamIDMembersUID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "removeTeamMember[0]": + dir.HandlerFunc("removeTeamMember", testRemoveTeamMemberRemoveTeamMember0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRemoveTeamMemberRemoveTeamMember0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RemoveTeamMemberResponseBody{ + ID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1user.go b/src/__tests__/mockserver/internal/handler/pathdeletev1user.go new file mode 100644 index 00000000..9407e8e8 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1user.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1User(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "requestDelete[0]": + dir.HandlerFunc("requestDelete", testRequestDeleteRequestDelete0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRequestDeleteRequestDelete0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RequestDeleteResponseBody{ + ID: "", + Email: "Lamont82@gmail.com", + Message: "Verification email sent", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusAccepted) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev1webhooksid.go b/src/__tests__/mockserver/internal/handler/pathdeletev1webhooksid.go new file mode 100644 index 00000000..14b66f1e --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev1webhooksid.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV1WebhooksID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteWebhook[0]": + dir.HandlerFunc("deleteWebhook", testDeleteWebhookDeleteWebhook0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteWebhookDeleteWebhook0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev2aliasesaliasid.go b/src/__tests__/mockserver/internal/handler/pathdeletev2aliasesaliasid.go new file mode 100644 index 00000000..67ebefd0 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev2aliasesaliasid.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV2AliasesAliasID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteAlias[0]": + dir.HandlerFunc("deleteAlias", testDeleteAliasDeleteAlias0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteAliasDeleteAlias0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.DeleteAliasResponseBody{ + Status: operations.DeleteAliasStatusSuccess, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev2domainsdomainrecordsrecordid.go b/src/__tests__/mockserver/internal/handler/pathdeletev2domainsdomainrecordsrecordid.go new file mode 100644 index 00000000..60033649 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev2domainsdomainrecordsrecordid.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV2DomainsDomainRecordsRecordID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "removeRecord[0]": + dir.HandlerFunc("removeRecord", testRemoveRecordRemoveRecord0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRemoveRecordRemoveRecord0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RemoveRecordResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev3usertokenstokenid.go b/src/__tests__/mockserver/internal/handler/pathdeletev3usertokenstokenid.go new file mode 100644 index 00000000..3a43b8da --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev3usertokenstokenid.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV3UserTokensTokenID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteAuthToken[0]": + dir.HandlerFunc("deleteAuthToken", testDeleteAuthTokenDeleteAuthToken0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteAuthTokenDeleteAuthToken0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.DeleteAuthTokenResponseBody{ + TokenID: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev6domainsdomain.go b/src/__tests__/mockserver/internal/handler/pathdeletev6domainsdomain.go new file mode 100644 index 00000000..81099111 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev6domainsdomain.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV6DomainsDomain(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteDomain[0]": + dir.HandlerFunc("deleteDomain", testDeleteDomainDeleteDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteDomainDeleteDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.DeleteDomainResponseBody{ + UID: "rec_V0fra8eEgQwEpFhYG2vTzC3K", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev7certsid.go b/src/__tests__/mockserver/internal/handler/pathdeletev7certsid.go new file mode 100644 index 00000000..bf4e1186 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev7certsid.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV7CertsID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "removeCert[0]": + dir.HandlerFunc("removeCert", testRemoveCertRemoveCert0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRemoveCertRemoveCert0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RemoveCertResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidorname.go b/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidorname.go new file mode 100644 index 00000000..f17f5ab1 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidorname.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV9ProjectsIDOrName(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteProject[0]": + dir.HandlerFunc("deleteProject", testDeleteProjectDeleteProject0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteProjectDeleteProject0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornamecustomenvironmentsenvironmentslugorid.go b/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornamecustomenvironmentsenvironmentslugorid.go new file mode 100644 index 00000000..980d2e46 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornamecustomenvironmentsenvironmentslugorid.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}[0]": + dir.HandlerFunc("delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", testDeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDDeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDDeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornamedomainsdomain.go b/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornamedomainsdomain.go new file mode 100644 index 00000000..0e843677 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornamedomainsdomain.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV9ProjectsIDOrNameDomainsDomain(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "removeProjectDomain[0]": + dir.HandlerFunc("removeProjectDomain", testRemoveProjectDomainRemoveProjectDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRemoveProjectDomainRemoveProjectDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RemoveProjectDomainResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornameenvid.go b/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornameenvid.go new file mode 100644 index 00000000..1bba1a95 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathdeletev9projectsidornameenvid.go @@ -0,0 +1,77 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathDeleteV9ProjectsIDOrNameEnvID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "removeProjectEnv[0]": + dir.HandlerFunc("removeProjectEnv", testRemoveProjectEnvRemoveProjectEnv0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRemoveProjectEnvRemoveProjectEnv0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateRemoveProjectEnvResponseBodyArrayOfRemoveProjectEnvResponseBody1( + []operations.RemoveProjectEnvResponseBody1{ + operations.RemoveProjectEnvResponseBody1{ + Type: operations.RemoveProjectEnvResponseBodyTypeSensitive, + Key: "", + Value: "", + }, + operations.RemoveProjectEnvResponseBody1{ + Type: operations.RemoveProjectEnvResponseBodyTypePlain, + Key: "", + Value: "", + }, + operations.RemoveProjectEnvResponseBody1{ + Type: operations.RemoveProjectEnvResponseBodyTypeEncrypted, + Key: "", + Value: "", + }, + }, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv13deploymentsidorurl.go b/src/__tests__/mockserver/internal/handler/pathgetv13deploymentsidorurl.go new file mode 100644 index 00000000..5cb799b0 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv13deploymentsidorurl.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV13DeploymentsIDOrURL(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDeployment[0]": + dir.HandlerFunc("getDeployment", testGetDeploymentGetDeployment0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetDeploymentGetDeployment0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateGetDeploymentResponseBodyGetDeploymentResponseBody2( + operations.GetDeploymentResponseBody2{ + AliasAssigned: false, + BootedAt: 2317.28, + BuildingAt: 458.05, + BuildSkipped: true, + Creator: operations.GetDeploymentResponseBodyCreator{ + UID: "", + }, + Public: true, + Status: operations.GetDeploymentResponseBodyStatusError, + ID: "", + Type: operations.GetDeploymentResponseBodyTypeLambdas, + CreatedAt: 3161.76, + Name: "", + ReadyState: operations.GetDeploymentResponseBodyReadyStateReady, + Meta: map[string]string{ + "key": "", + "key1": "", + }, + Regions: []string{}, + URL: "https://disloyal-backburn.info", + Version: 1604.95, + }, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1accessgroups.go b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroups.go new file mode 100644 index 00000000..b5d91d17 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroups.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1AccessGroups(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listAccessGroups[0]": + dir.HandlerFunc("listAccessGroups", testListAccessGroupsListAccessGroups0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListAccessGroupsListAccessGroups0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateListAccessGroupsResponseBodyListAccessGroupsResponseBody1( + operations.ListAccessGroupsResponseBody1{}, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsaccessgroupidornameprojectsprojectid.go b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsaccessgroupidornameprojectsprojectid.go new file mode 100644 index 00000000..40ad42f8 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsaccessgroupidornameprojectsprojectid.go @@ -0,0 +1,141 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1AccessGroupsAccessGroupIDOrNameProjectsProjectID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "readAccessGroupProject[0]": + dir.HandlerFunc("readAccessGroupProject", testReadAccessGroupProjectReadAccessGroupProject0)(w, req) + case "readAccessGroupProject-id[0]": + dir.HandlerFunc("readAccessGroupProject", testReadAccessGroupProjectReadAccessGroupProjectId0)(w, req) + case "readAccessGroupProject-name[0]": + dir.HandlerFunc("readAccessGroupProject", testReadAccessGroupProjectReadAccessGroupProjectName0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testReadAccessGroupProjectReadAccessGroupProject0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ReadAccessGroupProjectResponseBody{ + TeamID: "", + AccessGroupID: "", + ProjectID: "", + Role: operations.ReadAccessGroupProjectRoleAdmin, + CreatedAt: "", + UpdatedAt: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testReadAccessGroupProjectReadAccessGroupProjectId0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ReadAccessGroupProjectResponseBody{ + TeamID: "", + AccessGroupID: "", + ProjectID: "", + Role: operations.ReadAccessGroupProjectRoleAdmin, + CreatedAt: "1706854122023", + UpdatedAt: "1735905380072", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testReadAccessGroupProjectReadAccessGroupProjectName0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ReadAccessGroupProjectResponseBody{ + TeamID: "", + AccessGroupID: "", + ProjectID: "", + Role: operations.ReadAccessGroupProjectRoleProjectDeveloper, + CreatedAt: "1731124284693", + UpdatedAt: "1735836411388", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidorname.go b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidorname.go new file mode 100644 index 00000000..d71ae916 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidorname.go @@ -0,0 +1,147 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1AccessGroupsIDOrName(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "readAccessGroup[0]": + dir.HandlerFunc("readAccessGroup", testReadAccessGroupReadAccessGroup0)(w, req) + case "readAccessGroup-id[0]": + dir.HandlerFunc("readAccessGroup", testReadAccessGroupReadAccessGroupId0)(w, req) + case "readAccessGroup-name[0]": + dir.HandlerFunc("readAccessGroup", testReadAccessGroupReadAccessGroupName0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testReadAccessGroupReadAccessGroup0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ReadAccessGroupResponseBody{ + IsDsyncManaged: false, + Name: "my-access-group", + CreatedAt: "1588720733602", + TeamID: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + UpdatedAt: "1588720733602", + AccessGroupID: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + MembersCount: 5, + ProjectsCount: 2, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testReadAccessGroupReadAccessGroupId0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ReadAccessGroupResponseBody{ + IsDsyncManaged: false, + Name: "my-access-group", + CreatedAt: "1588720733602", + TeamID: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + UpdatedAt: "1588720733602", + AccessGroupID: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + MembersCount: 5, + ProjectsCount: 2, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testReadAccessGroupReadAccessGroupName0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ReadAccessGroupResponseBody{ + IsDsyncManaged: false, + Name: "my-access-group", + CreatedAt: "1588720733602", + TeamID: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + UpdatedAt: "1588720733602", + AccessGroupID: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + MembersCount: 5, + ProjectsCount: 2, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidornamemembers.go b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidornamemembers.go new file mode 100644 index 00000000..666609a4 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidornamemembers.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1AccessGroupsIDOrNameMembers(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listAccessGroupMembers[0]": + dir.HandlerFunc("listAccessGroupMembers", testListAccessGroupMembersListAccessGroupMembers0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListAccessGroupMembersListAccessGroupMembers0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ListAccessGroupMembersResponseBody{ + Members: []operations.Members{ + operations.Members{ + Email: "Jaida_Rogahn@yahoo.com", + UID: "", + Username: "Karianne_Bernier", + TeamRole: operations.TeamRoleViewer, + }, + }, + Pagination: operations.Pagination{ + Count: 3878.47, + Next: types.String(""), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidornameprojects.go b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidornameprojects.go new file mode 100644 index 00000000..feae2d65 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1accessgroupsidornameprojects.go @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1AccessGroupsIDOrNameProjects(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listAccessGroupProjects[0]": + dir.HandlerFunc("listAccessGroupProjects", testListAccessGroupProjectsListAccessGroupProjects0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListAccessGroupProjectsListAccessGroupProjects0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ListAccessGroupProjectsResponseBody{ + Projects: []operations.ListAccessGroupProjectsProjects{}, + Pagination: operations.ListAccessGroupProjectsPagination{ + Count: 7604.02, + Next: types.String(""), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1deploymentsdeploymentidchecks.go b/src/__tests__/mockserver/internal/handler/pathgetv1deploymentsdeploymentidchecks.go new file mode 100644 index 00000000..be6ee9b8 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1deploymentsdeploymentidchecks.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1DeploymentsDeploymentIDChecks(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getAllChecks[0]": + dir.HandlerFunc("getAllChecks", testGetAllChecksGetAllChecks0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetAllChecksGetAllChecks0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetAllChecksResponseBody{ + Checks: []operations.Checks{ + operations.Checks{ + CreatedAt: 4203.11, + ID: "", + IntegrationID: "", + Name: "", + Rerequestable: false, + Status: operations.GetAllChecksStatusRegistered, + UpdatedAt: 4461.16, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1deploymentsdeploymentidcheckscheckid.go b/src/__tests__/mockserver/internal/handler/pathgetv1deploymentsdeploymentidcheckscheckid.go new file mode 100644 index 00000000..afc8293b --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1deploymentsdeploymentidcheckscheckid.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1DeploymentsDeploymentIDChecksCheckID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getCheck[0]": + dir.HandlerFunc("getCheck", testGetCheckGetCheck0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetCheckGetCheck0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetCheckResponseBody{ + ID: "", + Name: "", + Status: operations.GetCheckStatusCompleted, + Blocking: true, + IntegrationID: "", + DeploymentID: "", + CreatedAt: 2039.14, + UpdatedAt: 676.34, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1domainsdomainregistry.go b/src/__tests__/mockserver/internal/handler/pathgetv1domainsdomainregistry.go new file mode 100644 index 00000000..cbdd6f80 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1domainsdomainregistry.go @@ -0,0 +1,63 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1DomainsDomainRegistry(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDomainTransfer[0]": + dir.HandlerFunc("getDomainTransfer", testGetDomainTransferGetDomainTransfer0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetDomainTransferGetDomainTransfer0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetDomainTransferResponseBody{ + Transferable: false, + TransferPolicy: operations.TransferPolicyChargeAndRenew.ToPointer(), + Reason: "", + Status: operations.GetDomainTransferStatusCompleted, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfig.go b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfig.go new file mode 100644 index 00000000..40723d19 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfig.go @@ -0,0 +1,63 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1EdgeConfig(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getEdgeConfigs[0]": + dir.HandlerFunc("getEdgeConfigs", testGetEdgeConfigsGetEdgeConfigs0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetEdgeConfigsGetEdgeConfigs0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := []operations.GetEdgeConfigsResponseBody{ + operations.GetEdgeConfigsResponseBody{ + SizeInBytes: 8239.08, + ItemCount: 557.07, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigid.go b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigid.go new file mode 100644 index 00000000..f5c1227b --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigid.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1EdgeConfigEdgeConfigID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getEdgeConfig[0]": + dir.HandlerFunc("getEdgeConfig", testGetEdgeConfigGetEdgeConfig0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetEdgeConfigGetEdgeConfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetEdgeConfigResponseBody{ + SizeInBytes: 3967.65, + ItemCount: 7010.13, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidbackups.go b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidbackups.go new file mode 100644 index 00000000..7efc043a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidbackups.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1EdgeConfigEdgeConfigIDBackups(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getEdgeConfigBackups[0]": + dir.HandlerFunc("getEdgeConfigBackups", testGetEdgeConfigBackupsGetEdgeConfigBackups0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetEdgeConfigBackupsGetEdgeConfigBackups0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetEdgeConfigBackupsResponseBody{ + Backups: []operations.Backups{ + operations.Backups{ + ID: "", + LastModified: 2424.25, + }, + operations.Backups{ + ID: "", + LastModified: 1518.43, + }, + }, + Pagination: operations.GetEdgeConfigBackupsPagination{ + HasNext: true, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigiditemedgeconfigitemkey.go b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigiditemedgeconfigitemkey.go new file mode 100644 index 00000000..90d83e89 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigiditemedgeconfigitemkey.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1EdgeConfigEdgeConfigIDItemEdgeConfigItemKey(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getEdgeConfigItem[0]": + dir.HandlerFunc("getEdgeConfigItem", testGetEdgeConfigItemGetEdgeConfigItem0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetEdgeConfigItemGetEdgeConfigItem0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.EdgeConfigItem{ + Key: "", + Value: types.Pointer(components.CreateEdgeConfigItemValueStr( + "9966.77", + )), + EdgeConfigID: "", + CreatedAt: 1621.85, + UpdatedAt: 3034.44, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigiditems.go b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigiditems.go new file mode 100644 index 00000000..d45b53f8 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigiditems.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1EdgeConfigEdgeConfigIDItems(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getEdgeConfigItems[0]": + dir.HandlerFunc("getEdgeConfigItems", testGetEdgeConfigItemsGetEdgeConfigItems0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetEdgeConfigItemsGetEdgeConfigItems0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.EdgeConfigItem{ + Key: "", + Value: types.Pointer(components.CreateEdgeConfigItemValueStr( + "5002.95", + )), + EdgeConfigID: "", + CreatedAt: 9069.68, + UpdatedAt: 6276.41, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidschema.go b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidschema.go new file mode 100644 index 00000000..bc57f736 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidschema.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1EdgeConfigEdgeConfigIDSchema(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getEdgeConfigSchema[0]": + dir.HandlerFunc("getEdgeConfigSchema", testGetEdgeConfigSchemaGetEdgeConfigSchema0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetEdgeConfigSchemaGetEdgeConfigSchema0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetEdgeConfigSchemaResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidtokens.go b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidtokens.go new file mode 100644 index 00000000..1d68810c --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidtokens.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1EdgeConfigEdgeConfigIDTokens(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getEdgeConfigTokens[0]": + dir.HandlerFunc("getEdgeConfigTokens", testGetEdgeConfigTokensGetEdgeConfigTokens0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetEdgeConfigTokensGetEdgeConfigTokens0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.EdgeConfigToken{ + Token: "", + Label: "", + ID: "", + EdgeConfigID: "", + CreatedAt: 7692.35, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidtokentoken.go b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidtokentoken.go new file mode 100644 index 00000000..480ae5a3 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1edgeconfigedgeconfigidtokentoken.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1EdgeConfigEdgeConfigIDTokenToken(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getEdgeConfigToken[0]": + dir.HandlerFunc("getEdgeConfigToken", testGetEdgeConfigTokenGetEdgeConfigToken0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetEdgeConfigTokenGetEdgeConfigToken0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.EdgeConfigToken{ + Token: "", + Label: "", + ID: "", + EdgeConfigID: "", + CreatedAt: 3597.77, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidaccount.go b/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidaccount.go new file mode 100644 index 00000000..b7b2aa4b --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidaccount.go @@ -0,0 +1,63 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1InstallationsIntegrationConfigurationIDAccount(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "get-account-info[0]": + dir.HandlerFunc("get-account-info", testGetAccountInfoGetAccountInfo0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetAccountInfoGetAccountInfo0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetAccountInfoResponseBody{ + URL: "https://friendly-pleasure.info", + Contact: &operations.Contact{ + Email: "Horace_Bernhard@yahoo.com", + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidbillinginvoicesinvoiceid.go b/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidbillinginvoicesinvoiceid.go new file mode 100644 index 00000000..544602a9 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidbillinginvoicesinvoiceid.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1InstallationsIntegrationConfigurationIDBillingInvoicesInvoiceID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "get-invoice[0]": + dir.HandlerFunc("get-invoice", testGetInvoiceGetInvoice0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetInvoiceGetInvoice0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetInvoiceResponseBody{ + InvoiceID: "", + InvoiceDate: "", + Period: operations.GetInvoicePeriod{ + Start: "", + End: "", + }, + Items: []operations.GetInvoiceItems{ + operations.GetInvoiceItems{ + BillingPlanID: "", + Name: "", + Price: "317.28", + Quantity: 1022.19, + Units: "", + Total: "", + }, + }, + Total: "", + Created: "", + Updated: "", + State: operations.StateScheduled, + Test: false, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidmembermemberid.go b/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidmembermemberid.go new file mode 100644 index 00000000..36b250f2 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1installationsintegrationconfigurationidmembermemberid.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1InstallationsIntegrationConfigurationIDMemberMemberID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "get-member[0]": + dir.HandlerFunc("get-member", testGetMemberGetMember0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetMemberGetMember0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetMemberResponseBody{ + ID: "", + Role: operations.GetMemberRoleAdmin, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1integrationsconfigurationid.go b/src/__tests__/mockserver/internal/handler/pathgetv1integrationsconfigurationid.go new file mode 100644 index 00000000..b4747d0d --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1integrationsconfigurationid.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1IntegrationsConfigurationID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getConfiguration[0]": + dir.HandlerFunc("getConfiguration", testGetConfigurationGetConfiguration0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetConfigurationGetConfiguration0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateGetConfigurationResponseBodyGetConfigurationResponseBody1( + operations.GetConfigurationResponseBody1{ + CompletedAt: types.Float64(1558531915505), + CreatedAt: 1558531915505, + ID: "icfg_3bwCLgxL8qt5kjRLcv2Dit7F", + IntegrationID: "oac_xzpVzcUOgcB1nrVlirtKhbWV", + OwnerID: "kr1PsOIzqEL5Xg6M4VZcZosf", + Projects: []string{ + "prj_xQxbutw1HpL6HLYPAzt5h75m8NjO", + }, + Source: operations.GetConfigurationResponseBodySourceMarketplace.ToPointer(), + Slug: "slack", + TeamID: types.String("team_nLlpyC6RE1qxydlFKbrxDlud"), + Type: operations.GetConfigurationResponseBodyTypeIntegrationConfiguration, + UpdatedAt: 1558531915505, + UserID: "kr1PsOIzqEL5Xg6M4VZcZosf", + Scopes: []string{ + "read:project", + "read-write:log-drain", + }, + DisabledAt: types.Float64(1558531915505), + DeletedAt: types.Float64(1558531915505), + DeleteRequestedAt: types.Float64(1558531915505), + }, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1integrationsgitnamespaces.go b/src/__tests__/mockserver/internal/handler/pathgetv1integrationsgitnamespaces.go new file mode 100644 index 00000000..efa92234 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1integrationsgitnamespaces.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1IntegrationsGitNamespaces(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "gitNamespaces[0]": + dir.HandlerFunc("gitNamespaces", testGitNamespacesGitNamespaces0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGitNamespacesGitNamespaces0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := []operations.GitNamespacesResponseBody{ + operations.GitNamespacesResponseBody{ + Provider: "", + Slug: "", + ID: operations.CreateGitNamespacesIDStr( + "8350.19", + ), + OwnerType: "", + }, + operations.GitNamespacesResponseBody{ + Provider: "", + Slug: "", + ID: operations.CreateGitNamespacesIDStr( + "4647.99", + ), + OwnerType: "", + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1integrationssearchrepo.go b/src/__tests__/mockserver/internal/handler/pathgetv1integrationssearchrepo.go new file mode 100644 index 00000000..6442d8ac --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1integrationssearchrepo.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1IntegrationsSearchRepo(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "searchRepo[0]": + dir.HandlerFunc("searchRepo", testSearchRepoSearchRepo0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testSearchRepoSearchRepo0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateSearchRepoResponseBodySearchRepoResponseBody1( + operations.SearchRepoResponseBody1{}, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1logdrains.go b/src/__tests__/mockserver/internal/handler/pathgetv1logdrains.go new file mode 100644 index 00000000..43337240 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1logdrains.go @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1LogDrains(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getAllLogDrains[0]": + dir.HandlerFunc("getAllLogDrains", testGetAllLogDrainsGetAllLogDrains0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetAllLogDrainsGetAllLogDrains0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := []operations.GetAllLogDrainsResponseBody{ + operations.GetAllLogDrainsResponseBody{ + ID: "", + DeliveryFormat: operations.GetAllLogDrainsDeliveryFormatJSON, + URL: "https://perfumed-director.net/", + Name: "", + OwnerID: "", + CreatedAt: 5878.41, + DeletedAt: types.Float64(1366.34), + UpdatedAt: 8559.11, + Environments: []operations.GetAllLogDrainsEnvironments{ + operations.GetAllLogDrainsEnvironmentsProduction, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1logdrainsid.go b/src/__tests__/mockserver/internal/handler/pathgetv1logdrainsid.go new file mode 100644 index 00000000..1cda4583 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1logdrainsid.go @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1LogDrainsID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getConfigurableLogDrain[0]": + dir.HandlerFunc("getConfigurableLogDrain", testGetConfigurableLogDrainGetConfigurableLogDrain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetConfigurableLogDrainGetConfigurableLogDrain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetConfigurableLogDrainResponseBody{ + ID: "", + DeliveryFormat: operations.GetConfigurableLogDrainDeliveryFormatJSON, + URL: "https://pleasant-beret.com/", + Name: "", + OwnerID: "", + CreatedAt: 9979.70, + DeletedAt: types.Float64(2589.89), + UpdatedAt: 1929.64, + Environments: []operations.GetConfigurableLogDrainEnvironments{ + operations.GetConfigurableLogDrainEnvironmentsProduction, + operations.GetConfigurableLogDrainEnvironmentsProduction, + }, + Secret: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1projectsidornameenvid.go b/src/__tests__/mockserver/internal/handler/pathgetv1projectsidornameenvid.go new file mode 100644 index 00000000..4f078121 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1projectsidornameenvid.go @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1ProjectsIDOrNameEnvID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getProjectEnv[0]": + dir.HandlerFunc("getProjectEnv", testGetProjectEnvGetProjectEnv0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetProjectEnvGetProjectEnv0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateGetProjectEnvResponseBodyGetProjectEnvResponseBody2( + operations.GetProjectEnvResponseBody2{ + Type: operations.GetProjectEnvResponseBodyProjectsTypePlain, + Key: "", + Value: "", + }, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1projectsprojectidpromotealiases.go b/src/__tests__/mockserver/internal/handler/pathgetv1projectsprojectidpromotealiases.go new file mode 100644 index 00000000..00632567 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1projectsprojectidpromotealiases.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1ProjectsProjectIDPromoteAliases(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listPromoteAliases[0]": + dir.HandlerFunc("listPromoteAliases", testListPromoteAliasesListPromoteAliases0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListPromoteAliasesListPromoteAliases0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateListPromoteAliasesResponseBodyListPromoteAliasesResponseBody1( + operations.ListPromoteAliasesResponseBody1{}, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1securityfirewallbypass.go b/src/__tests__/mockserver/internal/handler/pathgetv1securityfirewallbypass.go new file mode 100644 index 00000000..fe6b4c41 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1securityfirewallbypass.go @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1SecurityFirewallBypass(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getBypassIp[0]": + dir.HandlerFunc("getBypassIp", testGetBypassIPGetBypassIp0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetBypassIPGetBypassIp0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateGetBypassIPResponseBodyGetBypassIPResponseBody1( + operations.GetBypassIPResponseBody1{ + Result: []operations.ResponseBodyResult{ + operations.ResponseBodyResult{ + OwnerID: "", + ID: "", + Domain: "sneaky-intervention.info", + IP: "124.153.161.35", + ProjectID: "", + IsProjectRule: false, + }, + }, + Pagination: types.String(""), + }, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1securityfirewallconfigconfigversion.go b/src/__tests__/mockserver/internal/handler/pathgetv1securityfirewallconfigconfigversion.go new file mode 100644 index 00000000..d5be65c1 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1securityfirewallconfigconfigversion.go @@ -0,0 +1,154 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1SecurityFirewallConfigConfigVersion(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getFirewallConfig[0]": + dir.HandlerFunc("getFirewallConfig", testGetFirewallConfigGetFirewallConfig0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetFirewallConfigGetFirewallConfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetFirewallConfigResponseBody{ + OwnerID: "", + ProjectKey: "", + ID: "", + Version: 228.91, + UpdatedAt: "", + FirewallEnabled: true, + Crs: operations.GetFirewallConfigCrs{ + Sd: operations.GetFirewallConfigSd{ + Active: false, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdActionDeny, + }, + Ma: operations.GetFirewallConfigMa{ + Active: true, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaActionLog, + }, + Lfi: operations.GetFirewallConfigLfi{ + Active: false, + Action: operations.GetFirewallConfigSecurityResponseActionLog, + }, + Rfi: operations.GetFirewallConfigRfi{ + Active: false, + Action: operations.GetFirewallConfigSecurityResponse200ActionDeny, + }, + Rce: operations.GetFirewallConfigRce{ + Active: true, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONActionDeny, + }, + Php: operations.GetFirewallConfigPhp{ + Active: false, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActionLog, + }, + Gen: operations.GetFirewallConfigGen{ + Active: false, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsActionLog, + }, + XSS: operations.GetFirewallConfigXSS{ + Active: true, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSActionDeny, + }, + Sqli: operations.GetFirewallConfigSqli{ + Active: true, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliActionDeny, + }, + Sf: operations.GetFirewallConfigSf{ + Active: true, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfActionDeny, + }, + Java: operations.GetFirewallConfigJava{ + Active: true, + Action: operations.GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaActionDeny, + }, + }, + Rules: []operations.GetFirewallConfigRules{ + operations.GetFirewallConfigRules{ + ID: "", + Name: "", + Active: true, + ConditionGroup: []operations.GetFirewallConfigConditionGroup{ + operations.GetFirewallConfigConditionGroup{ + Conditions: []operations.GetFirewallConfigConditions{ + operations.GetFirewallConfigConditions{ + Type: operations.GetFirewallConfigTypeIPAddress, + Op: operations.GetFirewallConfigOpEq, + }, + }, + }, + operations.GetFirewallConfigConditionGroup{ + Conditions: []operations.GetFirewallConfigConditions{ + operations.GetFirewallConfigConditions{ + Type: operations.GetFirewallConfigTypeGeoCity, + Op: operations.GetFirewallConfigOpEx, + }, + operations.GetFirewallConfigConditions{ + Type: operations.GetFirewallConfigTypeJa4Digest, + Op: operations.GetFirewallConfigOpNex, + }, + operations.GetFirewallConfigConditions{ + Type: operations.GetFirewallConfigTypeIPAddress, + Op: operations.GetFirewallConfigOpLte, + }, + }, + }, + }, + Action: operations.GetFirewallConfigAction{}, + }, + }, + Ips: []operations.GetFirewallConfigIps{ + operations.GetFirewallConfigIps{ + ID: "", + Hostname: "puny-goat.org", + IP: "0.147.40.42", + Action: operations.GetFirewallConfigSecurityActionChallenge, + }, + }, + Changes: []operations.Changes{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1teamsteamidrequestuserid.go b/src/__tests__/mockserver/internal/handler/pathgetv1teamsteamidrequestuserid.go new file mode 100644 index 00000000..cb3b992a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1teamsteamidrequestuserid.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1TeamsTeamIDRequestUserID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getTeamAccessRequest[0]": + dir.HandlerFunc("getTeamAccessRequest", testGetTeamAccessRequestGetTeamAccessRequest0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetTeamAccessRequestGetTeamAccessRequest0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetTeamAccessRequestResponseBody{ + TeamSlug: "my-team", + TeamName: "My Team", + Confirmed: false, + JoinedFrom: operations.GetTeamAccessRequestJoinedFrom{ + Origin: operations.GetTeamAccessRequestOriginImport, + }, + AccessRequestedAt: 1588720733602, + Github: &operations.GetTeamAccessRequestGithub{}, + Gitlab: &operations.GetTeamAccessRequestGitlab{}, + Bitbucket: &operations.GetTeamAccessRequestBitbucket{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1webhooks.go b/src/__tests__/mockserver/internal/handler/pathgetv1webhooks.go new file mode 100644 index 00000000..41de8f4e --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1webhooks.go @@ -0,0 +1,127 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1Webhooks(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getWebhooks[0]": + dir.HandlerFunc("getWebhooks", testGetWebhooksGetWebhooks0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetWebhooksGetWebhooks0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateGetWebhooksResponseBodyArrayOfGetWebhooksResponseBody1( + []operations.GetWebhooksResponseBody1{ + operations.GetWebhooksResponseBody1{ + ProjectsMetadata: []operations.ProjectsMetadata{ + operations.ProjectsMetadata{ + ID: "", + Name: "", + }, + operations.ProjectsMetadata{ + ID: "", + Name: "", + }, + operations.ProjectsMetadata{ + ID: "", + Name: "", + }, + }, + Events: []operations.ResponseBodyEvents{ + operations.ResponseBodyEventsDeploymentCreated, + }, + ID: "account_hook_GflD6EYyo7F4ViYS", + URL: "https://my-webhook.com", + OwnerID: "ZspSRT4ljIEEmMHgoDwKWDei", + CreatedAt: 1567024758130, + UpdatedAt: 1567024758130, + ProjectIds: []string{ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + }, + }, + operations.GetWebhooksResponseBody1{ + ProjectsMetadata: []operations.ProjectsMetadata{ + operations.ProjectsMetadata{ + ID: "", + Name: "", + }, + }, + Events: []operations.ResponseBodyEvents{ + operations.ResponseBodyEventsDeploymentCreated, + }, + ID: "account_hook_GflD6EYyo7F4ViYS", + URL: "https://my-webhook.com", + OwnerID: "ZspSRT4ljIEEmMHgoDwKWDei", + CreatedAt: 1567024758130, + UpdatedAt: 1567024758130, + ProjectIds: []string{ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + }, + }, + operations.GetWebhooksResponseBody1{ + ProjectsMetadata: []operations.ProjectsMetadata{ + operations.ProjectsMetadata{ + ID: "", + Name: "", + }, + }, + Events: []operations.ResponseBodyEvents{ + operations.ResponseBodyEventsDeploymentCreated, + }, + ID: "account_hook_GflD6EYyo7F4ViYS", + URL: "https://my-webhook.com", + OwnerID: "ZspSRT4ljIEEmMHgoDwKWDei", + CreatedAt: 1567024758130, + UpdatedAt: 1567024758130, + ProjectIds: []string{ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + }, + }, + }, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv1webhooksid.go b/src/__tests__/mockserver/internal/handler/pathgetv1webhooksid.go new file mode 100644 index 00000000..4a1926b4 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv1webhooksid.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV1WebhooksID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getWebhook[0]": + dir.HandlerFunc("getWebhook", testGetWebhookGetWebhook0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetWebhookGetWebhook0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetWebhookResponseBody{ + Events: []operations.GetWebhookEvents{ + operations.GetWebhookEventsDeploymentCreated, + }, + ID: "account_hook_GflD6EYyo7F4ViYS", + URL: "https://my-webhook.com", + OwnerID: "ZspSRT4ljIEEmMHgoDwKWDei", + CreatedAt: 1567024758130, + UpdatedAt: 1567024758130, + ProjectIds: []string{ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv2deploymentsidaliases.go b/src/__tests__/mockserver/internal/handler/pathgetv2deploymentsidaliases.go new file mode 100644 index 00000000..5d1d8991 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv2deploymentsidaliases.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV2DeploymentsIDAliases(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listDeploymentAliases[0]": + dir.HandlerFunc("listDeploymentAliases", testListDeploymentAliasesListDeploymentAliases0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListDeploymentAliasesListDeploymentAliases0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ListDeploymentAliasesResponseBody{ + Aliases: []operations.ListDeploymentAliasesAliases{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv2integrationslogdrains.go b/src/__tests__/mockserver/internal/handler/pathgetv2integrationslogdrains.go new file mode 100644 index 00000000..476a26ab --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv2integrationslogdrains.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV2IntegrationsLogDrains(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getIntegrationLogDrains[0]": + dir.HandlerFunc("getIntegrationLogDrains", testGetIntegrationLogDrainsGetIntegrationLogDrains0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetIntegrationLogDrainsGetIntegrationLogDrains0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := []operations.GetIntegrationLogDrainsResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv2teams.go b/src/__tests__/mockserver/internal/handler/pathgetv2teams.go new file mode 100644 index 00000000..883bb490 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv2teams.go @@ -0,0 +1,74 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV2Teams(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getTeams[0]": + dir.HandlerFunc("getTeams", testGetTeamsGetTeams0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetTeamsGetTeams0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetTeamsResponseBody{ + Teams: []operations.Teams{ + operations.CreateTeamsMapOfAny( + map[string]any{}, + ), + operations.CreateTeamsMapOfAny( + map[string]any{}, + ), + }, + Pagination: components.Pagination{ + Count: 20, + Next: types.Float64(1540095775951), + Prev: types.Float64(1540095775951), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv2teamsteamid.go b/src/__tests__/mockserver/internal/handler/pathgetv2teamsteamid.go new file mode 100644 index 00000000..79de656c --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv2teamsteamid.go @@ -0,0 +1,57 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV2TeamsTeamID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getTeam[0]": + dir.HandlerFunc("getTeam", testGetTeamGetTeam0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetTeamGetTeam0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := map[string]any{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv2teamsteamidmembers.go b/src/__tests__/mockserver/internal/handler/pathgetv2teamsteamidmembers.go new file mode 100644 index 00000000..47a1a65c --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv2teamsteamidmembers.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV2TeamsTeamIDMembers(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getTeamMembers[0]": + dir.HandlerFunc("getTeamMembers", testGetTeamMembersGetTeamMembers0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetTeamMembersGetTeamMembers0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetTeamMembersResponseBody{ + Members: []operations.GetTeamMembersMembers{ + operations.GetTeamMembersMembers{ + Avatar: types.String("123a6c5209bc3778245d011443644c8d27dc2c50"), + Confirmed: true, + Email: "jane.doe@example.com", + Role: operations.GetTeamMembersRoleOwner, + UID: "zTuNVUXEAvvnNN3IaqinkyMw", + Username: "jane-doe", + Name: types.String("Jane Doe"), + CreatedAt: 1588720733602, + AccessRequestedAt: types.Float64(1588820733602), + }, + operations.GetTeamMembersMembers{ + Avatar: types.String("123a6c5209bc3778245d011443644c8d27dc2c50"), + Confirmed: true, + Email: "jane.doe@example.com", + Role: operations.GetTeamMembersRoleOwner, + UID: "zTuNVUXEAvvnNN3IaqinkyMw", + Username: "jane-doe", + Name: types.String("Jane Doe"), + CreatedAt: 1588720733602, + AccessRequestedAt: types.Float64(1588820733602), + }, + }, + Pagination: operations.GetTeamMembersPagination{ + HasNext: true, + Count: 20, + Next: types.Float64(1540095775951), + Prev: types.Float64(1540095775951), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv3deploymentsidorurlevents.go b/src/__tests__/mockserver/internal/handler/pathgetv3deploymentsidorurlevents.go new file mode 100644 index 00000000..eb4cbf4a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv3deploymentsidorurlevents.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV3DeploymentsIDOrURLEvents(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDeploymentEvents[0]": + dir.HandlerFunc("getDeploymentEvents", testGetDeploymentEventsGetDeploymentEvents0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetDeploymentEventsGetDeploymentEvents0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv3events.go b/src/__tests__/mockserver/internal/handler/pathgetv3events.go new file mode 100644 index 00000000..9e93d6ab --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv3events.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV3Events(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listUserEvents[0]": + dir.HandlerFunc("listUserEvents", testListUserEventsListUserEvents0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListUserEventsListUserEvents0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ListUserEventsResponseBody{ + Events: []components.UserEvent{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv4aliases.go b/src/__tests__/mockserver/internal/handler/pathgetv4aliases.go new file mode 100644 index 00000000..5a053d76 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv4aliases.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV4Aliases(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listAliases[0]": + dir.HandlerFunc("listAliases", testListAliasesListAliases0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListAliasesListAliases0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ListAliasesResponseBody{ + Aliases: []operations.Aliases{}, + Pagination: components.Pagination{ + Count: 20, + Next: types.Float64(1540095775951), + Prev: types.Float64(1540095775951), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv4aliasesidoralias.go b/src/__tests__/mockserver/internal/handler/pathgetv4aliasesidoralias.go new file mode 100644 index 00000000..4569323d --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv4aliasesidoralias.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV4AliasesIDOrAlias(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getAlias[0]": + dir.HandlerFunc("getAlias", testGetAliasGetAlias0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetAliasGetAlias0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetAliasResponseBody{ + Alias: "my-alias.vercel.app", + Created: types.MustTimeFromString("2017-04-26T23:00:34.232Z"), + CreatedAt: types.Float64(1540095775941), + Creator: &operations.GetAliasCreator{ + UID: "96SnxkFiMyVKsK3pnoHfx3Hz", + Email: "john-doe@gmail.com", + Username: "john-doe", + }, + DeletedAt: types.Float64(1540095775941), + Deployment: &operations.Deployment{ + ID: "dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx", + URL: "my-instant-deployment-3ij3cxz9qr.now.sh", + Meta: types.String("{}"), + }, + DeploymentID: types.String("dpl_5m8CQaRBm3FnWRW1od3wKTpaECPx"), + ProjectID: types.String("prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB"), + UID: "", + UpdatedAt: types.Float64(1540095775941), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv4domainsprice.go b/src/__tests__/mockserver/internal/handler/pathgetv4domainsprice.go new file mode 100644 index 00000000..ced5c810 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv4domainsprice.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV4DomainsPrice(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "checkDomainPrice[0]": + dir.HandlerFunc("checkDomainPrice", testCheckDomainPriceCheckDomainPrice0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCheckDomainPriceCheckDomainPrice0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CheckDomainPriceResponseBody{ + Price: 20, + Period: 1, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv4domainsstatus.go b/src/__tests__/mockserver/internal/handler/pathgetv4domainsstatus.go new file mode 100644 index 00000000..37086229 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv4domainsstatus.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV4DomainsStatus(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "checkDomainStatus[0]": + dir.HandlerFunc("checkDomainStatus", testCheckDomainStatusCheckDomainStatus0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCheckDomainStatusCheckDomainStatus0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CheckDomainStatusResponseBody{ + Available: true, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv5domains.go b/src/__tests__/mockserver/internal/handler/pathgetv5domains.go new file mode 100644 index 00000000..d0d6e936 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv5domains.go @@ -0,0 +1,100 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV5Domains(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDomains[0]": + dir.HandlerFunc("getDomains", testGetDomainsGetDomains0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetDomainsGetDomains0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetDomainsResponseBody{ + Domains: []operations.Domains{ + operations.Domains{ + Verified: true, + Nameservers: []string{ + "ns1.nameserver.net", + "ns2.nameserver.net", + }, + IntendedNameservers: []string{ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com", + }, + CustomNameservers: []string{ + "ns1.nameserver.net", + "ns2.nameserver.net", + }, + Creator: operations.GetDomainsCreator{ + Username: "vercel_user", + Email: "demo@example.com", + ID: "ZspSRT4ljIEEmMHgoDwKWDei", + }, + TeamID: types.String(""), + CreatedAt: 1613602938882, + BoughtAt: types.Float64(1613602938882), + ExpiresAt: types.Float64(1613602938882), + ID: "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + Name: "example.com", + OrderedAt: types.Float64(1613602938882), + Renew: types.Bool(true), + ServiceType: operations.GetDomainsServiceTypeZeitWorld, + TransferredAt: types.Float64(1613602938882), + TransferStartedAt: types.Float64(1613602938882), + UserID: "", + }, + }, + Pagination: components.Pagination{ + Count: 20, + Next: types.Float64(1540095775951), + Prev: types.Float64(1540095775951), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv5domainsdomain.go b/src/__tests__/mockserver/internal/handler/pathgetv5domainsdomain.go new file mode 100644 index 00000000..02568d58 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv5domainsdomain.go @@ -0,0 +1,93 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV5DomainsDomain(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDomain[0]": + dir.HandlerFunc("getDomain", testGetDomainGetDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetDomainGetDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetDomainResponseBody{ + Domain: operations.GetDomainDomain{ + Suffix: true, + Verified: true, + Nameservers: []string{ + "ns1.nameserver.net", + "ns2.nameserver.net", + }, + IntendedNameservers: []string{ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com", + }, + CustomNameservers: []string{ + "ns1.nameserver.net", + "ns2.nameserver.net", + }, + Creator: operations.GetDomainCreator{ + Username: "vercel_user", + Email: "demo@example.com", + ID: "ZspSRT4ljIEEmMHgoDwKWDei", + }, + TeamID: types.String(""), + BoughtAt: types.Float64(1613602938882), + CreatedAt: 1613602938882, + ExpiresAt: types.Float64(1613602938882), + ID: "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + Name: "example.com", + OrderedAt: types.Float64(1613602938882), + Renew: types.Bool(true), + ServiceType: operations.ServiceTypeZeitWorld, + TransferredAt: types.Float64(1613602938882), + TransferStartedAt: types.Float64(1613602938882), + UserID: "", + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv5usertokens.go b/src/__tests__/mockserver/internal/handler/pathgetv5usertokens.go new file mode 100644 index 00000000..3703f1e7 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv5usertokens.go @@ -0,0 +1,104 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV5UserTokens(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listAuthTokens[0]": + dir.HandlerFunc("listAuthTokens", testListAuthTokensListAuthTokens0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListAuthTokensListAuthTokens0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ListAuthTokensResponseBody{ + Tokens: []components.AuthToken{ + components.AuthToken{ + ID: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + Name: "", + Type: "oauth2-token", + Origin: types.String("github"), + ExpiresAt: types.Float64(1632816536002), + ActiveAt: 1632816536002, + CreatedAt: 1632816536002, + }, + components.AuthToken{ + ID: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + Name: "", + Type: "oauth2-token", + Origin: types.String("github"), + ExpiresAt: types.Float64(1632816536002), + ActiveAt: 1632816536002, + CreatedAt: 1632816536002, + }, + components.AuthToken{ + ID: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + Name: "", + Type: "oauth2-token", + Origin: types.String("github"), + ExpiresAt: types.Float64(1632816536002), + ActiveAt: 1632816536002, + CreatedAt: 1632816536002, + }, + }, + TestingToken: &components.AuthToken{ + ID: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + Name: "", + Type: "oauth2-token", + Origin: types.String("github"), + ExpiresAt: types.Float64(1632816536002), + ActiveAt: 1632816536002, + CreatedAt: 1632816536002, + }, + Pagination: components.Pagination{ + Count: 20, + Next: types.Float64(1540095775951), + Prev: types.Float64(1540095775951), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv5usertokenstokenid.go b/src/__tests__/mockserver/internal/handler/pathgetv5usertokenstokenid.go new file mode 100644 index 00000000..4bd544f1 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv5usertokenstokenid.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV5UserTokensTokenID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getAuthToken[0]": + dir.HandlerFunc("getAuthToken", testGetAuthTokenGetAuthToken0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetAuthTokenGetAuthToken0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetAuthTokenResponseBody{ + Token: components.AuthToken{ + ID: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + Name: "", + Type: "oauth2-token", + Origin: types.String("github"), + ExpiresAt: types.Float64(1632816536002), + ActiveAt: 1632816536002, + CreatedAt: 1632816536002, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv6deployments.go b/src/__tests__/mockserver/internal/handler/pathgetv6deployments.go new file mode 100644 index 00000000..b21d7584 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv6deployments.go @@ -0,0 +1,118 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV6Deployments(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDeployments[0]": + dir.HandlerFunc("getDeployments", testGetDeploymentsGetDeployments0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetDeploymentsGetDeployments0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetDeploymentsResponseBody{ + Pagination: components.Pagination{ + Count: 20, + Next: types.Float64(1540095775951), + Prev: types.Float64(1540095775951), + }, + Deployments: []operations.Deployments{ + operations.Deployments{ + UID: "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa", + Name: "docs", + URL: "docs-9jaeg38me.vercel.app", + Created: 1609492210000, + Deleted: types.Float64(1609492210000), + Undeleted: types.Float64(1609492210000), + SoftDeletedByRetention: types.Bool(true), + Source: operations.GetDeploymentsSourceCli.ToPointer(), + State: operations.GetDeploymentsStateReady.ToPointer(), + ReadyState: operations.GetDeploymentsReadyStateReady.ToPointer(), + Type: operations.GetDeploymentsTypeLambdas, + Creator: operations.GetDeploymentsCreator{ + UID: "eLrCnEgbKhsHyfbiNR7E8496", + Email: types.String("example@example.com"), + Username: types.String("johndoe"), + GithubLogin: types.String("johndoe"), + GitlabLogin: types.String("johndoe"), + }, + Target: operations.GetDeploymentsTargetProduction.ToPointer(), + CreatedAt: types.Float64(1609492210000), + BuildingAt: types.Float64(1609492210000), + Ready: types.Float64(1609492210000), + InspectorURL: types.String("https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq"), + }, + operations.Deployments{ + UID: "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa", + Name: "docs", + URL: "docs-9jaeg38me.vercel.app", + Created: 1609492210000, + Deleted: types.Float64(1609492210000), + Undeleted: types.Float64(1609492210000), + SoftDeletedByRetention: types.Bool(true), + Source: operations.GetDeploymentsSourceCli.ToPointer(), + State: operations.GetDeploymentsStateReady.ToPointer(), + ReadyState: operations.GetDeploymentsReadyStateReady.ToPointer(), + Type: operations.GetDeploymentsTypeLambdas, + Creator: operations.GetDeploymentsCreator{ + UID: "eLrCnEgbKhsHyfbiNR7E8496", + Email: types.String("example@example.com"), + Username: types.String("johndoe"), + GithubLogin: types.String("johndoe"), + GitlabLogin: types.String("johndoe"), + }, + Target: operations.GetDeploymentsTargetProduction.ToPointer(), + CreatedAt: types.Float64(1609492210000), + BuildingAt: types.Float64(1609492210000), + Ready: types.Float64(1609492210000), + InspectorURL: types.String("https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq"), + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv6deploymentsidfiles.go b/src/__tests__/mockserver/internal/handler/pathgetv6deploymentsidfiles.go new file mode 100644 index 00000000..62ed5c7b --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv6deploymentsidfiles.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV6DeploymentsIDFiles(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listDeploymentFiles[0]": + dir.HandlerFunc("listDeploymentFiles", testListDeploymentFilesListDeploymentFiles0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testListDeploymentFilesListDeploymentFiles0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := []components.FileTree{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv6domainsdomainconfig.go b/src/__tests__/mockserver/internal/handler/pathgetv6domainsdomainconfig.go new file mode 100644 index 00000000..dc7dd79f --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv6domainsdomainconfig.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV6DomainsDomainConfig(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDomainConfig[0]": + dir.HandlerFunc("getDomainConfig", testGetDomainConfigGetDomainConfig0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetDomainConfigGetDomainConfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetDomainConfigResponseBody{ + Misconfigured: true, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv7certsid.go b/src/__tests__/mockserver/internal/handler/pathgetv7certsid.go new file mode 100644 index 00000000..75e9a276 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv7certsid.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV7CertsID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getCertById[0]": + dir.HandlerFunc("getCertById", testGetCertByIDGetCertById0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetCertByIDGetCertById0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetCertByIDResponseBody{ + ID: "", + CreatedAt: 227.13, + ExpiresAt: 3995.77, + AutoRenew: false, + Cns: []string{ + "", + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv7deploymentsidfilesfileid.go b/src/__tests__/mockserver/internal/handler/pathgetv7deploymentsidfilesfileid.go new file mode 100644 index 00000000..903160ab --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv7deploymentsidfilesfileid.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV7DeploymentsIDFilesFileID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDeploymentFileContents[0]": + dir.HandlerFunc("getDeploymentFileContents", testGetDeploymentFileContentsGetDeploymentFileContents0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetDeploymentFileContentsGetDeploymentFileContents0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv8artifactshash.go b/src/__tests__/mockserver/internal/handler/pathgetv8artifactshash.go new file mode 100644 index 00000000..d5ee36ec --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv8artifactshash.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/handler/values" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV8ArtifactsHash(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "downloadArtifact[0]": + dir.HandlerFunc("downloadArtifact", testDownloadArtifactDownloadArtifact0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testDownloadArtifactDownloadArtifact0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBodyBytes := values.ReadFileToBytes("./testdata/example.file") + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv8artifactsstatus.go b/src/__tests__/mockserver/internal/handler/pathgetv8artifactsstatus.go new file mode 100644 index 00000000..1907ba5e --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv8artifactsstatus.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV8ArtifactsStatus(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "status[0]": + dir.HandlerFunc("status", testStatusStatus0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testStatusStatus0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.StatusResponseBody{ + Status: operations.StatusStatusEnabled, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv9projects.go b/src/__tests__/mockserver/internal/handler/pathgetv9projects.go new file mode 100644 index 00000000..1fc342f7 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv9projects.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV9Projects(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getProjects[0]": + dir.HandlerFunc("getProjects", testGetProjectsGetProjects0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetProjectsGetProjects0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetProjectsResponseBody{ + Projects: []operations.GetProjectsProjects{}, + Pagination: components.Pagination{ + Count: 20, + Next: types.Float64(1540095775951), + Prev: types.Float64(1540095775951), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamecustomenvironments.go b/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamecustomenvironments.go new file mode 100644 index 00000000..f28a9fb5 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamecustomenvironments.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV9ProjectsIDOrNameCustomEnvironments(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "get_/v9/projects/{idOrName}/custom-environments[0]": + dir.HandlerFunc("get_/v9/projects/{idOrName}/custom-environments", testGetV9ProjectsIDOrNameCustomEnvironmentsGetV9ProjectsIDOrNameCustomEnvironments0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetV9ProjectsIDOrNameCustomEnvironmentsGetV9ProjectsIDOrNameCustomEnvironments0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetV9ProjectsIDOrNameCustomEnvironmentsResponseBody{ + Environments: []operations.GetV9ProjectsIDOrNameCustomEnvironmentsEnvironments{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamecustomenvironmentsenvironmentslugorid.go b/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamecustomenvironmentsenvironmentslugorid.go new file mode 100644 index 00000000..7efcaafa --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamecustomenvironmentsenvironmentslugorid.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}[0]": + dir.HandlerFunc("get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", testGetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDGetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDGetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamedomains.go b/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamedomains.go new file mode 100644 index 00000000..9228b2a4 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamedomains.go @@ -0,0 +1,74 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV9ProjectsIDOrNameDomains(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getProjectDomains[0]": + dir.HandlerFunc("getProjectDomains", testGetProjectDomainsGetProjectDomains0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetProjectDomainsGetProjectDomains0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetProjectDomainsResponseBody{ + Domains: []operations.GetProjectDomainsDomains{ + operations.GetProjectDomainsDomains{ + Name: "", + ApexName: "", + ProjectID: "", + Verified: true, + }, + }, + Pagination: components.Pagination{ + Count: 20, + Next: types.Float64(1540095775951), + Prev: types.Float64(1540095775951), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamedomainsdomain.go b/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamedomainsdomain.go new file mode 100644 index 00000000..c814c37a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetv9projectsidornamedomainsdomain.go @@ -0,0 +1,63 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetV9ProjectsIDOrNameDomainsDomain(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getProjectDomain[0]": + dir.HandlerFunc("getProjectDomain", testGetProjectDomainGetProjectDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testGetProjectDomainGetProjectDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.GetProjectDomainResponseBody{ + Name: "", + ApexName: "", + ProjectID: "", + Verified: true, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathheadv8artifactshash.go b/src/__tests__/mockserver/internal/handler/pathheadv8artifactshash.go new file mode 100644 index 00000000..73410963 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathheadv8artifactshash.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathHeadV8ArtifactsHash(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "artifactExists[0]": + dir.HandlerFunc("artifactExists", testArtifactExistsArtifactExists0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testArtifactExistsArtifactExists0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv12deploymentsidcancel.go b/src/__tests__/mockserver/internal/handler/pathpatchv12deploymentsidcancel.go new file mode 100644 index 00000000..7f30eb1d --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv12deploymentsidcancel.go @@ -0,0 +1,117 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV12DeploymentsIDCancel(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "cancelDeployment[0]": + dir.HandlerFunc("cancelDeployment", testCancelDeploymentCancelDeployment0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCancelDeploymentCancelDeployment0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CancelDeploymentResponseBody{ + Build: operations.CancelDeploymentBuild{ + Env: []string{ + "", + "", + "", + }, + }, + Env: []string{ + "", + "", + }, + InspectorURL: types.String("https://concrete-gerbil.org"), + IsInConcurrentBuildsQueue: false, + IsInSystemBuildsQueue: true, + ProjectSettings: operations.CancelDeploymentProjectSettings{}, + AliasAssigned: false, + BootedAt: 8528.74, + BuildingAt: 7590.78, + BuildSkipped: false, + Creator: operations.CancelDeploymentCreator{ + UID: "", + }, + Public: true, + Status: operations.CancelDeploymentStatusBuilding, + ID: "", + CreatedAt: 3071.53, + Name: "", + Meta: map[string]string{ + "key": "", + "key1": "", + "key2": "", + }, + ReadyState: operations.CancelDeploymentReadyStateQueued, + Regions: []string{ + "", + }, + Type: operations.CancelDeploymentTypeLambdas, + URL: "https://timely-reboot.name", + Version: 6067.47, + CreatedIn: "", + OwnerID: "", + Plan: operations.CancelDeploymentPlanPro, + ProjectID: "", + Routes: []operations.CancelDeploymentRoutes{ + operations.CreateCancelDeploymentRoutesCancelDeploymentRoutes2( + operations.CancelDeploymentRoutes2{ + Handle: operations.CancelDeploymentRoutesHandleResource, + }, + ), + operations.CreateCancelDeploymentRoutesCancelDeploymentRoutes1( + operations.CancelDeploymentRoutes1{ + Src: "", + Continue: types.Bool(false), + Middleware: types.Float64(6618.12), + }, + ), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv1accessgroupsaccessgroupidornameprojectsprojectid.go b/src/__tests__/mockserver/internal/handler/pathpatchv1accessgroupsaccessgroupidornameprojectsprojectid.go new file mode 100644 index 00000000..bc5d19da --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv1accessgroupsaccessgroupidornameprojectsprojectid.go @@ -0,0 +1,153 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV1AccessGroupsAccessGroupIDOrNameProjectsProjectID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateAccessGroupProject[0]": + dir.HandlerFunc("updateAccessGroupProject", testUpdateAccessGroupProjectUpdateAccessGroupProject0)(w, req) + case "updateAccessGroupProject-id[0]": + dir.HandlerFunc("updateAccessGroupProject", testUpdateAccessGroupProjectUpdateAccessGroupProjectId0)(w, req) + case "updateAccessGroupProject-name[0]": + dir.HandlerFunc("updateAccessGroupProject", testUpdateAccessGroupProjectUpdateAccessGroupProjectName0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateAccessGroupProjectUpdateAccessGroupProject0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateAccessGroupProjectResponseBody{ + TeamID: "", + AccessGroupID: "", + ProjectID: "", + Role: operations.UpdateAccessGroupProjectAccessGroupsRoleAdmin, + CreatedAt: "", + UpdatedAt: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testUpdateAccessGroupProjectUpdateAccessGroupProjectId0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateAccessGroupProjectResponseBody{ + TeamID: "", + AccessGroupID: "", + ProjectID: "", + Role: operations.UpdateAccessGroupProjectAccessGroupsRoleAdmin, + CreatedAt: "1706645964469", + UpdatedAt: "1735872085577", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testUpdateAccessGroupProjectUpdateAccessGroupProjectName0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateAccessGroupProjectResponseBody{ + TeamID: "", + AccessGroupID: "", + ProjectID: "", + Role: operations.UpdateAccessGroupProjectAccessGroupsRoleAdmin, + CreatedAt: "1708158031858", + UpdatedAt: "1735838146635", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv1datacacheprojectsprojectid.go b/src/__tests__/mockserver/internal/handler/pathpatchv1datacacheprojectsprojectid.go new file mode 100644 index 00000000..e9ec4c9b --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv1datacacheprojectsprojectid.go @@ -0,0 +1,151 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV1DataCacheProjectsProjectID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateProjectDataCache[0]": + dir.HandlerFunc("updateProjectDataCache", testUpdateProjectDataCacheUpdateProjectDataCache0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateProjectDataCacheUpdateProjectDataCache0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateProjectDataCacheResponseBody{ + AccountID: "", + Crons: &operations.Crons{ + EnabledAt: 7135.80, + DisabledAt: types.Float64(2989.85), + UpdatedAt: 6226.22, + DeploymentID: types.String(""), + Definitions: []operations.Definitions{ + operations.Definitions{ + Host: "vercel.com", + Path: "/api/crons/sync-something?hello=world", + Schedule: "0 0 * * *", + }, + operations.Definitions{ + Host: "vercel.com", + Path: "/api/crons/sync-something?hello=world", + Schedule: "0 0 * * *", + }, + operations.Definitions{ + Host: "vercel.com", + Path: "/api/crons/sync-something?hello=world", + Schedule: "0 0 * * *", + }, + }, + }, + DirectoryListing: false, + ID: "", + LatestDeployments: []operations.LatestDeployments{ + operations.LatestDeployments{ + ID: "", + CreatedAt: 5719.60, + CreatedIn: "", + Creator: &operations.UpdateProjectDataCacheProjectsCreator{ + Email: "Braeden15@gmail.com", + UID: "", + Username: "Teresa84", + }, + DeploymentHostname: "", + Name: "", + Plan: operations.UpdateProjectDataCacheProjectsPlanPro, + PreviewCommentsEnabled: types.Bool(false), + Private: false, + ReadyState: operations.UpdateProjectDataCacheProjectsReadyStateBuilding, + Type: operations.UpdateProjectDataCacheTypeLambdas, + URL: "https://unknown-gift.biz", + UserID: "", + }, + operations.LatestDeployments{ + ID: "", + CreatedAt: 7644.50, + CreatedIn: "", + Creator: &operations.UpdateProjectDataCacheProjectsCreator{ + Email: "Erich.Mann@hotmail.com", + UID: "", + Username: "Genoveva89", + }, + DeploymentHostname: "", + Name: "", + Plan: operations.UpdateProjectDataCacheProjectsPlanHobby, + PreviewCommentsEnabled: types.Bool(false), + Private: true, + ReadyState: operations.UpdateProjectDataCacheProjectsReadyStateError, + Type: operations.UpdateProjectDataCacheTypeLambdas, + URL: "https://slimy-tuba.name", + UserID: "", + }, + operations.LatestDeployments{ + ID: "", + CreatedAt: 2357.62, + CreatedIn: "", + Creator: &operations.UpdateProjectDataCacheProjectsCreator{ + Email: "Garret.Ferry81@gmail.com", + UID: "", + Username: "Vivianne.Gutkowski", + }, + DeploymentHostname: "", + Name: "", + Plan: operations.UpdateProjectDataCacheProjectsPlanPro, + PreviewCommentsEnabled: types.Bool(false), + Private: true, + ReadyState: operations.UpdateProjectDataCacheProjectsReadyStateCanceled, + Type: operations.UpdateProjectDataCacheTypeLambdas, + URL: "https://astonishing-cinema.net/", + UserID: "", + }, + }, + Name: "", + NodeVersion: operations.UpdateProjectDataCacheNodeVersionTenX, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv1deploymentsdeploymentidcheckscheckid.go b/src/__tests__/mockserver/internal/handler/pathpatchv1deploymentsdeploymentidcheckscheckid.go new file mode 100644 index 00000000..897827f0 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv1deploymentsdeploymentidcheckscheckid.go @@ -0,0 +1,71 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV1DeploymentsDeploymentIDChecksCheckID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateCheck[0]": + dir.HandlerFunc("updateCheck", testUpdateCheckUpdateCheck0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateCheckUpdateCheck0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateCheckResponseBody{ + ID: "", + Name: "", + Status: operations.UpdateCheckStatusCompleted, + Blocking: true, + IntegrationID: "", + DeploymentID: "", + CreatedAt: 9017.64, + UpdatedAt: 7909.85, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv1domainsrecordsrecordid.go b/src/__tests__/mockserver/internal/handler/pathpatchv1domainsrecordsrecordid.go new file mode 100644 index 00000000..652410fd --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv1domainsrecordsrecordid.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV1DomainsRecordsRecordID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateRecord[0]": + dir.HandlerFunc("updateRecord", testUpdateRecordUpdateRecord0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateRecordUpdateRecord0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateRecordResponseBody{ + Creator: "", + Domain: "rectangular-peninsula.net", + ID: "", + Name: "", + RecordType: operations.RecordTypeSrv, + Type: operations.UpdateRecordDNSTypeRecordSys, + Value: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv1projectsidornameprotectionbypass.go b/src/__tests__/mockserver/internal/handler/pathpatchv1projectsidornameprotectionbypass.go new file mode 100644 index 00000000..5ce7a116 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv1projectsidornameprotectionbypass.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV1ProjectsIDOrNameProtectionBypass(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateProjectProtectionBypass[0]": + dir.HandlerFunc("updateProjectProtectionBypass", testUpdateProjectProtectionBypassUpdateProjectProtectionBypass0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateProjectProtectionBypassUpdateProjectProtectionBypass0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateProjectProtectionBypassResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv1securityfirewallconfig.go b/src/__tests__/mockserver/internal/handler/pathpatchv1securityfirewallconfig.go new file mode 100644 index 00000000..fc42c7a3 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv1securityfirewallconfig.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV1SecurityFirewallConfig(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateFirewallConfig[0]": + dir.HandlerFunc("updateFirewallConfig", testUpdateFirewallConfigUpdateFirewallConfig0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateFirewallConfigUpdateFirewallConfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateFirewallConfigResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv1teamsteamidmembersuid.go b/src/__tests__/mockserver/internal/handler/pathpatchv1teamsteamidmembersuid.go new file mode 100644 index 00000000..82ed00ef --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv1teamsteamidmembersuid.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV1TeamsTeamIDMembersUID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateTeamMember[0]": + dir.HandlerFunc("updateTeamMember", testUpdateTeamMemberUpdateTeamMember0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateTeamMemberUpdateTeamMember0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateTeamMemberResponseBody{ + ID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv2teamsteamid.go b/src/__tests__/mockserver/internal/handler/pathpatchv2teamsteamid.go new file mode 100644 index 00000000..7598c33f --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv2teamsteamid.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV2TeamsTeamID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "patchTeam[0]": + dir.HandlerFunc("patchTeam", testPatchTeamPatchTeam0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testPatchTeamPatchTeam0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := map[string]any{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidorname.go b/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidorname.go new file mode 100644 index 00000000..fa61bb0b --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidorname.go @@ -0,0 +1,148 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV9ProjectsIDOrName(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateProject[0]": + dir.HandlerFunc("updateProject", testUpdateProjectUpdateProject0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateProjectUpdateProject0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateProjectResponseBody{ + AccountID: "", + Crons: &operations.UpdateProjectCrons{ + EnabledAt: 6482.22, + DisabledAt: types.Float64(3040.87), + UpdatedAt: 9398.85, + DeploymentID: types.String(""), + Definitions: []operations.UpdateProjectDefinitions{ + operations.UpdateProjectDefinitions{ + Host: "vercel.com", + Path: "/api/crons/sync-something?hello=world", + Schedule: "0 0 * * *", + }, + operations.UpdateProjectDefinitions{ + Host: "vercel.com", + Path: "/api/crons/sync-something?hello=world", + Schedule: "0 0 * * *", + }, + }, + }, + DirectoryListing: true, + ID: "", + LatestDeployments: []operations.UpdateProjectLatestDeployments{ + operations.UpdateProjectLatestDeployments{ + ID: "", + CreatedAt: 7688.55, + CreatedIn: "", + Creator: &operations.UpdateProjectCreator{ + Email: "Alfredo_Murazik@yahoo.com", + UID: "", + Username: "Kiera28", + }, + DeploymentHostname: "", + Name: "", + Plan: operations.UpdateProjectPlanEnterprise, + PreviewCommentsEnabled: types.Bool(false), + Private: false, + ReadyState: operations.UpdateProjectReadyStateError, + Type: operations.UpdateProjectProjectsTypeLambdas, + URL: "https://close-premise.net/", + UserID: "", + }, + operations.UpdateProjectLatestDeployments{ + ID: "", + CreatedAt: 3847.37, + CreatedIn: "", + Creator: &operations.UpdateProjectCreator{ + Email: "Zachery.Johns68@yahoo.com", + UID: "", + Username: "Nicole_Reynolds", + }, + DeploymentHostname: "", + Name: "", + Plan: operations.UpdateProjectPlanHobby, + PreviewCommentsEnabled: types.Bool(false), + Private: true, + ReadyState: operations.UpdateProjectReadyStateQueued, + Type: operations.UpdateProjectProjectsTypeLambdas, + URL: "https://unsightly-newsstand.net/", + UserID: "", + }, + }, + Name: "", + NodeVersion: operations.UpdateProjectProjectsNodeVersionFourteenX, + Targets: map[string]operations.UpdateProjectTargets{ + "key": operations.UpdateProjectTargets{ + ID: "", + CreatedAt: 5163.13, + CreatedIn: "", + Creator: &operations.UpdateProjectProjectsCreator{ + Email: "Joyce_Hodkiewicz46@yahoo.com", + UID: "", + Username: "Bud.Bogan18", + }, + DeploymentHostname: "", + Name: "", + Plan: operations.UpdateProjectProjectsPlanPro, + PreviewCommentsEnabled: types.Bool(false), + Private: true, + ReadyState: operations.UpdateProjectProjectsReadyStateQueued, + Type: operations.UpdateProjectProjectsResponseTypeLambdas, + URL: "https://frugal-coordination.net/", + UserID: "", + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidornamecustomenvironmentsenvironmentslugorid.go b/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidornamecustomenvironmentsenvironmentslugorid.go new file mode 100644 index 00000000..1eff425e --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidornamecustomenvironmentsenvironmentslugorid.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}[0]": + dir.HandlerFunc("patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", testPatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDPatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testPatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDPatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrID0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidornamedomainsdomain.go b/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidornamedomainsdomain.go new file mode 100644 index 00000000..c703fa32 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchv9projectsidornamedomainsdomain.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchV9ProjectsIDOrNameDomainsDomain(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateProjectDomain[0]": + dir.HandlerFunc("updateProjectDomain", testUpdateProjectDomainUpdateProjectDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateProjectDomainUpdateProjectDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateProjectDomainResponseBody{ + Name: "", + ApexName: "", + ProjectID: "", + Verified: false, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv10projects.go b/src/__tests__/mockserver/internal/handler/pathpostv10projects.go new file mode 100644 index 00000000..c384cff7 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv10projects.go @@ -0,0 +1,129 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV10Projects(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createProject[0]": + dir.HandlerFunc("createProject", testCreateProjectCreateProject0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateProjectCreateProject0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateProjectResponseBody{ + AccountID: "", + Crons: &operations.CreateProjectCrons{ + EnabledAt: 5535.60, + DisabledAt: types.Float64(7749.32), + UpdatedAt: 4248.45, + DeploymentID: types.String(""), + Definitions: []operations.CreateProjectDefinitions{ + operations.CreateProjectDefinitions{ + Host: "vercel.com", + Path: "/api/crons/sync-something?hello=world", + Schedule: "0 0 * * *", + }, + operations.CreateProjectDefinitions{ + Host: "vercel.com", + Path: "/api/crons/sync-something?hello=world", + Schedule: "0 0 * * *", + }, + }, + }, + DirectoryListing: false, + ID: "", + LatestDeployments: []operations.CreateProjectLatestDeployments{ + operations.CreateProjectLatestDeployments{ + ID: "", + CreatedAt: 3954.07, + CreatedIn: "", + Creator: &operations.CreateProjectCreator{ + Email: "Junior46@yahoo.com", + UID: "", + Username: "Rick.Fritsch", + }, + DeploymentHostname: "", + Name: "", + Plan: operations.CreateProjectPlanEnterprise, + PreviewCommentsEnabled: types.Bool(false), + Private: false, + ReadyState: operations.CreateProjectReadyStateCanceled, + Type: operations.CreateProjectProjectsResponse200TypeLambdas, + URL: "https://potable-bid.biz", + UserID: "", + }, + }, + Name: "", + NodeVersion: operations.CreateProjectNodeVersionTwentyTwoX, + Targets: map[string]operations.CreateProjectTargets{ + "key": operations.CreateProjectTargets{ + ID: "", + CreatedAt: 1667.88, + CreatedIn: "", + Creator: &operations.CreateProjectProjectsCreator{ + Email: "Mustafa49@yahoo.com", + UID: "", + Username: "Roberta.Cormier", + }, + DeploymentHostname: "", + Name: "", + Plan: operations.CreateProjectProjectsPlanHobby, + PreviewCommentsEnabled: types.Bool(false), + Private: false, + ReadyState: operations.CreateProjectProjectsReadyStateInitializing, + Type: operations.CreateProjectProjectsResponse200ApplicationJSONTypeLambdas, + URL: "https://formal-breastplate.org", + UserID: "", + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv10projectsidornamedomains.go b/src/__tests__/mockserver/internal/handler/pathpostv10projectsidornamedomains.go new file mode 100644 index 00000000..de9e362f --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv10projectsidornamedomains.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV10ProjectsIDOrNameDomains(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "addProjectDomain[0]": + dir.HandlerFunc("addProjectDomain", testAddProjectDomainAddProjectDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testAddProjectDomainAddProjectDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.AddProjectDomainResponseBody{ + Name: "", + ApexName: "", + ProjectID: "", + Verified: true, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv10projectsidornameenv.go b/src/__tests__/mockserver/internal/handler/pathpostv10projectsidornameenv.go new file mode 100644 index 00000000..e103e62f --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv10projectsidornameenv.go @@ -0,0 +1,76 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV10ProjectsIDOrNameEnv(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createProjectEnv[0]": + dir.HandlerFunc("createProjectEnv", testCreateProjectEnvCreateProjectEnv0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateProjectEnvCreateProjectEnv0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateProjectEnvResponseBody{ + Created: operations.CreateCreatedArrayOfCreated2( + []operations.Created2{ + operations.Created2{}, + }, + ), + Failed: []operations.Failed{ + operations.Failed{ + Error: operations.CreateProjectEnvError{ + Code: "", + Message: "", + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv10projectsprojectidpromotedeploymentid.go b/src/__tests__/mockserver/internal/handler/pathpostv10projectsprojectidpromotedeploymentid.go new file mode 100644 index 00000000..02026bd0 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv10projectsprojectidpromotedeploymentid.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV10ProjectsProjectIDPromoteDeploymentID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "requestPromote[0]": + dir.HandlerFunc("requestPromote", testRequestPromoteRequestPromote0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRequestPromoteRequestPromote0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusCreated) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv13deployments.go b/src/__tests__/mockserver/internal/handler/pathpostv13deployments.go new file mode 100644 index 00000000..fd291c45 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv13deployments.go @@ -0,0 +1,113 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV13Deployments(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createDeployment[0]": + dir.HandlerFunc("createDeployment", testCreateDeploymentCreateDeployment0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateDeploymentCreateDeployment0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateDeploymentResponseBody{ + Build: operations.Build{ + Env: []string{}, + }, + Env: []string{ + "", + "", + "", + }, + InspectorURL: types.String("https://grave-dredger.com"), + IsInConcurrentBuildsQueue: false, + IsInSystemBuildsQueue: false, + ProjectSettings: operations.CreateDeploymentProjectSettings{}, + AliasAssigned: false, + BootedAt: 4336.60, + BuildingAt: 7030.55, + BuildSkipped: true, + Creator: operations.Creator{ + UID: "", + }, + Public: false, + Status: operations.CreateDeploymentStatusQueued, + Type: operations.CreateDeploymentTypeLambdas, + CreatedAt: 5133.44, + Name: "", + ID: "", + Version: 1218.01, + Meta: map[string]string{ + "key": "", + "key1": "", + }, + ReadyState: operations.ReadyStateInitializing, + Regions: []string{}, + URL: "https://apprehensive-perp.info/", + ProjectID: "", + OwnerID: "", + Routes: []operations.Routes{ + operations.CreateRoutesRoutes1( + operations.Routes1{ + Src: "", + }, + ), + operations.CreateRoutesRoutes1( + operations.Routes1{ + Src: "", + }, + ), + }, + Plan: operations.PlanPro, + CreatedIn: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1accessgroups.go b/src/__tests__/mockserver/internal/handler/pathpostv1accessgroups.go new file mode 100644 index 00000000..5b84df4c --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1accessgroups.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1AccessGroups(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createAccessGroup[0]": + dir.HandlerFunc("createAccessGroup", testCreateAccessGroupCreateAccessGroup0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateAccessGroupCreateAccessGroup0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateAccessGroupResponseBody{ + MembersCount: 591.78, + ProjectsCount: 3787.91, + Name: "my-access-group", + CreatedAt: "1588720733602", + TeamID: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + UpdatedAt: "1588720733602", + AccessGroupID: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1accessgroupsaccessgroupidornameprojects.go b/src/__tests__/mockserver/internal/handler/pathpostv1accessgroupsaccessgroupidornameprojects.go new file mode 100644 index 00000000..e7295bbc --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1accessgroupsaccessgroupidornameprojects.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1AccessGroupsAccessGroupIDOrNameProjects(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createAccessGroupProject[0]": + dir.HandlerFunc("createAccessGroupProject", testCreateAccessGroupProjectCreateAccessGroupProject0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateAccessGroupProjectCreateAccessGroupProject0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateAccessGroupProjectResponseBody{ + TeamID: "", + AccessGroupID: "", + ProjectID: "", + Role: operations.CreateAccessGroupProjectAccessGroupsRoleProjectViewer, + CreatedAt: "", + UpdatedAt: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1accessgroupsidorname.go b/src/__tests__/mockserver/internal/handler/pathpostv1accessgroupsidorname.go new file mode 100644 index 00000000..fa64496d --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1accessgroupsidorname.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1AccessGroupsIDOrName(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateAccessGroup[0]": + dir.HandlerFunc("updateAccessGroup", testUpdateAccessGroupUpdateAccessGroup0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateAccessGroupUpdateAccessGroup0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateAccessGroupResponseBody{ + Name: "my-access-group", + CreatedAt: "1588720733602", + TeamID: "team_123a6c5209bc3778245d011443644c8d27dc2c50", + UpdatedAt: "1588720733602", + AccessGroupID: "ag_123a6c5209bc3778245d011443644c8d27dc2c50", + MembersCount: 5, + ProjectsCount: 2, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1deploymentsdeploymentidchecks.go b/src/__tests__/mockserver/internal/handler/pathpostv1deploymentsdeploymentidchecks.go new file mode 100644 index 00000000..cb265b46 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1deploymentsdeploymentidchecks.go @@ -0,0 +1,71 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1DeploymentsDeploymentIDChecks(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createCheck[0]": + dir.HandlerFunc("createCheck", testCreateCheckCreateCheck0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateCheckCreateCheck0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateCheckResponseBody{ + ID: "chk_1a2b3c4d5e6f7g8h9i0j", + Name: "Performance Check", + Status: operations.CreateCheckStatusCompleted, + Blocking: false, + IntegrationID: "", + DeploymentID: "", + CreatedAt: 2396.37, + UpdatedAt: 1065.29, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1deploymentsdeploymentidcheckscheckidrerequest.go b/src/__tests__/mockserver/internal/handler/pathpostv1deploymentsdeploymentidcheckscheckidrerequest.go new file mode 100644 index 00000000..578f5d23 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1deploymentsdeploymentidcheckscheckidrerequest.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1DeploymentsDeploymentIDChecksCheckIDRerequest(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "rerequestCheck[0]": + dir.HandlerFunc("rerequestCheck", testRerequestCheckRerequestCheck0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRerequestCheckRerequestCheck0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RerequestCheckResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfig.go b/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfig.go new file mode 100644 index 00000000..8fb35e33 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfig.go @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1EdgeConfig(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createEdgeConfig[0]": + dir.HandlerFunc("createEdgeConfig", testCreateEdgeConfigCreateEdgeConfig0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateEdgeConfigCreateEdgeConfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateEdgeConfigResponseBody{ + SizeInBytes: 145.91, + ItemCount: 5042.97, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfigedgeconfigidschema.go b/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfigedgeconfigidschema.go new file mode 100644 index 00000000..8c44a59b --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfigedgeconfigidschema.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1EdgeConfigEdgeConfigIDSchema(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "patchEdgeConfigSchema[0]": + dir.HandlerFunc("patchEdgeConfigSchema", testPatchEdgeConfigSchemaPatchEdgeConfigSchema0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testPatchEdgeConfigSchemaPatchEdgeConfigSchema0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.PatchEdgeConfigSchemaResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfigedgeconfigidtoken.go b/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfigedgeconfigidtoken.go new file mode 100644 index 00000000..cbb3ebd2 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1edgeconfigedgeconfigidtoken.go @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1EdgeConfigEdgeConfigIDToken(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createEdgeConfigToken[0]": + dir.HandlerFunc("createEdgeConfigToken", testCreateEdgeConfigTokenCreateEdgeConfigToken0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateEdgeConfigTokenCreateEdgeConfigToken0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateEdgeConfigTokenResponseBody{ + Token: "", + ID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbilling.go b/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbilling.go new file mode 100644 index 00000000..f9185410 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbilling.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1InstallationsIntegrationConfigurationIDBilling(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "submit-billing-data[0]": + dir.HandlerFunc("submit-billing-data", testSubmitBillingDataSubmitBillingData0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testSubmitBillingDataSubmitBillingData0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusCreated) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbillinginvoices.go b/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbillinginvoices.go new file mode 100644 index 00000000..898b19b0 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbillinginvoices.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1InstallationsIntegrationConfigurationIDBillingInvoices(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "submit-invoice[0]": + dir.HandlerFunc("submit-invoice", testSubmitInvoiceSubmitInvoice0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testSubmitInvoiceSubmitInvoice0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.SubmitInvoiceResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbillinginvoicesinvoiceidactions.go b/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbillinginvoicesinvoiceidactions.go new file mode 100644 index 00000000..048d502c --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidbillinginvoicesinvoiceidactions.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1InstallationsIntegrationConfigurationIDBillingInvoicesInvoiceIDActions(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "update-invoice[0]": + dir.HandlerFunc("update-invoice", testUpdateInvoiceUpdateInvoice0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateInvoiceUpdateInvoice0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusNoContent) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidevents.go b/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidevents.go new file mode 100644 index 00000000..9b1a2fd6 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1installationsintegrationconfigurationidevents.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1InstallationsIntegrationConfigurationIDEvents(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "create-event[0]": + dir.HandlerFunc("create-event", testCreateEventCreateEvent0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateEventCreateEvent0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusCreated) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1integrationsssotoken.go b/src/__tests__/mockserver/internal/handler/pathpostv1integrationsssotoken.go new file mode 100644 index 00000000..60e7d6f7 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1integrationsssotoken.go @@ -0,0 +1,63 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1IntegrationsSsoToken(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "exchange-sso-token[0]": + dir.HandlerFunc("exchange-sso-token", testExchangeSsoTokenExchangeSsoToken0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testExchangeSsoTokenExchangeSsoToken0(w http.ResponseWriter, req *http.Request) { + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.ExchangeSsoTokenResponseBody{ + IDToken: "", + AccessToken: types.String(""), + TokenType: types.String(""), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1logdrains.go b/src/__tests__/mockserver/internal/handler/pathpostv1logdrains.go new file mode 100644 index 00000000..54011759 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1logdrains.go @@ -0,0 +1,76 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1LogDrains(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createConfigurableLogDrain[0]": + dir.HandlerFunc("createConfigurableLogDrain", testCreateConfigurableLogDrainCreateConfigurableLogDrain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateConfigurableLogDrainCreateConfigurableLogDrain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateConfigurableLogDrainResponseBody{ + ID: "", + DeliveryFormat: operations.CreateConfigurableLogDrainLogDrainsDeliveryFormatJSON, + URL: "https://close-dividend.biz", + Name: "", + OwnerID: "", + CreatedAt: 911.21, + DeletedAt: types.Float64(5254.68), + UpdatedAt: 3248.86, + Environments: []operations.CreateConfigurableLogDrainLogDrainsEnvironments{ + operations.CreateConfigurableLogDrainLogDrainsEnvironmentsPreview, + operations.CreateConfigurableLogDrainLogDrainsEnvironmentsProduction, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1projectsidornamecustomenvironments.go b/src/__tests__/mockserver/internal/handler/pathpostv1projectsidornamecustomenvironments.go new file mode 100644 index 00000000..46ef87f8 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1projectsidornamecustomenvironments.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1ProjectsIDOrNameCustomEnvironments(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/v1/projects/{idOrName}/custom-environments[0]": + dir.HandlerFunc("post_/v1/projects/{idOrName}/custom-environments", testPostV1ProjectsIDOrNameCustomEnvironmentsPostV1ProjectsIDOrNameCustomEnvironments0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testPostV1ProjectsIDOrNameCustomEnvironmentsPostV1ProjectsIDOrNameCustomEnvironments0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.PostV1ProjectsIDOrNameCustomEnvironmentsResponseBody{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1projectsidornamemembers.go b/src/__tests__/mockserver/internal/handler/pathpostv1projectsidornamemembers.go new file mode 100644 index 00000000..f285c5e5 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1projectsidornamemembers.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1ProjectsIDOrNameMembers(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "addProjectMember[0]": + dir.HandlerFunc("addProjectMember", testAddProjectMemberAddProjectMember0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testAddProjectMemberAddProjectMember0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.AddProjectMemberResponseBody{ + ID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1securityattackmode.go b/src/__tests__/mockserver/internal/handler/pathpostv1securityattackmode.go new file mode 100644 index 00000000..4e649d94 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1securityattackmode.go @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1SecurityAttackMode(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateAttackChallengeMode[0]": + dir.HandlerFunc("updateAttackChallengeMode", testUpdateAttackChallengeModeUpdateAttackChallengeMode0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateAttackChallengeModeUpdateAttackChallengeMode0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateAttackChallengeModeResponseBody{ + AttackModeEnabled: true, + AttackModeUpdatedAt: 4536.22, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1securityfirewallbypass.go b/src/__tests__/mockserver/internal/handler/pathpostv1securityfirewallbypass.go new file mode 100644 index 00000000..35ff854a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1securityfirewallbypass.go @@ -0,0 +1,77 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1SecurityFirewallBypass(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "addBypassIp[0]": + dir.HandlerFunc("addBypassIp", testAddBypassIPAddBypassIp0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testAddBypassIPAddBypassIp0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateAddBypassIPResponseBodyAddBypassIPResponseBody1( + operations.AddBypassIPResponseBody1{ + Ok: false, + Result: []operations.AddBypassIPResponseBodyResult{ + operations.AddBypassIPResponseBodyResult{ + OwnerID: "", + ID: "", + Domain: "jubilant-outrun.name", + ProjectID: "", + IsProjectRule: true, + }, + }, + Pagination: types.String(""), + }, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1teams.go b/src/__tests__/mockserver/internal/handler/pathpostv1teams.go new file mode 100644 index 00000000..057d48d9 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1teams.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1Teams(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createTeam[0]": + dir.HandlerFunc("createTeam", testCreateTeamCreateTeam0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateTeamCreateTeam0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateTeamResponseBody{ + ID: "team_nLlpyC6RE1qxqglFKbrMxlud", + Slug: "", + Billing: operations.CreateTeamBilling{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1teamsteamidmembersteamsjoin.go b/src/__tests__/mockserver/internal/handler/pathpostv1teamsteamidmembersteamsjoin.go new file mode 100644 index 00000000..c0858906 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1teamsteamidmembersteamsjoin.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1TeamsTeamIDMembersTeamsJoin(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "joinTeam[0]": + dir.HandlerFunc("joinTeam", testJoinTeamJoinTeam0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testJoinTeamJoinTeam0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.JoinTeamResponseBody{ + TeamID: "team_LLHUOMOoDlqOp8wPE4kFo9pE", + Slug: "my-team", + Name: "My Team", + From: "email", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1teamsteamidrequest.go b/src/__tests__/mockserver/internal/handler/pathpostv1teamsteamidrequest.go new file mode 100644 index 00000000..74c7671a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1teamsteamidrequest.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1TeamsTeamIDRequest(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "requestAccessToTeam[0]": + dir.HandlerFunc("requestAccessToTeam", testRequestAccessToTeamRequestAccessToTeam0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRequestAccessToTeamRequestAccessToTeam0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.RequestAccessToTeamResponseBody{ + TeamSlug: "", + TeamName: "", + Github: &operations.Github{}, + Gitlab: &operations.Gitlab{}, + Bitbucket: &operations.Bitbucket{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv1webhooks.go b/src/__tests__/mockserver/internal/handler/pathpostv1webhooks.go new file mode 100644 index 00000000..1bfb68d2 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv1webhooks.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV1Webhooks(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createWebhook[0]": + dir.HandlerFunc("createWebhook", testCreateWebhookCreateWebhook0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateWebhookCreateWebhook0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateWebhookResponseBody{ + Secret: "", + Events: []operations.CreateWebhookEvents{ + operations.CreateWebhookEventsDeploymentCreated, + }, + ID: "account_hook_GflD6EYyo7F4ViYS", + URL: "https://my-webhook.com", + OwnerID: "ZspSRT4ljIEEmMHgoDwKWDei", + CreatedAt: 1567024758130, + UpdatedAt: 1567024758130, + ProjectIds: []string{ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv2deploymentsidaliases.go b/src/__tests__/mockserver/internal/handler/pathpostv2deploymentsidaliases.go new file mode 100644 index 00000000..3d66d9a7 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv2deploymentsidaliases.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV2DeploymentsIDAliases(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "assignAlias[0]": + dir.HandlerFunc("assignAlias", testAssignAliasAssignAlias0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testAssignAliasAssignAlias0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.AssignAliasResponseBody{ + UID: "2WjyKQmM8ZnGcJsPWMrHRHrE", + Alias: "my-alias.vercel.app", + Created: types.MustTimeFromString("2017-04-26T23:00:34.232Z"), + OldDeploymentID: types.String("dpl_FjvFJncQHQcZMznrUm9EoB8sFuPa"), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv2domainsdomainrecords.go b/src/__tests__/mockserver/internal/handler/pathpostv2domainsdomainrecords.go new file mode 100644 index 00000000..e1fe3a69 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv2domainsdomainrecords.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV2DomainsDomainRecords(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createRecord[0]": + dir.HandlerFunc("createRecord", testCreateRecordCreateRecord0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateRecordCreateRecord0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateCreateRecordResponseBodyCreateRecordResponseBody2( + operations.CreateRecordResponseBody2{ + UID: "rec_V0fra8eEgQwEpFhYG2vTzC3K", + }, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv2files.go b/src/__tests__/mockserver/internal/handler/pathpostv2files.go new file mode 100644 index 00000000..0329608c --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv2files.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV2Files(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "uploadFile[0]": + dir.HandlerFunc("uploadFile", testUploadFileUploadFile0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUploadFileUploadFile0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := types.Pointer(operations.CreateUploadFileResponseBodyUploadFileResponseBody2( + operations.UploadFileResponseBody2{}, + )) + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv2integrationslogdrains.go b/src/__tests__/mockserver/internal/handler/pathpostv2integrationslogdrains.go new file mode 100644 index 00000000..14b138a2 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv2integrationslogdrains.go @@ -0,0 +1,118 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV2IntegrationsLogDrains(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createLogDrain[0]": + dir.HandlerFunc("createLogDrain", testCreateLogDrainCreateLogDrain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateLogDrainCreateLogDrain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateLogDrainResponseBody{ + ClientID: types.String("oac_xRhY4LAB7yLhUADD69EvV7ct"), + ConfigurationID: types.String("icfg_cuwj0AdCdH3BwWT4LPijCC7t"), + CreatedAt: 1558531915505, + ID: "ld_nBuA7zCID8g4QZ8g", + DeliveryFormat: operations.CreateLogDrainDeliveryFormatJSON.ToPointer(), + Name: "My first log drain", + OwnerID: "kr1PsOIzqEL5Xg6M4VZcZosf", + ProjectID: types.String("AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb"), + ProjectIds: []string{ + "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb", + }, + URL: "https://example.com/log-drain", + Sources: []operations.CreateLogDrainSources{ + operations.CreateLogDrainSourcesExternal, + }, + CreatedFrom: operations.CreateLogDrainCreatedFromIntegration.ToPointer(), + Headers: map[string]string{ + "0": "{", + "1": "\"", + "2": "A", + "3": "u", + "4": "t", + "5": "h", + "6": "o", + "7": "r", + "8": "i", + "9": "z", + "10": "a", + "11": "t", + "12": "i", + "13": "o", + "14": "n", + "15": "\"", + "16": ":", + "17": " ", + "18": "\"", + "19": "B", + "20": "e", + "21": "a", + "22": "r", + "23": "e", + "24": "r", + "25": " ", + "26": "1", + "27": "2", + "28": "3", + "29": "\"", + "30": "}", + }, + Environments: []operations.CreateLogDrainEnvironments{ + operations.CreateLogDrainEnvironmentsProduction, + }, + Branch: types.String("feature/*"), + SamplingRate: types.Float64(0.5), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv3usertokens.go b/src/__tests__/mockserver/internal/handler/pathpostv3usertokens.go new file mode 100644 index 00000000..272debab --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv3usertokens.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV3UserTokens(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createAuthToken[0]": + dir.HandlerFunc("createAuthToken", testCreateAuthTokenCreateAuthToken0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateAuthTokenCreateAuthToken0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateAuthTokenResponseBody{ + Token: components.AuthToken{ + ID: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391", + Name: "", + Type: "oauth2-token", + Origin: types.String("github"), + ExpiresAt: types.Float64(1632816536002), + ActiveAt: 1632816536002, + CreatedAt: 1632816536002, + }, + BearerToken: "uRKJSTt0L4RaSkiMj41QTkxM", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv5domains.go b/src/__tests__/mockserver/internal/handler/pathpostv5domains.go new file mode 100644 index 00000000..f9df54d5 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv5domains.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV5Domains(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createOrTransferDomain[0]": + dir.HandlerFunc("createOrTransferDomain", testCreateOrTransferDomainCreateOrTransferDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testCreateOrTransferDomainCreateOrTransferDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.CreateOrTransferDomainResponseBody{ + Domain: operations.CreateOrTransferDomainDomain{ + Verified: true, + Nameservers: []string{ + "ns1.nameserver.net", + "ns2.nameserver.net", + }, + IntendedNameservers: []string{ + "ns1.vercel-dns.com", + "ns2.vercel-dns.com", + }, + CustomNameservers: []string{ + "ns1.nameserver.net", + "ns2.nameserver.net", + }, + Creator: operations.CreateOrTransferDomainCreator{ + Username: "vercel_user", + Email: "demo@example.com", + ID: "ZspSRT4ljIEEmMHgoDwKWDei", + }, + Name: "example.com", + BoughtAt: types.Float64(1613602938882), + CreatedAt: 1613602938882, + ExpiresAt: types.Float64(1613602938882), + ID: "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", + OrderedAt: types.Float64(1613602938882), + Renew: types.Bool(true), + ServiceType: operations.CreateOrTransferDomainServiceTypeZeitWorld, + TransferredAt: types.Float64(1613602938882), + TransferStartedAt: types.Float64(1613602938882), + UserID: "", + TeamID: types.String(""), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv5domainsbuy.go b/src/__tests__/mockserver/internal/handler/pathpostv5domainsbuy.go new file mode 100644 index 00000000..fbf9d819 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv5domainsbuy.go @@ -0,0 +1,74 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV5DomainsBuy(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "buyDomain[0]": + dir.HandlerFunc("buyDomain", testBuyDomainBuyDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testBuyDomainBuyDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.BuyDomainResponseBody{ + Domain: operations.BuyDomainDomainsDomain{ + UID: "", + Ns: []string{ + "", + "", + "", + }, + Verified: false, + Created: 9374.80, + Pending: false, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv7certs.go b/src/__tests__/mockserver/internal/handler/pathpostv7certs.go new file mode 100644 index 00000000..99b0d79d --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv7certs.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV7Certs(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "issueCert[0]": + dir.HandlerFunc("issueCert", testIssueCertIssueCert0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testIssueCertIssueCert0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.IssueCertResponseBody{ + ID: "", + CreatedAt: 1842.08, + ExpiresAt: 8685.41, + AutoRenew: true, + Cns: []string{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv8artifacts.go b/src/__tests__/mockserver/internal/handler/pathpostv8artifacts.go new file mode 100644 index 00000000..ccce259a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv8artifacts.go @@ -0,0 +1,82 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV8Artifacts(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "artifactQuery[0]": + dir.HandlerFunc("artifactQuery", testArtifactQueryArtifactQuery0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testArtifactQueryArtifactQuery0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := map[string]operations.ResponseBody{ + "key": operations.CreateResponseBodyResponseBody2( + operations.ResponseBody2{ + Error: operations.Error{ + Message: "", + }, + }, + ), + "key1": operations.CreateResponseBodyResponseBody1( + operations.ResponseBody1{ + Size: 9698.01, + TaskDurationMs: 1946.74, + }, + ), + "key2": operations.CreateResponseBodyResponseBody1( + operations.ResponseBody1{ + Size: 1135.95, + TaskDurationMs: 5348.41, + }, + ), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv8artifactsevents.go b/src/__tests__/mockserver/internal/handler/pathpostv8artifactsevents.go new file mode 100644 index 00000000..3477370a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv8artifactsevents.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV8ArtifactsEvents(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "recordEvents[0]": + dir.HandlerFunc("recordEvents", testRecordEventsRecordEvents0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testRecordEventsRecordEvents0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostv9projectsidornamedomainsdomainverify.go b/src/__tests__/mockserver/internal/handler/pathpostv9projectsidornamedomainsdomainverify.go new file mode 100644 index 00000000..d9e2e013 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostv9projectsidornamedomainsdomainverify.go @@ -0,0 +1,63 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostV9ProjectsIDOrNameDomainsDomainVerify(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "verifyProjectDomain[0]": + dir.HandlerFunc("verifyProjectDomain", testVerifyProjectDomainVerifyProjectDomain0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testVerifyProjectDomainVerifyProjectDomain0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.VerifyProjectDomainResponseBody{ + Name: "", + ApexName: "", + ProjectID: "", + Verified: false, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathputv1edgeconfigedgeconfigid.go b/src/__tests__/mockserver/internal/handler/pathputv1edgeconfigedgeconfigid.go new file mode 100644 index 00000000..c1edcb19 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathputv1edgeconfigedgeconfigid.go @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPutV1EdgeConfigEdgeConfigID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateEdgeConfig[0]": + dir.HandlerFunc("updateEdgeConfig", testUpdateEdgeConfigUpdateEdgeConfig0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateEdgeConfigUpdateEdgeConfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UpdateEdgeConfigResponseBody{ + SizeInBytes: 5022.37, + ItemCount: 211.31, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathputv1installationsintegrationconfigurationidproductsintegrationproductidorslugresourcesresourceidsecrets.go b/src/__tests__/mockserver/internal/handler/pathputv1installationsintegrationconfigurationidproductsintegrationproductidorslugresourcesresourceidsecrets.go new file mode 100644 index 00000000..a2e5b9b5 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathputv1installationsintegrationconfigurationidproductsintegrationproductidorslugresourcesresourceidsecrets.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPutV1InstallationsIntegrationConfigurationIDProductsIntegrationProductIDOrSlugResourcesResourceIDSecrets(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "update-resource-secrets[0]": + dir.HandlerFunc("update-resource-secrets", testUpdateResourceSecretsUpdateResourceSecrets0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateResourceSecretsUpdateResourceSecrets0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusCreated) +} diff --git a/src/__tests__/mockserver/internal/handler/pathputv1installationsintegrationconfigurationidresourcesresourceidsecrets.go b/src/__tests__/mockserver/internal/handler/pathputv1installationsintegrationconfigurationidresourcesresourceidsecrets.go new file mode 100644 index 00000000..636be54d --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathputv1installationsintegrationconfigurationidresourcesresourceidsecrets.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPutV1InstallationsIntegrationConfigurationIDResourcesResourceIDSecrets(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "update-resource-secrets-by-id[0]": + dir.HandlerFunc("update-resource-secrets-by-id", testUpdateResourceSecretsByIDUpdateResourceSecretsById0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUpdateResourceSecretsByIDUpdateResourceSecretsById0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusCreated) +} diff --git a/src/__tests__/mockserver/internal/handler/pathputv1securityfirewallconfig.go b/src/__tests__/mockserver/internal/handler/pathputv1securityfirewallconfig.go new file mode 100644 index 00000000..666c903b --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathputv1securityfirewallconfig.go @@ -0,0 +1,207 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPutV1SecurityFirewallConfig(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "putFirewallConfig[0]": + dir.HandlerFunc("putFirewallConfig", testPutFirewallConfigPutFirewallConfig0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testPutFirewallConfigPutFirewallConfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.PutFirewallConfigResponseBody{ + Active: operations.Active{ + OwnerID: "", + ProjectKey: "", + ID: "", + Version: 4570.86, + UpdatedAt: "", + FirewallEnabled: true, + Crs: operations.PutFirewallConfigCrs{ + Sd: operations.PutFirewallConfigSd{ + Active: false, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdActionDeny, + }, + Ma: operations.PutFirewallConfigMa{ + Active: false, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaActionLog, + }, + Lfi: operations.PutFirewallConfigLfi{ + Active: false, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONActionLog, + }, + Rfi: operations.PutFirewallConfigRfi{ + Active: false, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActionDeny, + }, + Rce: operations.PutFirewallConfigRce{ + Active: false, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveActionDeny, + }, + Php: operations.PutFirewallConfigPhp{ + Active: true, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsActionDeny, + }, + Gen: operations.PutFirewallConfigGen{ + Active: false, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenActionDeny, + }, + XSS: operations.PutFirewallConfigXSS{ + Active: false, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSActionDeny, + }, + Sqli: operations.PutFirewallConfigSqli{ + Active: true, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliActionLog, + }, + Sf: operations.PutFirewallConfigSf{ + Active: true, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfActionDeny, + }, + Java: operations.PutFirewallConfigJava{ + Active: true, + Action: operations.PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaActionLog, + }, + }, + Rules: []operations.PutFirewallConfigRules{ + operations.PutFirewallConfigRules{ + ID: "", + Name: "", + Active: true, + ConditionGroup: []operations.PutFirewallConfigConditionGroup{ + operations.PutFirewallConfigConditionGroup{ + Conditions: []operations.PutFirewallConfigConditions{ + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeIPAddress, + Op: operations.PutFirewallConfigOpSuf, + }, + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeGeoAsNumber, + Op: operations.PutFirewallConfigOpPre, + }, + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeJa3Digest, + Op: operations.PutFirewallConfigOpInc, + }, + }, + }, + operations.PutFirewallConfigConditionGroup{ + Conditions: []operations.PutFirewallConfigConditions{ + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeGeoAsNumber, + Op: operations.PutFirewallConfigOpNeq, + }, + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeProtocol, + Op: operations.PutFirewallConfigOpSub, + }, + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeJa3Digest, + Op: operations.PutFirewallConfigOpSuf, + }, + }, + }, + operations.PutFirewallConfigConditionGroup{ + Conditions: []operations.PutFirewallConfigConditions{ + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeRegion, + Op: operations.PutFirewallConfigOpNeq, + }, + }, + }, + }, + Action: operations.PutFirewallConfigSecurityResponseAction{}, + }, + operations.PutFirewallConfigRules{ + ID: "", + Name: "", + Active: false, + ConditionGroup: []operations.PutFirewallConfigConditionGroup{}, + Action: operations.PutFirewallConfigSecurityResponseAction{}, + }, + operations.PutFirewallConfigRules{ + ID: "", + Name: "", + Active: false, + ConditionGroup: []operations.PutFirewallConfigConditionGroup{ + operations.PutFirewallConfigConditionGroup{ + Conditions: []operations.PutFirewallConfigConditions{ + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeScheme, + Op: operations.PutFirewallConfigOpNeq, + }, + }, + }, + operations.PutFirewallConfigConditionGroup{ + Conditions: []operations.PutFirewallConfigConditions{}, + }, + operations.PutFirewallConfigConditionGroup{ + Conditions: []operations.PutFirewallConfigConditions{ + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeHeader, + Op: operations.PutFirewallConfigOpInc, + }, + operations.PutFirewallConfigConditions{ + Type: operations.PutFirewallConfigSecurityTypeQuery, + Op: operations.PutFirewallConfigOpEq, + }, + }, + }, + }, + Action: operations.PutFirewallConfigSecurityResponseAction{}, + }, + }, + Ips: []operations.PutFirewallConfigIps{}, + Changes: []operations.PutFirewallConfigChanges{}, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathputv7certs.go b/src/__tests__/mockserver/internal/handler/pathputv7certs.go new file mode 100644 index 00000000..bc2c975a --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathputv7certs.go @@ -0,0 +1,71 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPutV7Certs(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "uploadCert[0]": + dir.HandlerFunc("uploadCert", testUploadCertUploadCert0)(w, req) + default: + http.Error(w, "Unknown test: "+test, http.StatusBadRequest) + } + } +} + +func testUploadCertUploadCert0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, true, "Bearer"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &operations.UploadCertResponseBody{ + ID: "", + CreatedAt: 9219.92, + ExpiresAt: 5530.55, + AutoRenew: true, + Cns: []string{ + "", + "", + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/values/files.go b/src/__tests__/mockserver/internal/handler/values/files.go new file mode 100644 index 00000000..6eca8858 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/values/files.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package values + +import ( + "io" + "os" +) + +func ReadFileToStream(fileName string) io.Reader { + s, err := os.Open(fileName) + if err != nil { + panic(err) + } + return s +} + +func ReadFileToBytes(fileName string) []byte { + data, err := os.ReadFile(fileName) + if err != nil { + panic(err) + } + return data +} + +func ReadFileToString(fileName string) string { + data, err := os.ReadFile(fileName) + if err != nil { + panic(err) + } + return string(data) +} + +func ReadBytes(r io.Reader) []byte { + data, err := io.ReadAll(r) + if err != nil { + panic(err) + } + return data +} diff --git a/src/__tests__/mockserver/internal/logging/doc.go b/src/__tests__/mockserver/internal/logging/doc.go new file mode 100644 index 00000000..8835f1cc --- /dev/null +++ b/src/__tests__/mockserver/internal/logging/doc.go @@ -0,0 +1,4 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +// Package logging contains the implementation and helpers for logging. +package logging diff --git a/src/__tests__/mockserver/internal/logging/formats.go b/src/__tests__/mockserver/internal/logging/formats.go new file mode 100644 index 00000000..d6ab53c8 --- /dev/null +++ b/src/__tests__/mockserver/internal/logging/formats.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "fmt" + "strings" +) + +const ( + // JSON log format. + FormatJSON = "JSON" + + // Plaintext log format. + FormatText = "text" + + // Default log format. + DefaultFormat = FormatText +) + +// Formats returns all supported formats. +func Formats() []string { + return []string{ + FormatJSON, + FormatText, + } +} + +func formatFromString(format string) (string, error) { + switch format { + case FormatJSON: + return format, nil + case FormatText: + return format, nil + default: + return "", fmt.Errorf("unsupported log format (%s), supported formats: %s", format, strings.Join(Formats(), ", ")) + } +} diff --git a/src/__tests__/mockserver/internal/logging/http_file.go b/src/__tests__/mockserver/internal/logging/http_file.go new file mode 100644 index 00000000..d690d915 --- /dev/null +++ b/src/__tests__/mockserver/internal/logging/http_file.go @@ -0,0 +1,310 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "io/fs" + "log" + "net/http" + "net/http/httptest" + "net/http/httputil" + "os" + "path/filepath" + "strconv" + "strings" + "sync" +) + +const ( + // DefaultHTTPFileDirectory is the default directory used for raw HTTP + // request and response files. + DefaultHTTPFileDirectory = "_debug" +) + +// HTTPFileDirectory is the directory where raw HTTP request and response files +// are written. +type HTTPFileDirectory struct { + // Filesystem at path. + filesystem fs.FS + + // Mapping of operations to call count. Used to sequentially increment file + // names and return current count. + operationCalls map[string]int64 + + // Mutex to protect operationCalls. + operationCallsMutex *sync.RWMutex + + // Absolute path to directory. + path string +} + +// NewHTTPFileDirectory will create a HTTPFileDirectory which exists and is a +// directory or will return an error. +func NewHTTPFileDirectory(explicitPath string) (*HTTPFileDirectory, error) { + path, err := filepath.Abs(DefaultHTTPFileDirectory) + if err != nil { + return nil, fmt.Errorf("error getting absolute path of HTTP file directory (%s): %w", DefaultHTTPFileDirectory, err) + } + + if explicitPath != "" { + absExplicitPath, err := filepath.Abs(explicitPath) + if err != nil { + return nil, fmt.Errorf("error getting absolute path of HTTP file directory (%s): %w", explicitPath, err) + } + + path = absExplicitPath + } + + result := &HTTPFileDirectory{ + filesystem: os.DirFS(path), + operationCalls: make(map[string]int64), + operationCallsMutex: new(sync.RWMutex), + path: path, + } + + fileInfo, err := os.Stat(path) + + if errors.Is(err, os.ErrNotExist) { + err := os.Mkdir(path, 0o2777) + if err != nil { + return nil, fmt.Errorf("error making HTTP file directory (%s): %w", path, err) + } + + return result, nil + } + + if err != nil { + return nil, fmt.Errorf("error reading HTTP file directory (%s): %w", path, err) + } + + if !fileInfo.IsDir() { + return nil, fmt.Errorf("error using HTTP file directory (%s): not a directory", path) + } + + return result, nil +} + +// Clean will remove all files from HTTPFileDirectory. +func (d *HTTPFileDirectory) Clean() error { + walkDirFunc := func(path string, entry fs.DirEntry, err error) error { + if err != nil { + return fmt.Errorf("error walking %s: %w", d.path, err) + } + + if path == "." { + return nil + } + + if entry.IsDir() { + return fs.SkipDir + } + + absPath := filepath.Join(d.path, path) + + err = os.Remove(absPath) + if err != nil { + return fmt.Errorf("error removing %s: %w", absPath, err) + } + + return nil + } + + return fs.WalkDir(d.filesystem, ".", walkDirFunc) +} + +// HandlerFunc is a HTTP handler that automatically writes the raw HTTP +// request and response to {path}/{operationId}_{call}_request and +// {path}/{operationId}_{call}_response files respectively. +func (d *HTTPFileDirectory) HandlerFunc(operationId string, next http.HandlerFunc) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + call := d.nextOperationCall(operationId) + + dump, err := httputil.DumpRequest(req, true) + if err != nil { + log.Printf("error dumping HTTP request: %s", err) + } + + if len(dump) > 0 { + requestPath := filepath.Join(d.path, d.operationCallRequestFilename(operationId, call)) + + err = os.WriteFile(requestPath, dump, 0o644) + if err != nil { + log.Printf("error writing HTTP request file (%s): %s", requestPath, err) + } + } + + recorder := httptest.NewRecorder() + + next(recorder, req) + + dump, err = httputil.DumpResponse(recorder.Result(), true) + if err != nil { + log.Printf("error dumping HTTP response: %s", err) + } + + if len(dump) > 0 { + responsePath := filepath.Join(d.path, d.operationCallResponseFilename(operationId, call)) + err = os.WriteFile(responsePath, dump, 0o644) + if err != nil { + log.Printf("error writing HTTP response file (%s): %s", responsePath, err) + } + } + + recorderToWriter(recorder, w) + } +} + +// Operation will return a new OASOperation from HTTPFileDirectory. +func (d *HTTPFileDirectory) Operation(operationId string) (*OASOperation, error) { + request, err := d.Request(operationId, 1) + if err != nil { + return nil, err + } + + result := NewOASOperation(d, operationId, request.Method, request.URL.Path) + + return result, nil +} + +// Operations will return all detected OASOperation from HTTPFileDirectory. +func (d *HTTPFileDirectory) Operations() ([]*OASOperation, error) { + var result []*OASOperation + + walkDirFunc := func(path string, entry fs.DirEntry, err error) error { + if err != nil { + return fmt.Errorf("error walking %s: %w", d.path, err) + } + + if !strings.HasSuffix(path, "_1_request") { + return nil + } + + operationId := strings.TrimSuffix(path, "_1_request") + operation, err := d.Operation(operationId) + if err != nil { + return err + } + + result = append(result, operation) + + return nil + } + + err := fs.WalkDir(d.filesystem, ".", walkDirFunc) + + return result, err +} + +// OperationCallCount will return the number of detected calls for an +// OASOperation. +func (d *HTTPFileDirectory) OperationCallCount(operationId string) int64 { + d.operationCallsMutex.RLock() + defer d.operationCallsMutex.RUnlock() + + result, ok := d.operationCalls[operationId] + + if ok { + return result + } + + return 0 +} + +// RawRequest returns the raw HTTP request contents as dumped by +// [httputil.DumpRequest]. +func (d *HTTPFileDirectory) RawRequest(operationId string, call int64) ([]byte, error) { + filename := d.operationCallRequestFilename(operationId, call) + file, err := fs.ReadFile(d.filesystem, filename) + if err != nil { + return nil, fmt.Errorf("error reading HTTP request file (%s): %w", filename, err) + } + + return file, nil +} + +// RawResponse returns the raw HTTP response contents as dumped by +// [httputil.DumpResponse]. +func (d *HTTPFileDirectory) RawResponse(operationId string, call int64) ([]byte, error) { + filename := d.operationCallResponseFilename(operationId, call) + file, err := fs.ReadFile(d.filesystem, d.operationCallResponseFilename(operationId, call)) + if err != nil { + return nil, fmt.Errorf("error reading HTTP response file (%s): %w", filename, err) + } + + return file, nil +} + +// Request returns the parsed HTTP request contents. +func (d *HTTPFileDirectory) Request(operationId string, call int64) (*http.Request, error) { + rawRequest, err := d.RawRequest(operationId, call) + if err != nil { + return nil, err + } + + result, err := http.ReadRequest(bufio.NewReader(bytes.NewReader(rawRequest))) + if err != nil { + return nil, fmt.Errorf("error converting HTTP request for operation %s call %d: %w", operationId, call, err) + } + + return result, nil +} + +// Response returns the parsed HTTP response contents. +func (d *HTTPFileDirectory) Response(operationId string, call int64) (*http.Response, error) { + rawResponse, err := d.RawResponse(operationId, call) + if err != nil { + return nil, err + } + + result, err := http.ReadResponse(bufio.NewReader(bytes.NewReader(rawResponse)), nil) + if err != nil { + return nil, fmt.Errorf("error converting HTTP response for operation %s call %d: %w", operationId, call, err) + } + + return result, nil +} + +// nextOperationCall returns the incremented call number for an operation. +func (d *HTTPFileDirectory) nextOperationCall(operationId string) int64 { + d.operationCallsMutex.Lock() + defer d.operationCallsMutex.Unlock() + + var result int64 + + priorCalls, ok := d.operationCalls[operationId] + + if ok { + result = priorCalls + 1 + } else { + // Start call counts at 1 for human consumption. + result = 1 + } + + d.operationCalls[operationId] = result + + return result +} + +// operationCallRequestFilename returns the raw HTTP request file name for the +// given operation and call. +func (d *HTTPFileDirectory) operationCallRequestFilename(operationId string, call int64) string { + return sanitizeOperationIdForFilename(operationId) + "_" + strconv.FormatInt(call, 10) + "_request" +} + +// operationCallResponseFilename returns the raw HTTP response file name for the +// given operation and call. +func (d *HTTPFileDirectory) operationCallResponseFilename(operationId string, call int64) string { + return sanitizeOperationIdForFilename(operationId) + "_" + strconv.FormatInt(call, 10) + "_response" +} + +func sanitizeOperationIdForFilename(operationId string) string { + operationId = strings.ReplaceAll(operationId, "{", "_") + operationId = strings.ReplaceAll(operationId, "}", "_") + operationId = strings.ReplaceAll(operationId, "/", "_") + operationId = strings.ReplaceAll(operationId, " ", "_") + return operationId +} diff --git a/src/__tests__/mockserver/internal/logging/http_logger.go b/src/__tests__/mockserver/internal/logging/http_logger.go new file mode 100644 index 00000000..fdd5d058 --- /dev/null +++ b/src/__tests__/mockserver/internal/logging/http_logger.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "context" + "fmt" + "log/slog" + "net/http" + "net/http/httptest" + "net/http/httputil" +) + +// HTTPLoggerHandler wraps another [http.Handler] with logging output using the +// provided logger. +func HTTPLoggerHandler(logger *slog.Logger, next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + httpLogger := logger.WithGroup("http") + recorder := httptest.NewRecorder() + reqAttr := slog.Group( + "request", + slog.String("method", req.Method), + slog.String("url", req.URL.RequestURI()), + ) + + if !logger.Enabled(context.Background(), slog.LevelDebug) { + httpLogger.With(reqAttr).Info("received request") + next.ServeHTTP(recorder, req) + + resp := recorder.Result() + respAttr := slog.Group( + "response", + slog.String("status", resp.Status), + ) + + httpLogger.With(reqAttr).With(respAttr).Info("serving response") + + recorderToWriter(recorder, w) + + return + } + + dump, err := httputil.DumpRequest(req, true) + + if err != nil { + http.Error(w, fmt.Sprint(err), http.StatusInternalServerError) + + return + } + + rawReqAttr := slog.Group( + "request", + slog.String("method", req.Method), + slog.String("url", req.URL.RequestURI()), + slog.String("raw", string(dump)), + ) + + httpLogger.With(rawReqAttr).Debug("received request") + + next.ServeHTTP(recorder, req) + + dump, err = httputil.DumpResponse(recorder.Result(), true) + + if err != nil { + http.Error(w, fmt.Sprint(err), http.StatusInternalServerError) + + return + } + + rawRespAttr := slog.Group( + "response", + slog.String("raw", string(dump)), + ) + + // Intentionally use simpler request log attributes + httpLogger.With(reqAttr).With(rawRespAttr).Debug("serving response") + + recorderToWriter(recorder, w) + }) +} + +// recorderToWriter copies the recorded response back to the writer. +func recorderToWriter(recorder *httptest.ResponseRecorder, w http.ResponseWriter) { + for k, v := range recorder.Result().Header { + w.Header()[k] = v + } + + w.WriteHeader(recorder.Code) + _, _ = recorder.Body.WriteTo(w) +} diff --git a/src/__tests__/mockserver/internal/logging/levels.go b/src/__tests__/mockserver/internal/logging/levels.go new file mode 100644 index 00000000..d2a8e93c --- /dev/null +++ b/src/__tests__/mockserver/internal/logging/levels.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "fmt" + "log/slog" + "strings" +) + +const ( + // Debug log level. + LevelDebug = "DEBUG" + + // Info log level. + LevelInfo = "INFO" + + // Warning log level. + LevelWarn = "WARN" + + // Error log level. + LevelError = "ERROR" + + // Default log level. + DefaultLevel = LevelInfo +) + +// Levels returns all supported levels. +func Levels() []string { + return []string{ + LevelDebug, + LevelInfo, + LevelWarn, + LevelError, + } +} + +func levelFromString(level string) (*slog.LevelVar, error) { + result := new(slog.LevelVar) + + switch strings.ToUpper(level) { + case "DEBUG": + result.Set(slog.LevelDebug) + case "INFO": + result.Set(slog.LevelInfo) + case "WARN": + result.Set(slog.LevelWarn) + case "ERROR": + result.Set(slog.LevelError) + default: + return nil, fmt.Errorf("unsupported log level (%s), supported levels: %s", level, strings.Join(Levels(), ", ")) + } + + return result, nil +} diff --git a/src/__tests__/mockserver/internal/logging/logger.go b/src/__tests__/mockserver/internal/logging/logger.go new file mode 100644 index 00000000..bfd6dc78 --- /dev/null +++ b/src/__tests__/mockserver/internal/logging/logger.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "fmt" + "io" + "log/slog" +) + +func NewLogger(w io.Writer, formatStr string, levelStr string) (*slog.Logger, error) { + level, err := levelFromString(levelStr) + + if err != nil { + return nil, err + } + + format, err := formatFromString(formatStr) + + if err != nil { + return nil, err + } + + handlerOpts := &slog.HandlerOptions{ + Level: level, + } + + var handler slog.Handler + + switch format { + case FormatJSON: + handler = slog.NewJSONHandler(w, handlerOpts) + case FormatText: + handler = slog.NewTextHandler(w, handlerOpts) + default: + return nil, fmt.Errorf("unimplemented format: %s", format) + } + + return slog.New(handler), nil +} diff --git a/src/__tests__/mockserver/internal/logging/oas_operation.go b/src/__tests__/mockserver/internal/logging/oas_operation.go new file mode 100644 index 00000000..d4f2af7b --- /dev/null +++ b/src/__tests__/mockserver/internal/logging/oas_operation.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import "net/http" + +// OASOperation contains a singular OAS operation. An operation can have one or +// more calls. +type OASOperation struct { + // Underlying HTTP calls for the operation. + calls []*OASOperationCall + + // Directory that contains HTTP request and response logs. + dir *HTTPFileDirectory + + // Operation identifier as defined in OAS. + id string + + // HTTP method for the operation, such as GET. + method string + + // URL path for the operation, such as /path. + path string + + // TODO: Add group +} + +// NewOASOperation creates a new OASOperation. +func NewOASOperation(dir *HTTPFileDirectory, operationId string, method string, path string) *OASOperation { + operationCalls := dir.OperationCallCount(operationId) + result := &OASOperation{ + calls: make([]*OASOperationCall, 0, operationCalls), + dir: dir, + id: operationId, + method: method, + path: path, + } + + for i := range operationCalls { + // Start at 1 for human consumption. + result.calls = append(result.calls, NewOASOperationCall(result, i+1)) + } + + return result +} + +// CallCount returns the number of calls to an operation. +func (o *OASOperation) CallCount() int64 { + return int64(len(o.calls)) +} + +// Id returns the operation identifier as defined in OAS. +func (o *OASOperation) Id() string { + return o.id +} + +// Method returns the HTTP method for the operation, such as GET. +func (o *OASOperation) Method() string { + return o.method +} + +// Path returns the URL path for the operation, such as /path. +func (o *OASOperation) Path() string { + return o.path +} + +// RawRequest returns the raw HTTP request contents as dumped by +// [httputil.DumpRequest]. +func (o *OASOperation) RawRequest(call int64) ([]byte, error) { + return o.dir.RawRequest(o.id, call) +} + +// RawResponse returns the raw HTTP response contents as dumped by +// [httputil.DumpResponse]. +func (o *OASOperation) RawResponse(call int64) ([]byte, error) { + return o.dir.RawResponse(o.id, call) +} + +// Request returns the parsed HTTP request contents. +func (o *OASOperation) Request(call int64) (*http.Request, error) { + return o.dir.Request(o.id, call) +} + +// Response returns the parsed HTTP response contents. +func (o *OASOperation) Response(call int64) (*http.Response, error) { + return o.dir.Response(o.id, call) +} diff --git a/src/__tests__/mockserver/internal/logging/oas_operation_call.go b/src/__tests__/mockserver/internal/logging/oas_operation_call.go new file mode 100644 index 00000000..beb05908 --- /dev/null +++ b/src/__tests__/mockserver/internal/logging/oas_operation_call.go @@ -0,0 +1,123 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "bufio" + "bytes" + "net/http" +) + +// OASOperationCall contains a singular OAS operation HTTP call. +type OASOperationCall struct { + // The HTTP call number, as determined by the HTTP server. Starts at 1 and + // incremented. + call int64 + + // The associated OAS operation to this call. + operation *OASOperation + + // Parsed HTTP request contents. Cached on first use. + request *http.Request + + // Raw HTTP request contents. Cached on first use. + requestRaw []byte + + // Parsed HTTP response contents. Cached on first use. + response *http.Response + + // Raw HTTP response contents. Cached on first use. + responseRaw []byte + + // TODO: Add test identifier +} + +// NewOASOperationCall creates a new OASOperationCall. +func NewOASOperationCall(operation *OASOperation, call int64) *OASOperationCall { + return &OASOperationCall{ + call: call, + operation: operation, + } +} + +// RawRequest returns the raw HTTP request contents as dumped by +// [httputil.DumpRequest]. +func (c *OASOperationCall) RawRequest() ([]byte, error) { + if c.requestRaw != nil { + return c.requestRaw, nil + } + + requestRaw, err := c.operation.RawRequest(c.call) + + if err != nil { + return nil, err + } + + c.requestRaw = requestRaw + + return c.requestRaw, nil +} + +// RawResponse returns the raw HTTP response contents as dumped by +// [httputil.DumpResponse]. +func (c *OASOperationCall) RawResponse() ([]byte, error) { + if c.responseRaw != nil { + return c.responseRaw, nil + } + + responseRaw, err := c.operation.RawResponse(c.call) + + if err != nil { + return nil, err + } + + c.responseRaw = responseRaw + + return c.responseRaw, nil +} + +// Request returns the parsed HTTP request contents. +func (c *OASOperationCall) Request() (*http.Request, error) { + if c.request != nil { + return c.request, nil + } + + requestRaw, err := c.RawRequest() + + if err != nil { + return nil, err + } + + request, err := http.ReadRequest(bufio.NewReader(bytes.NewReader(requestRaw))) + + if err != nil { + return nil, err + } + + c.request = request + + return c.request, nil +} + +// Response returns the parsed HTTP response contents. +func (c *OASOperationCall) Response() (*http.Response, error) { + if c.response != nil { + return c.response, nil + } + + responseRaw, err := c.RawResponse() + + if err != nil { + return nil, err + } + + response, err := http.ReadResponse(bufio.NewReader(bytes.NewReader(responseRaw)), nil) + + if err != nil { + return nil, err + } + + c.response = response + + return c.response, nil +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/aclaction.go b/src/__tests__/mockserver/internal/sdk/models/components/aclaction.go new file mode 100644 index 00000000..8306ea44 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/aclaction.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ACLAction - Enum containing the actions that can be performed against a resource. Group operations are included. +type ACLAction string + +const ( + ACLActionCreate ACLAction = "create" + ACLActionDelete ACLAction = "delete" + ACLActionRead ACLAction = "read" + ACLActionUpdate ACLAction = "update" + ACLActionList ACLAction = "list" +) + +func (e ACLAction) ToPointer() *ACLAction { + return &e +} +func (e *ACLAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "create": + fallthrough + case "delete": + fallthrough + case "read": + fallthrough + case "update": + fallthrough + case "list": + *e = ACLAction(v) + return nil + default: + return fmt.Errorf("invalid value for ACLAction: %v", v) + } +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/authtoken.go b/src/__tests__/mockserver/internal/sdk/models/components/authtoken.go new file mode 100644 index 00000000..65d82ecb --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/authtoken.go @@ -0,0 +1,375 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +type ScopesType string + +const ( + ScopesTypeTeam ScopesType = "team" +) + +func (e ScopesType) ToPointer() *ScopesType { + return &e +} +func (e *ScopesType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + *e = ScopesType(v) + return nil + default: + return fmt.Errorf("invalid value for ScopesType: %v", v) + } +} + +type AuthTokenScopesOrigin string + +const ( + AuthTokenScopesOriginSaml AuthTokenScopesOrigin = "saml" + AuthTokenScopesOriginGithub AuthTokenScopesOrigin = "github" + AuthTokenScopesOriginGitlab AuthTokenScopesOrigin = "gitlab" + AuthTokenScopesOriginBitbucket AuthTokenScopesOrigin = "bitbucket" + AuthTokenScopesOriginEmail AuthTokenScopesOrigin = "email" + AuthTokenScopesOriginManual AuthTokenScopesOrigin = "manual" + AuthTokenScopesOriginPasskey AuthTokenScopesOrigin = "passkey" + AuthTokenScopesOriginOtp AuthTokenScopesOrigin = "otp" + AuthTokenScopesOriginSms AuthTokenScopesOrigin = "sms" + AuthTokenScopesOriginInvite AuthTokenScopesOrigin = "invite" +) + +func (e AuthTokenScopesOrigin) ToPointer() *AuthTokenScopesOrigin { + return &e +} +func (e *AuthTokenScopesOrigin) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "saml": + fallthrough + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + fallthrough + case "email": + fallthrough + case "manual": + fallthrough + case "passkey": + fallthrough + case "otp": + fallthrough + case "sms": + fallthrough + case "invite": + *e = AuthTokenScopesOrigin(v) + return nil + default: + return fmt.Errorf("invalid value for AuthTokenScopesOrigin: %v", v) + } +} + +// Scopes2 - The access scopes granted to the token. +type Scopes2 struct { + Type ScopesType `json:"type"` + TeamID string `json:"teamId"` + Origin AuthTokenScopesOrigin `json:"origin"` + CreatedAt float64 `json:"createdAt"` + ExpiresAt *float64 `json:"expiresAt,omitempty"` +} + +func (o *Scopes2) GetType() ScopesType { + if o == nil { + return ScopesType("") + } + return o.Type +} + +func (o *Scopes2) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *Scopes2) GetOrigin() AuthTokenScopesOrigin { + if o == nil { + return AuthTokenScopesOrigin("") + } + return o.Origin +} + +func (o *Scopes2) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *Scopes2) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +type AuthTokenScopesType string + +const ( + AuthTokenScopesTypeUser AuthTokenScopesType = "user" +) + +func (e AuthTokenScopesType) ToPointer() *AuthTokenScopesType { + return &e +} +func (e *AuthTokenScopesType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "user": + *e = AuthTokenScopesType(v) + return nil + default: + return fmt.Errorf("invalid value for AuthTokenScopesType: %v", v) + } +} + +type ScopesOrigin string + +const ( + ScopesOriginSaml ScopesOrigin = "saml" + ScopesOriginGithub ScopesOrigin = "github" + ScopesOriginGitlab ScopesOrigin = "gitlab" + ScopesOriginBitbucket ScopesOrigin = "bitbucket" + ScopesOriginEmail ScopesOrigin = "email" + ScopesOriginManual ScopesOrigin = "manual" + ScopesOriginPasskey ScopesOrigin = "passkey" + ScopesOriginOtp ScopesOrigin = "otp" + ScopesOriginSms ScopesOrigin = "sms" + ScopesOriginInvite ScopesOrigin = "invite" +) + +func (e ScopesOrigin) ToPointer() *ScopesOrigin { + return &e +} +func (e *ScopesOrigin) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "saml": + fallthrough + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + fallthrough + case "email": + fallthrough + case "manual": + fallthrough + case "passkey": + fallthrough + case "otp": + fallthrough + case "sms": + fallthrough + case "invite": + *e = ScopesOrigin(v) + return nil + default: + return fmt.Errorf("invalid value for ScopesOrigin: %v", v) + } +} + +// Scopes1 - The access scopes granted to the token. +type Scopes1 struct { + Type AuthTokenScopesType `json:"type"` + Origin ScopesOrigin `json:"origin"` + CreatedAt float64 `json:"createdAt"` + ExpiresAt *float64 `json:"expiresAt,omitempty"` +} + +func (o *Scopes1) GetType() AuthTokenScopesType { + if o == nil { + return AuthTokenScopesType("") + } + return o.Type +} + +func (o *Scopes1) GetOrigin() ScopesOrigin { + if o == nil { + return ScopesOrigin("") + } + return o.Origin +} + +func (o *Scopes1) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *Scopes1) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +type ScopesUnionType string + +const ( + ScopesUnionTypeScopes1 ScopesUnionType = "scopes_1" + ScopesUnionTypeScopes2 ScopesUnionType = "scopes_2" +) + +type Scopes struct { + Scopes1 *Scopes1 + Scopes2 *Scopes2 + + Type ScopesUnionType +} + +func CreateScopesScopes1(scopes1 Scopes1) Scopes { + typ := ScopesUnionTypeScopes1 + + return Scopes{ + Scopes1: &scopes1, + Type: typ, + } +} + +func CreateScopesScopes2(scopes2 Scopes2) Scopes { + typ := ScopesUnionTypeScopes2 + + return Scopes{ + Scopes2: &scopes2, + Type: typ, + } +} + +func (u *Scopes) UnmarshalJSON(data []byte) error { + + var scopes1 Scopes1 = Scopes1{} + if err := utils.UnmarshalJSON(data, &scopes1, "", true, true); err == nil { + u.Scopes1 = &scopes1 + u.Type = ScopesUnionTypeScopes1 + return nil + } + + var scopes2 Scopes2 = Scopes2{} + if err := utils.UnmarshalJSON(data, &scopes2, "", true, true); err == nil { + u.Scopes2 = &scopes2 + u.Type = ScopesUnionTypeScopes2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Scopes", string(data)) +} + +func (u Scopes) MarshalJSON() ([]byte, error) { + if u.Scopes1 != nil { + return utils.MarshalJSON(u.Scopes1, "", true) + } + + if u.Scopes2 != nil { + return utils.MarshalJSON(u.Scopes2, "", true) + } + + return nil, errors.New("could not marshal union type Scopes: all fields are null") +} + +// AuthToken - Authentication token metadata. +type AuthToken struct { + // The unique identifier of the token. + ID string `json:"id"` + // The human-readable name of the token. + Name string `json:"name"` + // The type of the token. + Type string `json:"type"` + // The origin of how the token was created. + Origin *string `json:"origin,omitempty"` + // The access scopes granted to the token. + Scopes []Scopes `json:"scopes,omitempty"` + // Timestamp (in milliseconds) of when the token expires. + ExpiresAt *float64 `json:"expiresAt,omitempty"` + // Timestamp (in milliseconds) of when the token was most recently used. + ActiveAt float64 `json:"activeAt"` + // Timestamp (in milliseconds) of when the token was created. + CreatedAt float64 `json:"createdAt"` +} + +func (o *AuthToken) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *AuthToken) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *AuthToken) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *AuthToken) GetOrigin() *string { + if o == nil { + return nil + } + return o.Origin +} + +func (o *AuthToken) GetScopes() []Scopes { + if o == nil { + return nil + } + return o.Scopes +} + +func (o *AuthToken) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +func (o *AuthToken) GetActiveAt() float64 { + if o == nil { + return 0.0 + } + return o.ActiveAt +} + +func (o *AuthToken) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/authuser.go b/src/__tests__/mockserver/internal/sdk/models/components/authuser.go new file mode 100644 index 00000000..c728774b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/authuser.go @@ -0,0 +1,1275 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +type Reason string + +const ( + ReasonSubscriptionCanceled Reason = "SUBSCRIPTION_CANCELED" + ReasonSubscriptionExpired Reason = "SUBSCRIPTION_EXPIRED" + ReasonUnpaidInvoice Reason = "UNPAID_INVOICE" + ReasonEnterpriseTrialEnded Reason = "ENTERPRISE_TRIAL_ENDED" + ReasonFairUseLimitsExceeded Reason = "FAIR_USE_LIMITS_EXCEEDED" + ReasonBlockedForPlatformAbuse Reason = "BLOCKED_FOR_PLATFORM_ABUSE" +) + +func (e Reason) ToPointer() *Reason { + return &e +} +func (e *Reason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "SUBSCRIPTION_CANCELED": + fallthrough + case "SUBSCRIPTION_EXPIRED": + fallthrough + case "UNPAID_INVOICE": + fallthrough + case "ENTERPRISE_TRIAL_ENDED": + fallthrough + case "FAIR_USE_LIMITS_EXCEEDED": + fallthrough + case "BLOCKED_FOR_PLATFORM_ABUSE": + *e = Reason(v) + return nil + default: + return fmt.Errorf("invalid value for Reason: %v", v) + } +} + +type BlockedDueToOverageType string + +const ( + BlockedDueToOverageTypeAnalyticsUsage BlockedDueToOverageType = "analyticsUsage" + BlockedDueToOverageTypeArtifacts BlockedDueToOverageType = "artifacts" + BlockedDueToOverageTypeBandwidth BlockedDueToOverageType = "bandwidth" + BlockedDueToOverageTypeBlobStores BlockedDueToOverageType = "blobStores" + BlockedDueToOverageTypeBlobTotalAdvancedRequests BlockedDueToOverageType = "blobTotalAdvancedRequests" + BlockedDueToOverageTypeBlobTotalAvgSizeInBytes BlockedDueToOverageType = "blobTotalAvgSizeInBytes" + BlockedDueToOverageTypeBlobTotalGetResponseObjectSizeInBytes BlockedDueToOverageType = "blobTotalGetResponseObjectSizeInBytes" + BlockedDueToOverageTypeBlobTotalSimpleRequests BlockedDueToOverageType = "blobTotalSimpleRequests" + BlockedDueToOverageTypeBuildMinute BlockedDueToOverageType = "buildMinute" + BlockedDueToOverageTypeDataCacheRead BlockedDueToOverageType = "dataCacheRead" + BlockedDueToOverageTypeDataCacheRevalidation BlockedDueToOverageType = "dataCacheRevalidation" + BlockedDueToOverageTypeDataCacheWrite BlockedDueToOverageType = "dataCacheWrite" + BlockedDueToOverageTypeEdgeConfigRead BlockedDueToOverageType = "edgeConfigRead" + BlockedDueToOverageTypeEdgeConfigWrite BlockedDueToOverageType = "edgeConfigWrite" + BlockedDueToOverageTypeEdgeFunctionExecutionUnits BlockedDueToOverageType = "edgeFunctionExecutionUnits" + BlockedDueToOverageTypeEdgeMiddlewareInvocations BlockedDueToOverageType = "edgeMiddlewareInvocations" + BlockedDueToOverageTypeEdgeRequestAdditionalCPUDuration BlockedDueToOverageType = "edgeRequestAdditionalCpuDuration" + BlockedDueToOverageTypeEdgeRequest BlockedDueToOverageType = "edgeRequest" + BlockedDueToOverageTypeElasticConcurrencyBuildSlots BlockedDueToOverageType = "elasticConcurrencyBuildSlots" + BlockedDueToOverageTypeFastDataTransfer BlockedDueToOverageType = "fastDataTransfer" + BlockedDueToOverageTypeFastOriginTransfer BlockedDueToOverageType = "fastOriginTransfer" + BlockedDueToOverageTypeFunctionDuration BlockedDueToOverageType = "functionDuration" + BlockedDueToOverageTypeFunctionInvocation BlockedDueToOverageType = "functionInvocation" + BlockedDueToOverageTypeLogDrainsVolume BlockedDueToOverageType = "logDrainsVolume" + BlockedDueToOverageTypeMonitoringMetric BlockedDueToOverageType = "monitoringMetric" + BlockedDueToOverageTypeObservabilityEvent BlockedDueToOverageType = "observabilityEvent" + BlockedDueToOverageTypePostgresComputeTime BlockedDueToOverageType = "postgresComputeTime" + BlockedDueToOverageTypePostgresDataStorage BlockedDueToOverageType = "postgresDataStorage" + BlockedDueToOverageTypePostgresDataTransfer BlockedDueToOverageType = "postgresDataTransfer" + BlockedDueToOverageTypePostgresDatabase BlockedDueToOverageType = "postgresDatabase" + BlockedDueToOverageTypePostgresWrittenData BlockedDueToOverageType = "postgresWrittenData" + BlockedDueToOverageTypeServerlessFunctionExecution BlockedDueToOverageType = "serverlessFunctionExecution" + BlockedDueToOverageTypeSourceImages BlockedDueToOverageType = "sourceImages" + BlockedDueToOverageTypeStorageRedisTotalBandwidthInBytes BlockedDueToOverageType = "storageRedisTotalBandwidthInBytes" + BlockedDueToOverageTypeStorageRedisTotalCommands BlockedDueToOverageType = "storageRedisTotalCommands" + BlockedDueToOverageTypeStorageRedisTotalDailyAvgStorageInBytes BlockedDueToOverageType = "storageRedisTotalDailyAvgStorageInBytes" + BlockedDueToOverageTypeStorageRedisTotalDatabases BlockedDueToOverageType = "storageRedisTotalDatabases" + BlockedDueToOverageTypeWafOwaspExcessBytes BlockedDueToOverageType = "wafOwaspExcessBytes" + BlockedDueToOverageTypeWafOwaspRequests BlockedDueToOverageType = "wafOwaspRequests" + BlockedDueToOverageTypeWafRateLimitRequest BlockedDueToOverageType = "wafRateLimitRequest" + BlockedDueToOverageTypeWebAnalyticsEvent BlockedDueToOverageType = "webAnalyticsEvent" +) + +func (e BlockedDueToOverageType) ToPointer() *BlockedDueToOverageType { + return &e +} +func (e *BlockedDueToOverageType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "analyticsUsage": + fallthrough + case "artifacts": + fallthrough + case "bandwidth": + fallthrough + case "blobStores": + fallthrough + case "blobTotalAdvancedRequests": + fallthrough + case "blobTotalAvgSizeInBytes": + fallthrough + case "blobTotalGetResponseObjectSizeInBytes": + fallthrough + case "blobTotalSimpleRequests": + fallthrough + case "buildMinute": + fallthrough + case "dataCacheRead": + fallthrough + case "dataCacheRevalidation": + fallthrough + case "dataCacheWrite": + fallthrough + case "edgeConfigRead": + fallthrough + case "edgeConfigWrite": + fallthrough + case "edgeFunctionExecutionUnits": + fallthrough + case "edgeMiddlewareInvocations": + fallthrough + case "edgeRequestAdditionalCpuDuration": + fallthrough + case "edgeRequest": + fallthrough + case "elasticConcurrencyBuildSlots": + fallthrough + case "fastDataTransfer": + fallthrough + case "fastOriginTransfer": + fallthrough + case "functionDuration": + fallthrough + case "functionInvocation": + fallthrough + case "logDrainsVolume": + fallthrough + case "monitoringMetric": + fallthrough + case "observabilityEvent": + fallthrough + case "postgresComputeTime": + fallthrough + case "postgresDataStorage": + fallthrough + case "postgresDataTransfer": + fallthrough + case "postgresDatabase": + fallthrough + case "postgresWrittenData": + fallthrough + case "serverlessFunctionExecution": + fallthrough + case "sourceImages": + fallthrough + case "storageRedisTotalBandwidthInBytes": + fallthrough + case "storageRedisTotalCommands": + fallthrough + case "storageRedisTotalDailyAvgStorageInBytes": + fallthrough + case "storageRedisTotalDatabases": + fallthrough + case "wafOwaspExcessBytes": + fallthrough + case "wafOwaspRequests": + fallthrough + case "wafRateLimitRequest": + fallthrough + case "webAnalyticsEvent": + *e = BlockedDueToOverageType(v) + return nil + default: + return fmt.Errorf("invalid value for BlockedDueToOverageType: %v", v) + } +} + +// SoftBlock - When the User account has been "soft blocked", this property will contain the date when the restriction was enacted, and the identifier for why. +type SoftBlock struct { + BlockedAt float64 `json:"blockedAt"` + Reason Reason `json:"reason"` + BlockedDueToOverageType *BlockedDueToOverageType `json:"blockedDueToOverageType,omitempty"` +} + +func (o *SoftBlock) GetBlockedAt() float64 { + if o == nil { + return 0.0 + } + return o.BlockedAt +} + +func (o *SoftBlock) GetReason() Reason { + if o == nil { + return Reason("") + } + return o.Reason +} + +func (o *SoftBlock) GetBlockedDueToOverageType() *BlockedDueToOverageType { + if o == nil { + return nil + } + return o.BlockedDueToOverageType +} + +// Billing - An object containing billing infomation associated with the User account. +type Billing struct { +} + +// ResourceConfig - An object containing infomation related to the amount of platform resources may be allocated to the User account. +type ResourceConfig struct { + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + BlobStores *float64 `json:"blobStores,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + NodeType *string `json:"nodeType,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + ConcurrentBuilds *float64 `json:"concurrentBuilds,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + AwsAccountType *string `json:"awsAccountType,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + AwsAccountIds []string `json:"awsAccountIds,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + CfZoneName *string `json:"cfZoneName,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + ImageOptimizationType *string `json:"imageOptimizationType,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + EdgeConfigs *float64 `json:"edgeConfigs,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + EdgeConfigSize *float64 `json:"edgeConfigSize,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + EdgeFunctionMaxSizeBytes *float64 `json:"edgeFunctionMaxSizeBytes,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + EdgeFunctionExecutionTimeoutMs *float64 `json:"edgeFunctionExecutionTimeoutMs,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + ServerlessFunctionDefaultMaxExecutionTime *float64 `json:"serverlessFunctionDefaultMaxExecutionTime,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + KvDatabases *float64 `json:"kvDatabases,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + PostgresDatabases *float64 `json:"postgresDatabases,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + IntegrationStores *float64 `json:"integrationStores,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + CronJobs *float64 `json:"cronJobs,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + CronJobsPerProject *float64 `json:"cronJobsPerProject,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + MicrofrontendGroupsPerTeam *float64 `json:"microfrontendGroupsPerTeam,omitempty"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + MicrofrontendProjectsPerGroup *float64 `json:"microfrontendProjectsPerGroup,omitempty"` +} + +func (o *ResourceConfig) GetBlobStores() *float64 { + if o == nil { + return nil + } + return o.BlobStores +} + +func (o *ResourceConfig) GetNodeType() *string { + if o == nil { + return nil + } + return o.NodeType +} + +func (o *ResourceConfig) GetConcurrentBuilds() *float64 { + if o == nil { + return nil + } + return o.ConcurrentBuilds +} + +func (o *ResourceConfig) GetAwsAccountType() *string { + if o == nil { + return nil + } + return o.AwsAccountType +} + +func (o *ResourceConfig) GetAwsAccountIds() []string { + if o == nil { + return nil + } + return o.AwsAccountIds +} + +func (o *ResourceConfig) GetCfZoneName() *string { + if o == nil { + return nil + } + return o.CfZoneName +} + +func (o *ResourceConfig) GetImageOptimizationType() *string { + if o == nil { + return nil + } + return o.ImageOptimizationType +} + +func (o *ResourceConfig) GetEdgeConfigs() *float64 { + if o == nil { + return nil + } + return o.EdgeConfigs +} + +func (o *ResourceConfig) GetEdgeConfigSize() *float64 { + if o == nil { + return nil + } + return o.EdgeConfigSize +} + +func (o *ResourceConfig) GetEdgeFunctionMaxSizeBytes() *float64 { + if o == nil { + return nil + } + return o.EdgeFunctionMaxSizeBytes +} + +func (o *ResourceConfig) GetEdgeFunctionExecutionTimeoutMs() *float64 { + if o == nil { + return nil + } + return o.EdgeFunctionExecutionTimeoutMs +} + +func (o *ResourceConfig) GetServerlessFunctionDefaultMaxExecutionTime() *float64 { + if o == nil { + return nil + } + return o.ServerlessFunctionDefaultMaxExecutionTime +} + +func (o *ResourceConfig) GetKvDatabases() *float64 { + if o == nil { + return nil + } + return o.KvDatabases +} + +func (o *ResourceConfig) GetPostgresDatabases() *float64 { + if o == nil { + return nil + } + return o.PostgresDatabases +} + +func (o *ResourceConfig) GetIntegrationStores() *float64 { + if o == nil { + return nil + } + return o.IntegrationStores +} + +func (o *ResourceConfig) GetCronJobs() *float64 { + if o == nil { + return nil + } + return o.CronJobs +} + +func (o *ResourceConfig) GetCronJobsPerProject() *float64 { + if o == nil { + return nil + } + return o.CronJobsPerProject +} + +func (o *ResourceConfig) GetMicrofrontendGroupsPerTeam() *float64 { + if o == nil { + return nil + } + return o.MicrofrontendGroupsPerTeam +} + +func (o *ResourceConfig) GetMicrofrontendProjectsPerGroup() *float64 { + if o == nil { + return nil + } + return o.MicrofrontendProjectsPerGroup +} + +type ViewPreference string + +const ( + ViewPreferenceList ViewPreference = "list" + ViewPreferenceCards ViewPreference = "cards" +) + +func (e ViewPreference) ToPointer() *ViewPreference { + return &e +} +func (e *ViewPreference) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "list": + fallthrough + case "cards": + *e = ViewPreference(v) + return nil + default: + return fmt.Errorf("invalid value for ViewPreference: %v", v) + } +} + +type FavoritesViewPreference string + +const ( + FavoritesViewPreferenceOpen FavoritesViewPreference = "open" + FavoritesViewPreferenceClosed FavoritesViewPreference = "closed" +) + +func (e FavoritesViewPreference) ToPointer() *FavoritesViewPreference { + return &e +} +func (e *FavoritesViewPreference) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "open": + fallthrough + case "closed": + *e = FavoritesViewPreference(v) + return nil + default: + return fmt.Errorf("invalid value for FavoritesViewPreference: %v", v) + } +} + +type RecentsViewPreference string + +const ( + RecentsViewPreferenceOpen RecentsViewPreference = "open" + RecentsViewPreferenceClosed RecentsViewPreference = "closed" +) + +func (e RecentsViewPreference) ToPointer() *RecentsViewPreference { + return &e +} +func (e *RecentsViewPreference) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "open": + fallthrough + case "closed": + *e = RecentsViewPreference(v) + return nil + default: + return fmt.Errorf("invalid value for RecentsViewPreference: %v", v) + } +} + +// ActiveDashboardViews - set of dashboard view preferences (cards or list) per scopeId +type ActiveDashboardViews struct { + ScopeID string `json:"scopeId"` + ViewPreference *ViewPreference `json:"viewPreference,omitempty"` + FavoritesViewPreference *FavoritesViewPreference `json:"favoritesViewPreference,omitempty"` + RecentsViewPreference *RecentsViewPreference `json:"recentsViewPreference,omitempty"` +} + +func (o *ActiveDashboardViews) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + +func (o *ActiveDashboardViews) GetViewPreference() *ViewPreference { + if o == nil { + return nil + } + return o.ViewPreference +} + +func (o *ActiveDashboardViews) GetFavoritesViewPreference() *FavoritesViewPreference { + if o == nil { + return nil + } + return o.FavoritesViewPreference +} + +func (o *ActiveDashboardViews) GetRecentsViewPreference() *RecentsViewPreference { + if o == nil { + return nil + } + return o.RecentsViewPreference +} + +type ImportFlowGitNamespaceType string + +const ( + ImportFlowGitNamespaceTypeStr ImportFlowGitNamespaceType = "str" + ImportFlowGitNamespaceTypeNumber ImportFlowGitNamespaceType = "number" +) + +type ImportFlowGitNamespace struct { + Str *string + Number *float64 + + Type ImportFlowGitNamespaceType +} + +func CreateImportFlowGitNamespaceStr(str string) ImportFlowGitNamespace { + typ := ImportFlowGitNamespaceTypeStr + + return ImportFlowGitNamespace{ + Str: &str, + Type: typ, + } +} + +func CreateImportFlowGitNamespaceNumber(number float64) ImportFlowGitNamespace { + typ := ImportFlowGitNamespaceTypeNumber + + return ImportFlowGitNamespace{ + Number: &number, + Type: typ, + } +} + +func (u *ImportFlowGitNamespace) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = ImportFlowGitNamespaceTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = ImportFlowGitNamespaceTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ImportFlowGitNamespace", string(data)) +} + +func (u ImportFlowGitNamespace) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type ImportFlowGitNamespace: all fields are null") +} + +type ImportFlowGitNamespaceIDType string + +const ( + ImportFlowGitNamespaceIDTypeStr ImportFlowGitNamespaceIDType = "str" + ImportFlowGitNamespaceIDTypeNumber ImportFlowGitNamespaceIDType = "number" +) + +type ImportFlowGitNamespaceID struct { + Str *string + Number *float64 + + Type ImportFlowGitNamespaceIDType +} + +func CreateImportFlowGitNamespaceIDStr(str string) ImportFlowGitNamespaceID { + typ := ImportFlowGitNamespaceIDTypeStr + + return ImportFlowGitNamespaceID{ + Str: &str, + Type: typ, + } +} + +func CreateImportFlowGitNamespaceIDNumber(number float64) ImportFlowGitNamespaceID { + typ := ImportFlowGitNamespaceIDTypeNumber + + return ImportFlowGitNamespaceID{ + Number: &number, + Type: typ, + } +} + +func (u *ImportFlowGitNamespaceID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = ImportFlowGitNamespaceIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = ImportFlowGitNamespaceIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ImportFlowGitNamespaceID", string(data)) +} + +func (u ImportFlowGitNamespaceID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type ImportFlowGitNamespaceID: all fields are null") +} + +type ImportFlowGitProvider string + +const ( + ImportFlowGitProviderGithub ImportFlowGitProvider = "github" + ImportFlowGitProviderGitlab ImportFlowGitProvider = "gitlab" + ImportFlowGitProviderBitbucket ImportFlowGitProvider = "bitbucket" +) + +func (e ImportFlowGitProvider) ToPointer() *ImportFlowGitProvider { + return &e +} +func (e *ImportFlowGitProvider) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + *e = ImportFlowGitProvider(v) + return nil + default: + return fmt.Errorf("invalid value for ImportFlowGitProvider: %v", v) + } +} + +type GitNamespaceIDType string + +const ( + GitNamespaceIDTypeStr GitNamespaceIDType = "str" + GitNamespaceIDTypeNumber GitNamespaceIDType = "number" +) + +type GitNamespaceID struct { + Str *string + Number *float64 + + Type GitNamespaceIDType +} + +func CreateGitNamespaceIDStr(str string) GitNamespaceID { + typ := GitNamespaceIDTypeStr + + return GitNamespaceID{ + Str: &str, + Type: typ, + } +} + +func CreateGitNamespaceIDNumber(number float64) GitNamespaceID { + typ := GitNamespaceIDTypeNumber + + return GitNamespaceID{ + Number: &number, + Type: typ, + } +} + +func (u *GitNamespaceID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GitNamespaceIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GitNamespaceIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GitNamespaceID", string(data)) +} + +func (u GitNamespaceID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GitNamespaceID: all fields are null") +} + +type PreferredScopesAndGitNamespaces struct { + ScopeID string `json:"scopeId"` + GitNamespaceID *GitNamespaceID `json:"gitNamespaceId"` +} + +func (o *PreferredScopesAndGitNamespaces) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + +func (o *PreferredScopesAndGitNamespaces) GetGitNamespaceID() *GitNamespaceID { + if o == nil { + return nil + } + return o.GitNamespaceID +} + +type Dismissals struct { + ScopeID string `json:"scopeId"` + CreatedAt float64 `json:"createdAt"` +} + +func (o *Dismissals) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + +func (o *Dismissals) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +// DismissedToasts - A record of when, under a certain scopeId, a toast was dismissed +type DismissedToasts struct { + Name string `json:"name"` + Dismissals []Dismissals `json:"dismissals"` +} + +func (o *DismissedToasts) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *DismissedToasts) GetDismissals() []Dismissals { + if o == nil { + return []Dismissals{} + } + return o.Dismissals +} + +// Two - A list of projects and spaces across teams that a user has marked as a favorite. +type Two struct { + SpaceID string `json:"spaceId"` + ScopeSlug string `json:"scopeSlug"` + ScopeID string `json:"scopeId"` +} + +func (o *Two) GetSpaceID() string { + if o == nil { + return "" + } + return o.SpaceID +} + +func (o *Two) GetScopeSlug() string { + if o == nil { + return "" + } + return o.ScopeSlug +} + +func (o *Two) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + +// One - A list of projects and spaces across teams that a user has marked as a favorite. +type One struct { + ProjectID string `json:"projectId"` + ScopeSlug string `json:"scopeSlug"` + ScopeID string `json:"scopeId"` +} + +func (o *One) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *One) GetScopeSlug() string { + if o == nil { + return "" + } + return o.ScopeSlug +} + +func (o *One) GetScopeID() string { + if o == nil { + return "" + } + return o.ScopeID +} + +type FavoriteProjectsAndSpacesType string + +const ( + FavoriteProjectsAndSpacesTypeOne FavoriteProjectsAndSpacesType = "1" + FavoriteProjectsAndSpacesTypeTwo FavoriteProjectsAndSpacesType = "2" +) + +type FavoriteProjectsAndSpaces struct { + One *One + Two *Two + + Type FavoriteProjectsAndSpacesType +} + +func CreateFavoriteProjectsAndSpacesOne(one One) FavoriteProjectsAndSpaces { + typ := FavoriteProjectsAndSpacesTypeOne + + return FavoriteProjectsAndSpaces{ + One: &one, + Type: typ, + } +} + +func CreateFavoriteProjectsAndSpacesTwo(two Two) FavoriteProjectsAndSpaces { + typ := FavoriteProjectsAndSpacesTypeTwo + + return FavoriteProjectsAndSpaces{ + Two: &two, + Type: typ, + } +} + +func (u *FavoriteProjectsAndSpaces) UnmarshalJSON(data []byte) error { + + var one One = One{} + if err := utils.UnmarshalJSON(data, &one, "", true, true); err == nil { + u.One = &one + u.Type = FavoriteProjectsAndSpacesTypeOne + return nil + } + + var two Two = Two{} + if err := utils.UnmarshalJSON(data, &two, "", true, true); err == nil { + u.Two = &two + u.Type = FavoriteProjectsAndSpacesTypeTwo + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FavoriteProjectsAndSpaces", string(data)) +} + +func (u FavoriteProjectsAndSpaces) MarshalJSON() ([]byte, error) { + if u.One != nil { + return utils.MarshalJSON(u.One, "", true) + } + + if u.Two != nil { + return utils.MarshalJSON(u.Two, "", true) + } + + return nil, errors.New("could not marshal union type FavoriteProjectsAndSpaces: all fields are null") +} + +// RemoteCaching - remote caching settings +type RemoteCaching struct { + Enabled *bool `json:"enabled,omitempty"` +} + +func (o *RemoteCaching) GetEnabled() *bool { + if o == nil { + return nil + } + return o.Enabled +} + +// DataCache - data cache settings +type DataCache struct { + ExcessBillingEnabled *bool `json:"excessBillingEnabled,omitempty"` +} + +func (o *DataCache) GetExcessBillingEnabled() *bool { + if o == nil { + return nil + } + return o.ExcessBillingEnabled +} + +type WebAnalytics struct { + BlockedFrom *float64 `json:"blockedFrom,omitempty"` + BlockedUntil *float64 `json:"blockedUntil,omitempty"` + IsCurrentlyBlocked bool `json:"isCurrentlyBlocked"` +} + +func (o *WebAnalytics) GetBlockedFrom() *float64 { + if o == nil { + return nil + } + return o.BlockedFrom +} + +func (o *WebAnalytics) GetBlockedUntil() *float64 { + if o == nil { + return nil + } + return o.BlockedUntil +} + +func (o *WebAnalytics) GetIsCurrentlyBlocked() bool { + if o == nil { + return false + } + return o.IsCurrentlyBlocked +} + +// FeatureBlocks - Feature blocks for the user +type FeatureBlocks struct { + WebAnalytics *WebAnalytics `json:"webAnalytics,omitempty"` +} + +func (o *FeatureBlocks) GetWebAnalytics() *WebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +type NorthstarMigration struct { + // The ID of the team we created for this user. + TeamID string `json:"teamId"` + // The number of projects migrated for this user. + Projects float64 `json:"projects"` + // The number of stores migrated for this user. + Stores float64 `json:"stores"` + // The number of integration configurations migrated for this user. + IntegrationConfigurations float64 `json:"integrationConfigurations"` + // The number of integration clients migrated for this user. + IntegrationClients float64 `json:"integrationClients"` + // The migration start time timestamp for this user. + StartTime float64 `json:"startTime"` + // The migration end time timestamp for this user. + EndTime float64 `json:"endTime"` +} + +func (o *NorthstarMigration) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *NorthstarMigration) GetProjects() float64 { + if o == nil { + return 0.0 + } + return o.Projects +} + +func (o *NorthstarMigration) GetStores() float64 { + if o == nil { + return 0.0 + } + return o.Stores +} + +func (o *NorthstarMigration) GetIntegrationConfigurations() float64 { + if o == nil { + return 0.0 + } + return o.IntegrationConfigurations +} + +func (o *NorthstarMigration) GetIntegrationClients() float64 { + if o == nil { + return 0.0 + } + return o.IntegrationClients +} + +func (o *NorthstarMigration) GetStartTime() float64 { + if o == nil { + return 0.0 + } + return o.StartTime +} + +func (o *NorthstarMigration) GetEndTime() float64 { + if o == nil { + return 0.0 + } + return o.EndTime +} + +// Version - The user's version. Will always be `northstar`. +type Version string + +const ( + VersionNorthstar Version = "northstar" +) + +func (e Version) ToPointer() *Version { + return &e +} +func (e *Version) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "northstar": + *e = Version(v) + return nil + default: + return fmt.Errorf("invalid value for Version: %v", v) + } +} + +// AuthUser - Data for the currently authenticated User. +type AuthUser struct { + // UNIX timestamp (in milliseconds) when the User account was created. + CreatedAt float64 `json:"createdAt"` + // When the User account has been "soft blocked", this property will contain the date when the restriction was enacted, and the identifier for why. + SoftBlock *SoftBlock `json:"softBlock"` + // An object containing billing infomation associated with the User account. + Billing *Billing `json:"billing"` + // An object containing infomation related to the amount of platform resources may be allocated to the User account. + ResourceConfig ResourceConfig `json:"resourceConfig"` + // Prefix that will be used in the URL of "Preview" deployments created by the User account. + StagingPrefix string `json:"stagingPrefix"` + // set of dashboard view preferences (cards or list) per scopeId + ActiveDashboardViews []ActiveDashboardViews `json:"activeDashboardViews,omitempty"` + ImportFlowGitNamespace *ImportFlowGitNamespace `json:"importFlowGitNamespace,omitempty"` + ImportFlowGitNamespaceID *ImportFlowGitNamespaceID `json:"importFlowGitNamespaceId,omitempty"` + ImportFlowGitProvider *ImportFlowGitProvider `json:"importFlowGitProvider,omitempty"` + PreferredScopesAndGitNamespaces []PreferredScopesAndGitNamespaces `json:"preferredScopesAndGitNamespaces,omitempty"` + // A record of when, under a certain scopeId, a toast was dismissed + DismissedToasts []DismissedToasts `json:"dismissedToasts,omitempty"` + // A list of projects and spaces across teams that a user has marked as a favorite. + FavoriteProjectsAndSpaces []FavoriteProjectsAndSpaces `json:"favoriteProjectsAndSpaces,omitempty"` + // Whether the user has a trial available for a paid plan subscription. + HasTrialAvailable bool `json:"hasTrialAvailable"` + // remote caching settings + RemoteCaching *RemoteCaching `json:"remoteCaching,omitempty"` + // data cache settings + DataCache *DataCache `json:"dataCache,omitempty"` + // Feature blocks for the user + FeatureBlocks *FeatureBlocks `json:"featureBlocks,omitempty"` + NorthstarMigration *NorthstarMigration `json:"northstarMigration,omitempty"` + // The User's unique identifier. + ID string `json:"id"` + // Email address associated with the User account. + Email string `json:"email"` + // Name associated with the User account, or `null` if none has been provided. + Name *string `json:"name"` + // Unique username associated with the User account. + Username string `json:"username"` + // SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. + Avatar *string `json:"avatar"` + // The user's default team. + DefaultTeamID *string `json:"defaultTeamId"` + // The user's version. Will always be `northstar`. + Version Version `json:"version"` +} + +func (o *AuthUser) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *AuthUser) GetSoftBlock() *SoftBlock { + if o == nil { + return nil + } + return o.SoftBlock +} + +func (o *AuthUser) GetBilling() *Billing { + if o == nil { + return nil + } + return o.Billing +} + +func (o *AuthUser) GetResourceConfig() ResourceConfig { + if o == nil { + return ResourceConfig{} + } + return o.ResourceConfig +} + +func (o *AuthUser) GetStagingPrefix() string { + if o == nil { + return "" + } + return o.StagingPrefix +} + +func (o *AuthUser) GetActiveDashboardViews() []ActiveDashboardViews { + if o == nil { + return nil + } + return o.ActiveDashboardViews +} + +func (o *AuthUser) GetImportFlowGitNamespace() *ImportFlowGitNamespace { + if o == nil { + return nil + } + return o.ImportFlowGitNamespace +} + +func (o *AuthUser) GetImportFlowGitNamespaceID() *ImportFlowGitNamespaceID { + if o == nil { + return nil + } + return o.ImportFlowGitNamespaceID +} + +func (o *AuthUser) GetImportFlowGitProvider() *ImportFlowGitProvider { + if o == nil { + return nil + } + return o.ImportFlowGitProvider +} + +func (o *AuthUser) GetPreferredScopesAndGitNamespaces() []PreferredScopesAndGitNamespaces { + if o == nil { + return nil + } + return o.PreferredScopesAndGitNamespaces +} + +func (o *AuthUser) GetDismissedToasts() []DismissedToasts { + if o == nil { + return nil + } + return o.DismissedToasts +} + +func (o *AuthUser) GetFavoriteProjectsAndSpaces() []FavoriteProjectsAndSpaces { + if o == nil { + return nil + } + return o.FavoriteProjectsAndSpaces +} + +func (o *AuthUser) GetHasTrialAvailable() bool { + if o == nil { + return false + } + return o.HasTrialAvailable +} + +func (o *AuthUser) GetRemoteCaching() *RemoteCaching { + if o == nil { + return nil + } + return o.RemoteCaching +} + +func (o *AuthUser) GetDataCache() *DataCache { + if o == nil { + return nil + } + return o.DataCache +} + +func (o *AuthUser) GetFeatureBlocks() *FeatureBlocks { + if o == nil { + return nil + } + return o.FeatureBlocks +} + +func (o *AuthUser) GetNorthstarMigration() *NorthstarMigration { + if o == nil { + return nil + } + return o.NorthstarMigration +} + +func (o *AuthUser) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *AuthUser) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *AuthUser) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *AuthUser) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *AuthUser) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +func (o *AuthUser) GetDefaultTeamID() *string { + if o == nil { + return nil + } + return o.DefaultTeamID +} + +func (o *AuthUser) GetVersion() Version { + if o == nil { + return Version("") + } + return o.Version +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/authuserlimited.go b/src/__tests__/mockserver/internal/sdk/models/components/authuserlimited.go new file mode 100644 index 00000000..a96d6882 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/authuserlimited.go @@ -0,0 +1,108 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// AuthUserLimitedVersion - The user's version. Will always be `northstar`. +type AuthUserLimitedVersion string + +const ( + AuthUserLimitedVersionNorthstar AuthUserLimitedVersion = "northstar" +) + +func (e AuthUserLimitedVersion) ToPointer() *AuthUserLimitedVersion { + return &e +} +func (e *AuthUserLimitedVersion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "northstar": + *e = AuthUserLimitedVersion(v) + return nil + default: + return fmt.Errorf("invalid value for AuthUserLimitedVersion: %v", v) + } +} + +// AuthUserLimited - A limited form of data for the currently authenticated User, due to the authentication token missing privileges to read the full User data. +type AuthUserLimited struct { + // Property indicating that this User data contains only limited information, due to the authentication token missing privileges to read the full User data. Re-login with email, GitHub, GitLab or Bitbucket in order to upgrade the authentication token with the necessary privileges. + Limited bool `json:"limited"` + // The User's unique identifier. + ID string `json:"id"` + // Email address associated with the User account. + Email string `json:"email"` + // Name associated with the User account, or `null` if none has been provided. + Name *string `json:"name"` + // Unique username associated with the User account. + Username string `json:"username"` + // SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. + Avatar *string `json:"avatar"` + // The user's default team. + DefaultTeamID *string `json:"defaultTeamId"` + // The user's version. Will always be `northstar`. + Version AuthUserLimitedVersion `json:"version"` +} + +func (o *AuthUserLimited) GetLimited() bool { + if o == nil { + return false + } + return o.Limited +} + +func (o *AuthUserLimited) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *AuthUserLimited) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *AuthUserLimited) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *AuthUserLimited) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *AuthUserLimited) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +func (o *AuthUserLimited) GetDefaultTeamID() *string { + if o == nil { + return nil + } + return o.DefaultTeamID +} + +func (o *AuthUserLimited) GetVersion() AuthUserLimitedVersion { + if o == nil { + return AuthUserLimitedVersion("") + } + return o.Version +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigitem.go b/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigitem.go new file mode 100644 index 00000000..e25cb559 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigitem.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// EdgeConfigItem - The EdgeConfig. +type EdgeConfigItem struct { + Key string `json:"key"` + Value *EdgeConfigItemValue `json:"value"` + Description *string `json:"description,omitempty"` + EdgeConfigID string `json:"edgeConfigId"` + CreatedAt float64 `json:"createdAt"` + UpdatedAt float64 `json:"updatedAt"` +} + +func (o *EdgeConfigItem) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *EdgeConfigItem) GetValue() *EdgeConfigItemValue { + if o == nil { + return nil + } + return o.Value +} + +func (o *EdgeConfigItem) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *EdgeConfigItem) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *EdgeConfigItem) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *EdgeConfigItem) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigitemvalue.go b/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigitemvalue.go new file mode 100644 index 00000000..e57eab35 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigitemvalue.go @@ -0,0 +1,138 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +type EdgeConfigItemValueType string + +const ( + EdgeConfigItemValueTypeStr EdgeConfigItemValueType = "str" + EdgeConfigItemValueTypeNumber EdgeConfigItemValueType = "number" + EdgeConfigItemValueTypeBoolean EdgeConfigItemValueType = "boolean" + EdgeConfigItemValueTypeMapOfEdgeConfigItemValue EdgeConfigItemValueType = "mapOfEdgeConfigItemValue" + EdgeConfigItemValueTypeArrayOfEdgeConfigItemValue EdgeConfigItemValueType = "arrayOfEdgeConfigItemValue" +) + +type EdgeConfigItemValue struct { + Str *string + Number *float64 + Boolean *bool + MapOfEdgeConfigItemValue map[string]EdgeConfigItemValue + ArrayOfEdgeConfigItemValue []EdgeConfigItemValue + + Type EdgeConfigItemValueType +} + +func CreateEdgeConfigItemValueStr(str string) EdgeConfigItemValue { + typ := EdgeConfigItemValueTypeStr + + return EdgeConfigItemValue{ + Str: &str, + Type: typ, + } +} + +func CreateEdgeConfigItemValueNumber(number float64) EdgeConfigItemValue { + typ := EdgeConfigItemValueTypeNumber + + return EdgeConfigItemValue{ + Number: &number, + Type: typ, + } +} + +func CreateEdgeConfigItemValueBoolean(boolean bool) EdgeConfigItemValue { + typ := EdgeConfigItemValueTypeBoolean + + return EdgeConfigItemValue{ + Boolean: &boolean, + Type: typ, + } +} + +func CreateEdgeConfigItemValueMapOfEdgeConfigItemValue(mapOfEdgeConfigItemValue map[string]EdgeConfigItemValue) EdgeConfigItemValue { + typ := EdgeConfigItemValueTypeMapOfEdgeConfigItemValue + + return EdgeConfigItemValue{ + MapOfEdgeConfigItemValue: mapOfEdgeConfigItemValue, + Type: typ, + } +} + +func CreateEdgeConfigItemValueArrayOfEdgeConfigItemValue(arrayOfEdgeConfigItemValue []EdgeConfigItemValue) EdgeConfigItemValue { + typ := EdgeConfigItemValueTypeArrayOfEdgeConfigItemValue + + return EdgeConfigItemValue{ + ArrayOfEdgeConfigItemValue: arrayOfEdgeConfigItemValue, + Type: typ, + } +} + +func (u *EdgeConfigItemValue) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = EdgeConfigItemValueTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = EdgeConfigItemValueTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = EdgeConfigItemValueTypeBoolean + return nil + } + + var mapOfEdgeConfigItemValue map[string]EdgeConfigItemValue = map[string]EdgeConfigItemValue{} + if err := utils.UnmarshalJSON(data, &mapOfEdgeConfigItemValue, "", true, true); err == nil { + u.MapOfEdgeConfigItemValue = mapOfEdgeConfigItemValue + u.Type = EdgeConfigItemValueTypeMapOfEdgeConfigItemValue + return nil + } + + var arrayOfEdgeConfigItemValue []EdgeConfigItemValue = []EdgeConfigItemValue{} + if err := utils.UnmarshalJSON(data, &arrayOfEdgeConfigItemValue, "", true, true); err == nil { + u.ArrayOfEdgeConfigItemValue = arrayOfEdgeConfigItemValue + u.Type = EdgeConfigItemValueTypeArrayOfEdgeConfigItemValue + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for EdgeConfigItemValue", string(data)) +} + +func (u EdgeConfigItemValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + if u.MapOfEdgeConfigItemValue != nil { + return utils.MarshalJSON(u.MapOfEdgeConfigItemValue, "", true) + } + + if u.ArrayOfEdgeConfigItemValue != nil { + return utils.MarshalJSON(u.ArrayOfEdgeConfigItemValue, "", true) + } + + return nil, errors.New("could not marshal union type EdgeConfigItemValue: all fields are null") +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigtoken.go b/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigtoken.go new file mode 100644 index 00000000..3e624849 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/edgeconfigtoken.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// EdgeConfigToken - The EdgeConfig. +type EdgeConfigToken struct { + Token string `json:"token"` + Label string `json:"label"` + // This is not the token itself, but rather an id to identify the token by + ID string `json:"id"` + EdgeConfigID string `json:"edgeConfigId"` + CreatedAt float64 `json:"createdAt"` +} + +func (o *EdgeConfigToken) GetToken() string { + if o == nil { + return "" + } + return o.Token +} + +func (o *EdgeConfigToken) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *EdgeConfigToken) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *EdgeConfigToken) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *EdgeConfigToken) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/filetree.go b/src/__tests__/mockserver/internal/sdk/models/components/filetree.go new file mode 100644 index 00000000..30735da2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/filetree.go @@ -0,0 +1,114 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// Type - String indicating the type of file tree entry. +type Type string + +const ( + TypeDirectory Type = "directory" + TypeFile Type = "file" + TypeSymlink Type = "symlink" + TypeLambda Type = "lambda" + TypeMiddleware Type = "middleware" + TypeInvalid Type = "invalid" +) + +func (e Type) ToPointer() *Type { + return &e +} +func (e *Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "directory": + fallthrough + case "file": + fallthrough + case "symlink": + fallthrough + case "lambda": + fallthrough + case "middleware": + fallthrough + case "invalid": + *e = Type(v) + return nil + default: + return fmt.Errorf("invalid value for Type: %v", v) + } +} + +// FileTree - A deployment file tree entry +type FileTree struct { + // The name of the file tree entry + Name string `json:"name"` + // String indicating the type of file tree entry. + Type Type `json:"type"` + // The unique identifier of the file (only valid for the `file` type) + UID *string `json:"uid,omitempty"` + // The list of children files of the directory (only valid for the `directory` type) + Children []FileTree `json:"children,omitempty"` + // The content-type of the file (only valid for the `file` type) + ContentType *string `json:"contentType,omitempty"` + // The file "mode" indicating file type and permissions. + Mode float64 `json:"mode"` + // Not currently used. See `file-list-to-tree.ts`. + Symlink *string `json:"symlink,omitempty"` +} + +func (o *FileTree) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *FileTree) GetType() Type { + if o == nil { + return Type("") + } + return o.Type +} + +func (o *FileTree) GetUID() *string { + if o == nil { + return nil + } + return o.UID +} + +func (o *FileTree) GetChildren() []FileTree { + if o == nil { + return nil + } + return o.Children +} + +func (o *FileTree) GetContentType() *string { + if o == nil { + return nil + } + return o.ContentType +} + +func (o *FileTree) GetMode() float64 { + if o == nil { + return 0.0 + } + return o.Mode +} + +func (o *FileTree) GetSymlink() *string { + if o == nil { + return nil + } + return o.Symlink +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/flagjsonvalue.go b/src/__tests__/mockserver/internal/sdk/models/components/flagjsonvalue.go new file mode 100644 index 00000000..e2315b31 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/flagjsonvalue.go @@ -0,0 +1,138 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +type FlagJSONValueType string + +const ( + FlagJSONValueTypeStr FlagJSONValueType = "str" + FlagJSONValueTypeNumber FlagJSONValueType = "number" + FlagJSONValueTypeBoolean FlagJSONValueType = "boolean" + FlagJSONValueTypeArrayOfFlagJSONValue FlagJSONValueType = "arrayOfFlagJSONValue" + FlagJSONValueTypeMapOfFlagJSONValue FlagJSONValueType = "mapOfFlagJSONValue" +) + +type FlagJSONValue struct { + Str *string + Number *float64 + Boolean *bool + ArrayOfFlagJSONValue []FlagJSONValue + MapOfFlagJSONValue map[string]FlagJSONValue + + Type FlagJSONValueType +} + +func CreateFlagJSONValueStr(str string) FlagJSONValue { + typ := FlagJSONValueTypeStr + + return FlagJSONValue{ + Str: &str, + Type: typ, + } +} + +func CreateFlagJSONValueNumber(number float64) FlagJSONValue { + typ := FlagJSONValueTypeNumber + + return FlagJSONValue{ + Number: &number, + Type: typ, + } +} + +func CreateFlagJSONValueBoolean(boolean bool) FlagJSONValue { + typ := FlagJSONValueTypeBoolean + + return FlagJSONValue{ + Boolean: &boolean, + Type: typ, + } +} + +func CreateFlagJSONValueArrayOfFlagJSONValue(arrayOfFlagJSONValue []FlagJSONValue) FlagJSONValue { + typ := FlagJSONValueTypeArrayOfFlagJSONValue + + return FlagJSONValue{ + ArrayOfFlagJSONValue: arrayOfFlagJSONValue, + Type: typ, + } +} + +func CreateFlagJSONValueMapOfFlagJSONValue(mapOfFlagJSONValue map[string]FlagJSONValue) FlagJSONValue { + typ := FlagJSONValueTypeMapOfFlagJSONValue + + return FlagJSONValue{ + MapOfFlagJSONValue: mapOfFlagJSONValue, + Type: typ, + } +} + +func (u *FlagJSONValue) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = FlagJSONValueTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = FlagJSONValueTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = FlagJSONValueTypeBoolean + return nil + } + + var arrayOfFlagJSONValue []FlagJSONValue = []FlagJSONValue{} + if err := utils.UnmarshalJSON(data, &arrayOfFlagJSONValue, "", true, true); err == nil { + u.ArrayOfFlagJSONValue = arrayOfFlagJSONValue + u.Type = FlagJSONValueTypeArrayOfFlagJSONValue + return nil + } + + var mapOfFlagJSONValue map[string]FlagJSONValue = map[string]FlagJSONValue{} + if err := utils.UnmarshalJSON(data, &mapOfFlagJSONValue, "", true, true); err == nil { + u.MapOfFlagJSONValue = mapOfFlagJSONValue + u.Type = FlagJSONValueTypeMapOfFlagJSONValue + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FlagJSONValue", string(data)) +} + +func (u FlagJSONValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + if u.ArrayOfFlagJSONValue != nil { + return utils.MarshalJSON(u.ArrayOfFlagJSONValue, "", true) + } + + if u.MapOfFlagJSONValue != nil { + return utils.MarshalJSON(u.MapOfFlagJSONValue, "", true) + } + + return nil, errors.New("could not marshal union type FlagJSONValue: all fields are null") +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/httpmetadata.go b/src/__tests__/mockserver/internal/sdk/models/components/httpmetadata.go new file mode 100644 index 00000000..e18bdc06 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/httpmetadata.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "net/http" +) + +type HTTPMetadata struct { + // Raw HTTP response; suitable for custom response parsing + Response *http.Response `json:"-"` + // Raw HTTP request; suitable for debugging + Request *http.Request `json:"-"` +} + +func (o *HTTPMetadata) GetResponse() *http.Response { + if o == nil { + return nil + } + return o.Response +} + +func (o *HTTPMetadata) GetRequest() *http.Request { + if o == nil { + return nil + } + return o.Request +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/pagination.go b/src/__tests__/mockserver/internal/sdk/models/components/pagination.go new file mode 100644 index 00000000..bc98c93d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/pagination.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// Pagination - This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. +type Pagination struct { + // Amount of items in the current page. + Count float64 `json:"count"` + // Timestamp that must be used to request the next page. + Next *float64 `json:"next"` + // Timestamp that must be used to request the previous page. + Prev *float64 `json:"prev"` +} + +func (o *Pagination) GetCount() float64 { + if o == nil { + return 0.0 + } + return o.Count +} + +func (o *Pagination) GetNext() *float64 { + if o == nil { + return nil + } + return o.Next +} + +func (o *Pagination) GetPrev() *float64 { + if o == nil { + return nil + } + return o.Prev +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/ratelimitnotice.go b/src/__tests__/mockserver/internal/sdk/models/components/ratelimitnotice.go new file mode 100644 index 00000000..6a62230d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/ratelimitnotice.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type RateLimitNotice struct { + Remaining int64 `json:"remaining"` + Reset int64 `json:"reset"` + ResetMs int64 `json:"resetMs"` + Total int64 `json:"total"` +} + +func (o *RateLimitNotice) GetRemaining() int64 { + if o == nil { + return 0 + } + return o.Remaining +} + +func (o *RateLimitNotice) GetReset() int64 { + if o == nil { + return 0 + } + return o.Reset +} + +func (o *RateLimitNotice) GetResetMs() int64 { + if o == nil { + return 0 + } + return o.ResetMs +} + +func (o *RateLimitNotice) GetTotal() int64 { + if o == nil { + return 0 + } + return o.Total +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/security.go b/src/__tests__/mockserver/internal/sdk/models/components/security.go new file mode 100644 index 00000000..a90e7cc3 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/security.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Security struct { + BearerToken *string `security:"scheme,type=http,subtype=bearer,name=Authorization"` +} + +func (o *Security) GetBearerToken() *string { + if o == nil { + return nil + } + return o.BearerToken +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/teamlimited.go b/src/__tests__/mockserver/internal/sdk/models/components/teamlimited.go new file mode 100644 index 00000000..b0c0de6c --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/teamlimited.go @@ -0,0 +1,589 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +// Connection - Information for the SAML Single Sign-On configuration. +type Connection struct { + // The Identity Provider "type", for example Okta. + Type string `json:"type"` + // Current status of the connection. + Status string `json:"status"` + // Current state of the connection. + State string `json:"state"` + // Timestamp (in milliseconds) of when the configuration was connected. + ConnectedAt float64 `json:"connectedAt"` + // Timestamp (in milliseconds) of when the last webhook event was received from WorkOS. + LastReceivedWebhookEvent *float64 `json:"lastReceivedWebhookEvent,omitempty"` +} + +func (o *Connection) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *Connection) GetStatus() string { + if o == nil { + return "" + } + return o.Status +} + +func (o *Connection) GetState() string { + if o == nil { + return "" + } + return o.State +} + +func (o *Connection) GetConnectedAt() float64 { + if o == nil { + return 0.0 + } + return o.ConnectedAt +} + +func (o *Connection) GetLastReceivedWebhookEvent() *float64 { + if o == nil { + return nil + } + return o.LastReceivedWebhookEvent +} + +// Directory - Information for the Directory Sync configuration. +type Directory struct { + // The Identity Provider "type", for example Okta. + Type string `json:"type"` + // Current state of the connection. + State string `json:"state"` + // Timestamp (in milliseconds) of when the configuration was connected. + ConnectedAt float64 `json:"connectedAt"` + // Timestamp (in milliseconds) of when the last webhook event was received from WorkOS. + LastReceivedWebhookEvent *float64 `json:"lastReceivedWebhookEvent,omitempty"` +} + +func (o *Directory) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *Directory) GetState() string { + if o == nil { + return "" + } + return o.State +} + +func (o *Directory) GetConnectedAt() float64 { + if o == nil { + return 0.0 + } + return o.ConnectedAt +} + +func (o *Directory) GetLastReceivedWebhookEvent() *float64 { + if o == nil { + return nil + } + return o.LastReceivedWebhookEvent +} + +// Saml - When "Single Sign-On (SAML)" is configured, this object contains information that allows the client-side to identify whether or not this Team has SAML enforced. +type Saml struct { + // Information for the SAML Single Sign-On configuration. + Connection *Connection `json:"connection,omitempty"` + // Information for the Directory Sync configuration. + Directory *Directory `json:"directory,omitempty"` + // When `true`, interactions with the Team **must** be done with an authentication token that has been authenticated with the Team's SAML Single Sign-On provider. + Enforced bool `json:"enforced"` +} + +func (o *Saml) GetConnection() *Connection { + if o == nil { + return nil + } + return o.Connection +} + +func (o *Saml) GetDirectory() *Directory { + if o == nil { + return nil + } + return o.Directory +} + +func (o *Saml) GetEnforced() bool { + if o == nil { + return false + } + return o.Enforced +} + +type Entitlements struct { + Entitlement string `json:"entitlement"` +} + +func (o *Entitlements) GetEntitlement() string { + if o == nil { + return "" + } + return o.Entitlement +} + +type Role string + +const ( + RoleOwner Role = "OWNER" + RoleMember Role = "MEMBER" + RoleDeveloper Role = "DEVELOPER" + RoleBilling Role = "BILLING" + RoleViewer Role = "VIEWER" + RoleContributor Role = "CONTRIBUTOR" +) + +func (e Role) ToPointer() *Role { + return &e +} +func (e *Role) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "BILLING": + fallthrough + case "VIEWER": + fallthrough + case "CONTRIBUTOR": + *e = Role(v) + return nil + default: + return fmt.Errorf("invalid value for Role: %v", v) + } +} + +type AdditionalRoles string + +const ( + AdditionalRolesCreateProject AdditionalRoles = "CreateProject" + AdditionalRolesFullProductionDeployment AdditionalRoles = "FullProductionDeployment" +) + +func (e AdditionalRoles) ToPointer() *AdditionalRoles { + return &e +} +func (e *AdditionalRoles) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CreateProject": + fallthrough + case "FullProductionDeployment": + *e = AdditionalRoles(v) + return nil + default: + return fmt.Errorf("invalid value for AdditionalRoles: %v", v) + } +} + +type Origin string + +const ( + OriginLink Origin = "link" + OriginSaml Origin = "saml" + OriginGithub Origin = "github" + OriginGitlab Origin = "gitlab" + OriginBitbucket Origin = "bitbucket" + OriginMail Origin = "mail" + OriginImport Origin = "import" + OriginTeams Origin = "teams" + OriginDsync Origin = "dsync" + OriginFeedback Origin = "feedback" + OriginOrganizationTeams Origin = "organization-teams" +) + +func (e Origin) ToPointer() *Origin { + return &e +} +func (e *Origin) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "link": + fallthrough + case "saml": + fallthrough + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + fallthrough + case "mail": + fallthrough + case "import": + fallthrough + case "teams": + fallthrough + case "dsync": + fallthrough + case "feedback": + fallthrough + case "organization-teams": + *e = Origin(v) + return nil + default: + return fmt.Errorf("invalid value for Origin: %v", v) + } +} + +type GitUserIDType string + +const ( + GitUserIDTypeStr GitUserIDType = "str" + GitUserIDTypeNumber GitUserIDType = "number" +) + +type GitUserID struct { + Str *string + Number *float64 + + Type GitUserIDType +} + +func CreateGitUserIDStr(str string) GitUserID { + typ := GitUserIDTypeStr + + return GitUserID{ + Str: &str, + Type: typ, + } +} + +func CreateGitUserIDNumber(number float64) GitUserID { + typ := GitUserIDTypeNumber + + return GitUserID{ + Number: &number, + Type: typ, + } +} + +func (u *GitUserID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GitUserIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GitUserIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GitUserID", string(data)) +} + +func (u GitUserID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GitUserID: all fields are null") +} + +type JoinedFrom struct { + Origin Origin `json:"origin"` + CommitID *string `json:"commitId,omitempty"` + RepoID *string `json:"repoId,omitempty"` + RepoPath *string `json:"repoPath,omitempty"` + GitUserID *GitUserID `json:"gitUserId,omitempty"` + GitUserLogin *string `json:"gitUserLogin,omitempty"` + SsoUserID *string `json:"ssoUserId,omitempty"` + SsoConnectedAt *float64 `json:"ssoConnectedAt,omitempty"` + IdpUserID *string `json:"idpUserId,omitempty"` + DsyncUserID *string `json:"dsyncUserId,omitempty"` + DsyncConnectedAt *float64 `json:"dsyncConnectedAt,omitempty"` +} + +func (o *JoinedFrom) GetOrigin() Origin { + if o == nil { + return Origin("") + } + return o.Origin +} + +func (o *JoinedFrom) GetCommitID() *string { + if o == nil { + return nil + } + return o.CommitID +} + +func (o *JoinedFrom) GetRepoID() *string { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *JoinedFrom) GetRepoPath() *string { + if o == nil { + return nil + } + return o.RepoPath +} + +func (o *JoinedFrom) GetGitUserID() *GitUserID { + if o == nil { + return nil + } + return o.GitUserID +} + +func (o *JoinedFrom) GetGitUserLogin() *string { + if o == nil { + return nil + } + return o.GitUserLogin +} + +func (o *JoinedFrom) GetSsoUserID() *string { + if o == nil { + return nil + } + return o.SsoUserID +} + +func (o *JoinedFrom) GetSsoConnectedAt() *float64 { + if o == nil { + return nil + } + return o.SsoConnectedAt +} + +func (o *JoinedFrom) GetIdpUserID() *string { + if o == nil { + return nil + } + return o.IdpUserID +} + +func (o *JoinedFrom) GetDsyncUserID() *string { + if o == nil { + return nil + } + return o.DsyncUserID +} + +func (o *JoinedFrom) GetDsyncConnectedAt() *float64 { + if o == nil { + return nil + } + return o.DsyncConnectedAt +} + +// Membership - The membership of the authenticated User in relation to the Team. +type Membership struct { + UID *string `json:"uid,omitempty"` + Entitlements []Entitlements `json:"entitlements,omitempty"` + Confirmed bool `json:"confirmed"` + ConfirmedAt float64 `json:"confirmedAt"` + AccessRequestedAt *float64 `json:"accessRequestedAt,omitempty"` + Role Role `json:"role"` + AdditionalRoles []AdditionalRoles `json:"additionalRoles,omitempty"` + TeamID *string `json:"teamId,omitempty"` + CreatedAt float64 `json:"createdAt"` + Created float64 `json:"created"` + JoinedFrom *JoinedFrom `json:"joinedFrom,omitempty"` +} + +func (o *Membership) GetUID() *string { + if o == nil { + return nil + } + return o.UID +} + +func (o *Membership) GetEntitlements() []Entitlements { + if o == nil { + return nil + } + return o.Entitlements +} + +func (o *Membership) GetConfirmed() bool { + if o == nil { + return false + } + return o.Confirmed +} + +func (o *Membership) GetConfirmedAt() float64 { + if o == nil { + return 0.0 + } + return o.ConfirmedAt +} + +func (o *Membership) GetAccessRequestedAt() *float64 { + if o == nil { + return nil + } + return o.AccessRequestedAt +} + +func (o *Membership) GetRole() Role { + if o == nil { + return Role("") + } + return o.Role +} + +func (o *Membership) GetAdditionalRoles() []AdditionalRoles { + if o == nil { + return nil + } + return o.AdditionalRoles +} + +func (o *Membership) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *Membership) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *Membership) GetCreated() float64 { + if o == nil { + return 0.0 + } + return o.Created +} + +func (o *Membership) GetJoinedFrom() *JoinedFrom { + if o == nil { + return nil + } + return o.JoinedFrom +} + +// TeamLimited - A limited form of data representing a Team, due to the authentication token missing privileges to read the full Team data. +type TeamLimited struct { + // Property indicating that this Team data contains only limited information, due to the authentication token missing privileges to read the full Team data. Re-login with the Team's configured SAML Single Sign-On provider in order to upgrade the authentication token with the necessary privileges. + Limited bool `json:"limited"` + // When "Single Sign-On (SAML)" is configured, this object contains information that allows the client-side to identify whether or not this Team has SAML enforced. + Saml *Saml `json:"saml,omitempty"` + // The Team's unique identifier. + ID string `json:"id"` + // The Team's slug, which is unique across the Vercel platform. + Slug string `json:"slug"` + // Name associated with the Team account, or `null` if none has been provided. + Name *string `json:"name"` + // The ID of the file used as avatar for this Team. + Avatar *string `json:"avatar"` + // The membership of the authenticated User in relation to the Team. + Membership Membership `json:"membership"` + // Will remain undocumented. Remove in v3 API. + Created string `json:"created"` + // UNIX timestamp (in milliseconds) when the Team was created. + CreatedAt float64 `json:"createdAt"` +} + +func (o *TeamLimited) GetLimited() bool { + if o == nil { + return false + } + return o.Limited +} + +func (o *TeamLimited) GetSaml() *Saml { + if o == nil { + return nil + } + return o.Saml +} + +func (o *TeamLimited) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *TeamLimited) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *TeamLimited) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *TeamLimited) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +func (o *TeamLimited) GetMembership() Membership { + if o == nil { + return Membership{} + } + return o.Membership +} + +func (o *TeamLimited) GetCreated() string { + if o == nil { + return "" + } + return o.Created +} + +func (o *TeamLimited) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/userevent.go b/src/__tests__/mockserver/internal/sdk/models/components/userevent.go new file mode 100644 index 00000000..63dd37c5 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/userevent.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// UserEvent - Array of events generated by the User. +type UserEvent struct { +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/addbypassip.go b/src/__tests__/mockserver/internal/sdk/models/operations/addbypassip.go new file mode 100644 index 00000000..47342bd5 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/addbypassip.go @@ -0,0 +1,517 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type AddBypassIPRequestBody2 struct { + Domain *string `json:"domain,omitempty"` + ProjectScope bool `json:"projectScope"` + SourceIP *string `json:"sourceIp,omitempty"` + AllSources *bool `json:"allSources,omitempty"` + Note *string `json:"note,omitempty"` +} + +func (o *AddBypassIPRequestBody2) GetDomain() *string { + if o == nil { + return nil + } + return o.Domain +} + +func (o *AddBypassIPRequestBody2) GetProjectScope() bool { + if o == nil { + return false + } + return o.ProjectScope +} + +func (o *AddBypassIPRequestBody2) GetSourceIP() *string { + if o == nil { + return nil + } + return o.SourceIP +} + +func (o *AddBypassIPRequestBody2) GetAllSources() *bool { + if o == nil { + return nil + } + return o.AllSources +} + +func (o *AddBypassIPRequestBody2) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +type AddBypassIPRequestBody1 struct { + Domain string `json:"domain"` + ProjectScope *bool `json:"projectScope,omitempty"` + SourceIP *string `json:"sourceIp,omitempty"` + AllSources *bool `json:"allSources,omitempty"` + Note *string `json:"note,omitempty"` +} + +func (o *AddBypassIPRequestBody1) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *AddBypassIPRequestBody1) GetProjectScope() *bool { + if o == nil { + return nil + } + return o.ProjectScope +} + +func (o *AddBypassIPRequestBody1) GetSourceIP() *string { + if o == nil { + return nil + } + return o.SourceIP +} + +func (o *AddBypassIPRequestBody1) GetAllSources() *bool { + if o == nil { + return nil + } + return o.AllSources +} + +func (o *AddBypassIPRequestBody1) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +type AddBypassIPRequestBodyType string + +const ( + AddBypassIPRequestBodyTypeAddBypassIPRequestBody1 AddBypassIPRequestBodyType = "addBypassIp_requestBody_1" + AddBypassIPRequestBodyTypeAddBypassIPRequestBody2 AddBypassIPRequestBodyType = "addBypassIp_requestBody_2" +) + +type AddBypassIPRequestBody struct { + AddBypassIPRequestBody1 *AddBypassIPRequestBody1 + AddBypassIPRequestBody2 *AddBypassIPRequestBody2 + + Type AddBypassIPRequestBodyType +} + +func CreateAddBypassIPRequestBodyAddBypassIPRequestBody1(addBypassIPRequestBody1 AddBypassIPRequestBody1) AddBypassIPRequestBody { + typ := AddBypassIPRequestBodyTypeAddBypassIPRequestBody1 + + return AddBypassIPRequestBody{ + AddBypassIPRequestBody1: &addBypassIPRequestBody1, + Type: typ, + } +} + +func CreateAddBypassIPRequestBodyAddBypassIPRequestBody2(addBypassIPRequestBody2 AddBypassIPRequestBody2) AddBypassIPRequestBody { + typ := AddBypassIPRequestBodyTypeAddBypassIPRequestBody2 + + return AddBypassIPRequestBody{ + AddBypassIPRequestBody2: &addBypassIPRequestBody2, + Type: typ, + } +} + +func (u *AddBypassIPRequestBody) UnmarshalJSON(data []byte) error { + + var addBypassIPRequestBody1 AddBypassIPRequestBody1 = AddBypassIPRequestBody1{} + if err := utils.UnmarshalJSON(data, &addBypassIPRequestBody1, "", true, true); err == nil { + u.AddBypassIPRequestBody1 = &addBypassIPRequestBody1 + u.Type = AddBypassIPRequestBodyTypeAddBypassIPRequestBody1 + return nil + } + + var addBypassIPRequestBody2 AddBypassIPRequestBody2 = AddBypassIPRequestBody2{} + if err := utils.UnmarshalJSON(data, &addBypassIPRequestBody2, "", true, true); err == nil { + u.AddBypassIPRequestBody2 = &addBypassIPRequestBody2 + u.Type = AddBypassIPRequestBodyTypeAddBypassIPRequestBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddBypassIPRequestBody", string(data)) +} + +func (u AddBypassIPRequestBody) MarshalJSON() ([]byte, error) { + if u.AddBypassIPRequestBody1 != nil { + return utils.MarshalJSON(u.AddBypassIPRequestBody1, "", true) + } + + if u.AddBypassIPRequestBody2 != nil { + return utils.MarshalJSON(u.AddBypassIPRequestBody2, "", true) + } + + return nil, errors.New("could not marshal union type AddBypassIPRequestBody: all fields are null") +} + +type AddBypassIPRequest struct { + ProjectID string `queryParam:"style=form,explode=true,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody *AddBypassIPRequestBody `request:"mediaType=application/json"` +} + +func (o *AddBypassIPRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *AddBypassIPRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *AddBypassIPRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *AddBypassIPRequest) GetRequestBody() *AddBypassIPRequestBody { + if o == nil { + return nil + } + return o.RequestBody +} + +type AddBypassIPResponseBodyAction string + +const ( + AddBypassIPResponseBodyActionBlock AddBypassIPResponseBodyAction = "block" + AddBypassIPResponseBodyActionBypass AddBypassIPResponseBodyAction = "bypass" +) + +func (e AddBypassIPResponseBodyAction) ToPointer() *AddBypassIPResponseBodyAction { + return &e +} +func (e *AddBypassIPResponseBodyAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "block": + fallthrough + case "bypass": + *e = AddBypassIPResponseBodyAction(v) + return nil + default: + return fmt.Errorf("invalid value for AddBypassIPResponseBodyAction: %v", v) + } +} + +type AddBypassIPResponseBodySecurityResult struct { + OwnerID string `json:"OwnerId"` + ID string `json:"Id"` + Domain string `json:"Domain"` + IP string `json:"Ip"` + Action *AddBypassIPResponseBodyAction `json:"Action,omitempty"` + ProjectID *string `json:"ProjectId,omitempty"` + IsProjectRule *bool `json:"IsProjectRule,omitempty"` + Note *string `json:"Note,omitempty"` + CreatedAt string `json:"CreatedAt"` + ActorID *string `json:"ActorId,omitempty"` + UpdatedAt string `json:"UpdatedAt"` + UpdatedAtHour string `json:"UpdatedAtHour"` + DeletedAt *string `json:"DeletedAt,omitempty"` + ExpiresAt *float64 `json:"ExpiresAt,omitempty"` +} + +func (o *AddBypassIPResponseBodySecurityResult) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *AddBypassIPResponseBodySecurityResult) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *AddBypassIPResponseBodySecurityResult) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *AddBypassIPResponseBodySecurityResult) GetIP() string { + if o == nil { + return "" + } + return o.IP +} + +func (o *AddBypassIPResponseBodySecurityResult) GetAction() *AddBypassIPResponseBodyAction { + if o == nil { + return nil + } + return o.Action +} + +func (o *AddBypassIPResponseBodySecurityResult) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *AddBypassIPResponseBodySecurityResult) GetIsProjectRule() *bool { + if o == nil { + return nil + } + return o.IsProjectRule +} + +func (o *AddBypassIPResponseBodySecurityResult) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +func (o *AddBypassIPResponseBodySecurityResult) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *AddBypassIPResponseBodySecurityResult) GetActorID() *string { + if o == nil { + return nil + } + return o.ActorID +} + +func (o *AddBypassIPResponseBodySecurityResult) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *AddBypassIPResponseBodySecurityResult) GetUpdatedAtHour() string { + if o == nil { + return "" + } + return o.UpdatedAtHour +} + +func (o *AddBypassIPResponseBodySecurityResult) GetDeletedAt() *string { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *AddBypassIPResponseBodySecurityResult) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +type AddBypassIPResponseBody2 struct { + Ok bool `json:"ok"` + Result []AddBypassIPResponseBodySecurityResult `json:"result,omitempty"` +} + +func (o *AddBypassIPResponseBody2) GetOk() bool { + if o == nil { + return false + } + return o.Ok +} + +func (o *AddBypassIPResponseBody2) GetResult() []AddBypassIPResponseBodySecurityResult { + if o == nil { + return nil + } + return o.Result +} + +type AddBypassIPResponseBodyResult struct { + OwnerID string `json:"OwnerId"` + ID string `json:"Id"` + Domain string `json:"Domain"` + IP *string `json:"Ip,omitempty"` + ProjectID string `json:"ProjectId"` + IsProjectRule bool `json:"IsProjectRule"` +} + +func (o *AddBypassIPResponseBodyResult) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *AddBypassIPResponseBodyResult) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *AddBypassIPResponseBodyResult) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *AddBypassIPResponseBodyResult) GetIP() *string { + if o == nil { + return nil + } + return o.IP +} + +func (o *AddBypassIPResponseBodyResult) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *AddBypassIPResponseBodyResult) GetIsProjectRule() bool { + if o == nil { + return false + } + return o.IsProjectRule +} + +type AddBypassIPResponseBody1 struct { + Ok bool `json:"ok"` + Result []AddBypassIPResponseBodyResult `json:"result"` + Pagination any `json:"pagination"` +} + +func (o *AddBypassIPResponseBody1) GetOk() bool { + if o == nil { + return false + } + return o.Ok +} + +func (o *AddBypassIPResponseBody1) GetResult() []AddBypassIPResponseBodyResult { + if o == nil { + return []AddBypassIPResponseBodyResult{} + } + return o.Result +} + +func (o *AddBypassIPResponseBody1) GetPagination() any { + if o == nil { + return nil + } + return o.Pagination +} + +type AddBypassIPResponseBodyType string + +const ( + AddBypassIPResponseBodyTypeAddBypassIPResponseBody1 AddBypassIPResponseBodyType = "addBypassIp_responseBody_1" + AddBypassIPResponseBodyTypeAddBypassIPResponseBody2 AddBypassIPResponseBodyType = "addBypassIp_responseBody_2" +) + +type AddBypassIPResponseBody struct { + AddBypassIPResponseBody1 *AddBypassIPResponseBody1 + AddBypassIPResponseBody2 *AddBypassIPResponseBody2 + + Type AddBypassIPResponseBodyType +} + +func CreateAddBypassIPResponseBodyAddBypassIPResponseBody1(addBypassIPResponseBody1 AddBypassIPResponseBody1) AddBypassIPResponseBody { + typ := AddBypassIPResponseBodyTypeAddBypassIPResponseBody1 + + return AddBypassIPResponseBody{ + AddBypassIPResponseBody1: &addBypassIPResponseBody1, + Type: typ, + } +} + +func CreateAddBypassIPResponseBodyAddBypassIPResponseBody2(addBypassIPResponseBody2 AddBypassIPResponseBody2) AddBypassIPResponseBody { + typ := AddBypassIPResponseBodyTypeAddBypassIPResponseBody2 + + return AddBypassIPResponseBody{ + AddBypassIPResponseBody2: &addBypassIPResponseBody2, + Type: typ, + } +} + +func (u *AddBypassIPResponseBody) UnmarshalJSON(data []byte) error { + + var addBypassIPResponseBody2 AddBypassIPResponseBody2 = AddBypassIPResponseBody2{} + if err := utils.UnmarshalJSON(data, &addBypassIPResponseBody2, "", true, true); err == nil { + u.AddBypassIPResponseBody2 = &addBypassIPResponseBody2 + u.Type = AddBypassIPResponseBodyTypeAddBypassIPResponseBody2 + return nil + } + + var addBypassIPResponseBody1 AddBypassIPResponseBody1 = AddBypassIPResponseBody1{} + if err := utils.UnmarshalJSON(data, &addBypassIPResponseBody1, "", true, true); err == nil { + u.AddBypassIPResponseBody1 = &addBypassIPResponseBody1 + u.Type = AddBypassIPResponseBodyTypeAddBypassIPResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddBypassIPResponseBody", string(data)) +} + +func (u AddBypassIPResponseBody) MarshalJSON() ([]byte, error) { + if u.AddBypassIPResponseBody1 != nil { + return utils.MarshalJSON(u.AddBypassIPResponseBody1, "", true) + } + + if u.AddBypassIPResponseBody2 != nil { + return utils.MarshalJSON(u.AddBypassIPResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type AddBypassIPResponseBody: all fields are null") +} + +type AddBypassIPResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *AddBypassIPResponseBody +} + +func (o *AddBypassIPResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AddBypassIPResponse) GetOneOf() *AddBypassIPResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/addprojectdomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/addprojectdomain.go new file mode 100644 index 00000000..1ebac817 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/addprojectdomain.go @@ -0,0 +1,269 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// AddProjectDomainRedirectStatusCode - Status code for domain redirect +type AddProjectDomainRedirectStatusCode int64 + +const ( + AddProjectDomainRedirectStatusCodeThreeHundredAndOne AddProjectDomainRedirectStatusCode = 301 + AddProjectDomainRedirectStatusCodeThreeHundredAndTwo AddProjectDomainRedirectStatusCode = 302 + AddProjectDomainRedirectStatusCodeThreeHundredAndSeven AddProjectDomainRedirectStatusCode = 307 + AddProjectDomainRedirectStatusCodeThreeHundredAndEight AddProjectDomainRedirectStatusCode = 308 +) + +func (e AddProjectDomainRedirectStatusCode) ToPointer() *AddProjectDomainRedirectStatusCode { + return &e +} +func (e *AddProjectDomainRedirectStatusCode) UnmarshalJSON(data []byte) error { + var v int64 + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case 301: + fallthrough + case 302: + fallthrough + case 307: + fallthrough + case 308: + *e = AddProjectDomainRedirectStatusCode(v) + return nil + default: + return fmt.Errorf("invalid value for AddProjectDomainRedirectStatusCode: %v", v) + } +} + +type AddProjectDomainRequestBody struct { + // The project domain name + Name string `json:"name"` + // Git branch to link the project domain + GitBranch *string `json:"gitBranch,omitempty"` + // Target destination domain for redirect + Redirect *string `json:"redirect,omitempty"` + // Status code for domain redirect + RedirectStatusCode *AddProjectDomainRedirectStatusCode `json:"redirectStatusCode,omitempty"` +} + +func (o *AddProjectDomainRequestBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *AddProjectDomainRequestBody) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *AddProjectDomainRequestBody) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *AddProjectDomainRequestBody) GetRedirectStatusCode() *AddProjectDomainRedirectStatusCode { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +type AddProjectDomainRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody AddProjectDomainRequestBody `request:"mediaType=application/json"` +} + +func (o *AddProjectDomainRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *AddProjectDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *AddProjectDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *AddProjectDomainRequest) GetRequestBody() AddProjectDomainRequestBody { + if o == nil { + return AddProjectDomainRequestBody{} + } + return o.RequestBody +} + +// AddProjectDomainVerification - A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. +type AddProjectDomainVerification struct { + Type string `json:"type"` + Domain string `json:"domain"` + Value string `json:"value"` + Reason string `json:"reason"` +} + +func (o *AddProjectDomainVerification) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *AddProjectDomainVerification) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *AddProjectDomainVerification) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *AddProjectDomainVerification) GetReason() string { + if o == nil { + return "" + } + return o.Reason +} + +// AddProjectDomainResponseBody - The domain was successfully added to the project +type AddProjectDomainResponseBody struct { + Name string `json:"name"` + ApexName string `json:"apexName"` + ProjectID string `json:"projectId"` + Redirect *string `json:"redirect,omitempty"` + RedirectStatusCode *float64 `json:"redirectStatusCode,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + CustomEnvironmentID *string `json:"customEnvironmentId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + // `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. + Verified bool `json:"verified"` + // A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. + Verification []AddProjectDomainVerification `json:"verification,omitempty"` +} + +func (o *AddProjectDomainResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *AddProjectDomainResponseBody) GetApexName() string { + if o == nil { + return "" + } + return o.ApexName +} + +func (o *AddProjectDomainResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *AddProjectDomainResponseBody) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *AddProjectDomainResponseBody) GetRedirectStatusCode() *float64 { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +func (o *AddProjectDomainResponseBody) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *AddProjectDomainResponseBody) GetCustomEnvironmentID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentID +} + +func (o *AddProjectDomainResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *AddProjectDomainResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *AddProjectDomainResponseBody) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *AddProjectDomainResponseBody) GetVerification() []AddProjectDomainVerification { + if o == nil { + return nil + } + return o.Verification +} + +type AddProjectDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The domain was successfully added to the project + Object *AddProjectDomainResponseBody +} + +func (o *AddProjectDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AddProjectDomainResponse) GetObject() *AddProjectDomainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/addprojectmember.go b/src/__tests__/mockserver/internal/sdk/models/operations/addprojectmember.go new file mode 100644 index 00000000..7e0ab74b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/addprojectmember.go @@ -0,0 +1,373 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// AddProjectMemberRequestBodyProjectMembersRole - The project role of the member that will be added. +type AddProjectMemberRequestBodyProjectMembersRole string + +const ( + AddProjectMemberRequestBodyProjectMembersRoleAdmin AddProjectMemberRequestBodyProjectMembersRole = "ADMIN" + AddProjectMemberRequestBodyProjectMembersRoleProjectDeveloper AddProjectMemberRequestBodyProjectMembersRole = "PROJECT_DEVELOPER" + AddProjectMemberRequestBodyProjectMembersRoleProjectViewer AddProjectMemberRequestBodyProjectMembersRole = "PROJECT_VIEWER" +) + +func (e AddProjectMemberRequestBodyProjectMembersRole) ToPointer() *AddProjectMemberRequestBodyProjectMembersRole { + return &e +} +func (e *AddProjectMemberRequestBodyProjectMembersRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = AddProjectMemberRequestBodyProjectMembersRole(v) + return nil + default: + return fmt.Errorf("invalid value for AddProjectMemberRequestBodyProjectMembersRole: %v", v) + } +} + +type AddProjectMemberRequestBody3 struct { + // The ID of the team member that should be added to this project. + UID *string `json:"uid,omitempty"` + // The username of the team member that should be added to this project. + Username *string `json:"username,omitempty"` + // The email of the team member that should be added to this project. + Email string `json:"email"` + // The project role of the member that will be added. + Role AddProjectMemberRequestBodyProjectMembersRole `json:"role"` +} + +func (o *AddProjectMemberRequestBody3) GetUID() *string { + if o == nil { + return nil + } + return o.UID +} + +func (o *AddProjectMemberRequestBody3) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +func (o *AddProjectMemberRequestBody3) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *AddProjectMemberRequestBody3) GetRole() AddProjectMemberRequestBodyProjectMembersRole { + if o == nil { + return AddProjectMemberRequestBodyProjectMembersRole("") + } + return o.Role +} + +// AddProjectMemberRequestBodyRole - The project role of the member that will be added. +type AddProjectMemberRequestBodyRole string + +const ( + AddProjectMemberRequestBodyRoleAdmin AddProjectMemberRequestBodyRole = "ADMIN" + AddProjectMemberRequestBodyRoleProjectDeveloper AddProjectMemberRequestBodyRole = "PROJECT_DEVELOPER" + AddProjectMemberRequestBodyRoleProjectViewer AddProjectMemberRequestBodyRole = "PROJECT_VIEWER" +) + +func (e AddProjectMemberRequestBodyRole) ToPointer() *AddProjectMemberRequestBodyRole { + return &e +} +func (e *AddProjectMemberRequestBodyRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = AddProjectMemberRequestBodyRole(v) + return nil + default: + return fmt.Errorf("invalid value for AddProjectMemberRequestBodyRole: %v", v) + } +} + +type AddProjectMemberRequestBody2 struct { + // The ID of the team member that should be added to this project. + UID *string `json:"uid,omitempty"` + // The username of the team member that should be added to this project. + Username string `json:"username"` + // The email of the team member that should be added to this project. + Email *string `json:"email,omitempty"` + // The project role of the member that will be added. + Role AddProjectMemberRequestBodyRole `json:"role"` +} + +func (o *AddProjectMemberRequestBody2) GetUID() *string { + if o == nil { + return nil + } + return o.UID +} + +func (o *AddProjectMemberRequestBody2) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *AddProjectMemberRequestBody2) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *AddProjectMemberRequestBody2) GetRole() AddProjectMemberRequestBodyRole { + if o == nil { + return AddProjectMemberRequestBodyRole("") + } + return o.Role +} + +// RequestBodyRole - The project role of the member that will be added. +type RequestBodyRole string + +const ( + RequestBodyRoleAdmin RequestBodyRole = "ADMIN" + RequestBodyRoleProjectDeveloper RequestBodyRole = "PROJECT_DEVELOPER" + RequestBodyRoleProjectViewer RequestBodyRole = "PROJECT_VIEWER" +) + +func (e RequestBodyRole) ToPointer() *RequestBodyRole { + return &e +} +func (e *RequestBodyRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = RequestBodyRole(v) + return nil + default: + return fmt.Errorf("invalid value for RequestBodyRole: %v", v) + } +} + +type AddProjectMemberRequestBody1 struct { + // The ID of the team member that should be added to this project. + UID string `json:"uid"` + // The username of the team member that should be added to this project. + Username *string `json:"username,omitempty"` + // The email of the team member that should be added to this project. + Email *string `json:"email,omitempty"` + // The project role of the member that will be added. + Role RequestBodyRole `json:"role"` +} + +func (o *AddProjectMemberRequestBody1) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *AddProjectMemberRequestBody1) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +func (o *AddProjectMemberRequestBody1) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *AddProjectMemberRequestBody1) GetRole() RequestBodyRole { + if o == nil { + return RequestBodyRole("") + } + return o.Role +} + +type AddProjectMemberRequestBodyType string + +const ( + AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody1 AddProjectMemberRequestBodyType = "addProjectMember_requestBody_1" + AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody2 AddProjectMemberRequestBodyType = "addProjectMember_requestBody_2" + AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody3 AddProjectMemberRequestBodyType = "addProjectMember_requestBody_3" +) + +type AddProjectMemberRequestBody struct { + AddProjectMemberRequestBody1 *AddProjectMemberRequestBody1 + AddProjectMemberRequestBody2 *AddProjectMemberRequestBody2 + AddProjectMemberRequestBody3 *AddProjectMemberRequestBody3 + + Type AddProjectMemberRequestBodyType +} + +func CreateAddProjectMemberRequestBodyAddProjectMemberRequestBody1(addProjectMemberRequestBody1 AddProjectMemberRequestBody1) AddProjectMemberRequestBody { + typ := AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody1 + + return AddProjectMemberRequestBody{ + AddProjectMemberRequestBody1: &addProjectMemberRequestBody1, + Type: typ, + } +} + +func CreateAddProjectMemberRequestBodyAddProjectMemberRequestBody2(addProjectMemberRequestBody2 AddProjectMemberRequestBody2) AddProjectMemberRequestBody { + typ := AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody2 + + return AddProjectMemberRequestBody{ + AddProjectMemberRequestBody2: &addProjectMemberRequestBody2, + Type: typ, + } +} + +func CreateAddProjectMemberRequestBodyAddProjectMemberRequestBody3(addProjectMemberRequestBody3 AddProjectMemberRequestBody3) AddProjectMemberRequestBody { + typ := AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody3 + + return AddProjectMemberRequestBody{ + AddProjectMemberRequestBody3: &addProjectMemberRequestBody3, + Type: typ, + } +} + +func (u *AddProjectMemberRequestBody) UnmarshalJSON(data []byte) error { + + var addProjectMemberRequestBody1 AddProjectMemberRequestBody1 = AddProjectMemberRequestBody1{} + if err := utils.UnmarshalJSON(data, &addProjectMemberRequestBody1, "", true, true); err == nil { + u.AddProjectMemberRequestBody1 = &addProjectMemberRequestBody1 + u.Type = AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody1 + return nil + } + + var addProjectMemberRequestBody2 AddProjectMemberRequestBody2 = AddProjectMemberRequestBody2{} + if err := utils.UnmarshalJSON(data, &addProjectMemberRequestBody2, "", true, true); err == nil { + u.AddProjectMemberRequestBody2 = &addProjectMemberRequestBody2 + u.Type = AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody2 + return nil + } + + var addProjectMemberRequestBody3 AddProjectMemberRequestBody3 = AddProjectMemberRequestBody3{} + if err := utils.UnmarshalJSON(data, &addProjectMemberRequestBody3, "", true, true); err == nil { + u.AddProjectMemberRequestBody3 = &addProjectMemberRequestBody3 + u.Type = AddProjectMemberRequestBodyTypeAddProjectMemberRequestBody3 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddProjectMemberRequestBody", string(data)) +} + +func (u AddProjectMemberRequestBody) MarshalJSON() ([]byte, error) { + if u.AddProjectMemberRequestBody1 != nil { + return utils.MarshalJSON(u.AddProjectMemberRequestBody1, "", true) + } + + if u.AddProjectMemberRequestBody2 != nil { + return utils.MarshalJSON(u.AddProjectMemberRequestBody2, "", true) + } + + if u.AddProjectMemberRequestBody3 != nil { + return utils.MarshalJSON(u.AddProjectMemberRequestBody3, "", true) + } + + return nil, errors.New("could not marshal union type AddProjectMemberRequestBody: all fields are null") +} + +type AddProjectMemberRequest struct { + // The ID or name of the Project. + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody AddProjectMemberRequestBody `request:"mediaType=application/json"` +} + +func (o *AddProjectMemberRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *AddProjectMemberRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *AddProjectMemberRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *AddProjectMemberRequest) GetRequestBody() AddProjectMemberRequestBody { + if o == nil { + return AddProjectMemberRequestBody{} + } + return o.RequestBody +} + +// AddProjectMemberResponseBody - Responds with the project ID on success. +type AddProjectMemberResponseBody struct { + ID string `json:"id"` +} + +func (o *AddProjectMemberResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type AddProjectMemberResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Responds with the project ID on success. + Object *AddProjectMemberResponseBody +} + +func (o *AddProjectMemberResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AddProjectMemberResponse) GetObject() *AddProjectMemberResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/artifactexists.go b/src/__tests__/mockserver/internal/sdk/models/operations/artifactexists.go new file mode 100644 index 00000000..6230cc69 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/artifactexists.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ArtifactExistsRequest struct { + // The artifact hash + Hash string `pathParam:"style=simple,explode=false,name=hash"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ArtifactExistsRequest) GetHash() string { + if o == nil { + return "" + } + return o.Hash +} + +func (o *ArtifactExistsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ArtifactExistsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ArtifactExistsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *ArtifactExistsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/artifactquery.go b/src/__tests__/mockserver/internal/sdk/models/operations/artifactquery.go new file mode 100644 index 00000000..d07d53da --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/artifactquery.go @@ -0,0 +1,182 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type ArtifactQueryRequestBody struct { + // artifact hashes + Hashes []string `json:"hashes"` +} + +func (o *ArtifactQueryRequestBody) GetHashes() []string { + if o == nil { + return []string{} + } + return o.Hashes +} + +type ArtifactQueryRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody ArtifactQueryRequestBody `request:"mediaType=application/json"` +} + +func (o *ArtifactQueryRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ArtifactQueryRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *ArtifactQueryRequest) GetRequestBody() ArtifactQueryRequestBody { + if o == nil { + return ArtifactQueryRequestBody{} + } + return o.RequestBody +} + +type Error struct { + Message string `json:"message"` +} + +func (o *Error) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type ResponseBody2 struct { + Error Error `json:"error"` +} + +func (o *ResponseBody2) GetError() Error { + if o == nil { + return Error{} + } + return o.Error +} + +type ResponseBody1 struct { + Size float64 `json:"size"` + TaskDurationMs float64 `json:"taskDurationMs"` + Tag *string `json:"tag,omitempty"` +} + +func (o *ResponseBody1) GetSize() float64 { + if o == nil { + return 0.0 + } + return o.Size +} + +func (o *ResponseBody1) GetTaskDurationMs() float64 { + if o == nil { + return 0.0 + } + return o.TaskDurationMs +} + +func (o *ResponseBody1) GetTag() *string { + if o == nil { + return nil + } + return o.Tag +} + +type ResponseBodyUnionType string + +const ( + ResponseBodyUnionTypeResponseBody1 ResponseBodyUnionType = "responseBody_1" + ResponseBodyUnionTypeResponseBody2 ResponseBodyUnionType = "responseBody_2" +) + +type ResponseBody struct { + ResponseBody1 *ResponseBody1 + ResponseBody2 *ResponseBody2 + + Type ResponseBodyUnionType +} + +func CreateResponseBodyResponseBody1(responseBody1 ResponseBody1) ResponseBody { + typ := ResponseBodyUnionTypeResponseBody1 + + return ResponseBody{ + ResponseBody1: &responseBody1, + Type: typ, + } +} + +func CreateResponseBodyResponseBody2(responseBody2 ResponseBody2) ResponseBody { + typ := ResponseBodyUnionTypeResponseBody2 + + return ResponseBody{ + ResponseBody2: &responseBody2, + Type: typ, + } +} + +func (u *ResponseBody) UnmarshalJSON(data []byte) error { + + var responseBody2 ResponseBody2 = ResponseBody2{} + if err := utils.UnmarshalJSON(data, &responseBody2, "", true, true); err == nil { + u.ResponseBody2 = &responseBody2 + u.Type = ResponseBodyUnionTypeResponseBody2 + return nil + } + + var responseBody1 ResponseBody1 = ResponseBody1{} + if err := utils.UnmarshalJSON(data, &responseBody1, "", true, true); err == nil { + u.ResponseBody1 = &responseBody1 + u.Type = ResponseBodyUnionTypeResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBody", string(data)) +} + +func (u ResponseBody) MarshalJSON() ([]byte, error) { + if u.ResponseBody1 != nil { + return utils.MarshalJSON(u.ResponseBody1, "", true) + } + + if u.ResponseBody2 != nil { + return utils.MarshalJSON(u.ResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBody: all fields are null") +} + +type ArtifactQueryResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object map[string]ResponseBody +} + +func (o *ArtifactQueryResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ArtifactQueryResponse) GetObject() map[string]ResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/assignalias.go b/src/__tests__/mockserver/internal/sdk/models/operations/assignalias.go new file mode 100644 index 00000000..82664c48 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/assignalias.go @@ -0,0 +1,139 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "time" +) + +type AssignAliasRequestBody struct { + // The alias we want to assign to the deployment defined in the URL + Alias *string `json:"alias,omitempty"` + // The redirect property will take precedence over the deployment id from the URL and consists of a hostname (like test.com) to which the alias should redirect using status code 307 + Redirect *string `json:"redirect,omitempty"` +} + +func (o *AssignAliasRequestBody) GetAlias() *string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *AssignAliasRequestBody) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +type AssignAliasRequest struct { + // The ID of the deployment the aliases should be listed for + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody AssignAliasRequestBody `request:"mediaType=application/json"` +} + +func (o *AssignAliasRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *AssignAliasRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *AssignAliasRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *AssignAliasRequest) GetRequestBody() AssignAliasRequestBody { + if o == nil { + return AssignAliasRequestBody{} + } + return o.RequestBody +} + +// AssignAliasResponseBody - The alias was successfully assigned to the deployment +type AssignAliasResponseBody struct { + // The unique identifier of the alias + UID string `json:"uid"` + // The assigned alias name + Alias string `json:"alias"` + // The date when the alias was created + Created time.Time `json:"created"` + // The unique identifier of the previously aliased deployment, only received when the alias was used before + OldDeploymentID *string `json:"oldDeploymentId,omitempty"` +} + +func (a AssignAliasResponseBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AssignAliasResponseBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *AssignAliasResponseBody) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *AssignAliasResponseBody) GetAlias() string { + if o == nil { + return "" + } + return o.Alias +} + +func (o *AssignAliasResponseBody) GetCreated() time.Time { + if o == nil { + return time.Time{} + } + return o.Created +} + +func (o *AssignAliasResponseBody) GetOldDeploymentID() *string { + if o == nil { + return nil + } + return o.OldDeploymentID +} + +type AssignAliasResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The alias was successfully assigned to the deployment + Object *AssignAliasResponseBody +} + +func (o *AssignAliasResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AssignAliasResponse) GetObject() *AssignAliasResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/buydomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/buydomain.go new file mode 100644 index 00000000..22c13045 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/buydomain.go @@ -0,0 +1,291 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type BuyDomainRequestBody struct { + // The domain name to purchase. + Name string `json:"name"` + // The price you expect to be charged for the purchase. + ExpectedPrice *float64 `json:"expectedPrice,omitempty"` + // Indicates whether the domain should be automatically renewed. + Renew *bool `json:"renew,omitempty"` + // The country of the domain registrant + Country string `json:"country"` + // The company name of the domain registrant + OrgName *string `json:"orgName,omitempty"` + // The first name of the domain registrant + FirstName string `json:"firstName"` + // The last name of the domain registrant + LastName string `json:"lastName"` + // The street address of the domain registrant + Address1 string `json:"address1"` + // The city of the domain registrant + City string `json:"city"` + // The state of the domain registrant + State string `json:"state"` + // The postal code of the domain registrant + PostalCode string `json:"postalCode"` + // The phone number of the domain registrant + Phone string `json:"phone"` + // The email of the domain registrant + Email string `json:"email"` +} + +func (o *BuyDomainRequestBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *BuyDomainRequestBody) GetExpectedPrice() *float64 { + if o == nil { + return nil + } + return o.ExpectedPrice +} + +func (o *BuyDomainRequestBody) GetRenew() *bool { + if o == nil { + return nil + } + return o.Renew +} + +func (o *BuyDomainRequestBody) GetCountry() string { + if o == nil { + return "" + } + return o.Country +} + +func (o *BuyDomainRequestBody) GetOrgName() *string { + if o == nil { + return nil + } + return o.OrgName +} + +func (o *BuyDomainRequestBody) GetFirstName() string { + if o == nil { + return "" + } + return o.FirstName +} + +func (o *BuyDomainRequestBody) GetLastName() string { + if o == nil { + return "" + } + return o.LastName +} + +func (o *BuyDomainRequestBody) GetAddress1() string { + if o == nil { + return "" + } + return o.Address1 +} + +func (o *BuyDomainRequestBody) GetCity() string { + if o == nil { + return "" + } + return o.City +} + +func (o *BuyDomainRequestBody) GetState() string { + if o == nil { + return "" + } + return o.State +} + +func (o *BuyDomainRequestBody) GetPostalCode() string { + if o == nil { + return "" + } + return o.PostalCode +} + +func (o *BuyDomainRequestBody) GetPhone() string { + if o == nil { + return "" + } + return o.Phone +} + +func (o *BuyDomainRequestBody) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +type BuyDomainRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody BuyDomainRequestBody `request:"mediaType=application/json"` +} + +func (o *BuyDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *BuyDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *BuyDomainRequest) GetRequestBody() BuyDomainRequestBody { + if o == nil { + return BuyDomainRequestBody{} + } + return o.RequestBody +} + +type BuyDomainDomain struct { + UID string `json:"uid"` + Ns []string `json:"ns"` + Verified bool `json:"verified"` + Created float64 `json:"created"` + Pending bool `json:"pending"` +} + +func (o *BuyDomainDomain) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *BuyDomainDomain) GetNs() []string { + if o == nil { + return []string{} + } + return o.Ns +} + +func (o *BuyDomainDomain) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *BuyDomainDomain) GetCreated() float64 { + if o == nil { + return 0.0 + } + return o.Created +} + +func (o *BuyDomainDomain) GetPending() bool { + if o == nil { + return false + } + return o.Pending +} + +type BuyDomainDomainsResponseBody struct { + Domain BuyDomainDomain `json:"domain"` +} + +func (o *BuyDomainDomainsResponseBody) GetDomain() BuyDomainDomain { + if o == nil { + return BuyDomainDomain{} + } + return o.Domain +} + +type BuyDomainDomainsDomain struct { + UID string `json:"uid"` + Ns []string `json:"ns"` + Verified bool `json:"verified"` + Created float64 `json:"created"` + Pending bool `json:"pending"` +} + +func (o *BuyDomainDomainsDomain) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *BuyDomainDomainsDomain) GetNs() []string { + if o == nil { + return []string{} + } + return o.Ns +} + +func (o *BuyDomainDomainsDomain) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *BuyDomainDomainsDomain) GetCreated() float64 { + if o == nil { + return 0.0 + } + return o.Created +} + +func (o *BuyDomainDomainsDomain) GetPending() bool { + if o == nil { + return false + } + return o.Pending +} + +type BuyDomainResponseBody struct { + Domain BuyDomainDomainsDomain `json:"domain"` +} + +func (o *BuyDomainResponseBody) GetDomain() BuyDomainDomainsDomain { + if o == nil { + return BuyDomainDomainsDomain{} + } + return o.Domain +} + +type BuyDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + TwoHundredAndOneApplicationJSONObject *BuyDomainResponseBody + TwoHundredAndTwoApplicationJSONObject *BuyDomainDomainsResponseBody +} + +func (o *BuyDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *BuyDomainResponse) GetTwoHundredAndOneApplicationJSONObject() *BuyDomainResponseBody { + if o == nil { + return nil + } + return o.TwoHundredAndOneApplicationJSONObject +} + +func (o *BuyDomainResponse) GetTwoHundredAndTwoApplicationJSONObject() *BuyDomainDomainsResponseBody { + if o == nil { + return nil + } + return o.TwoHundredAndTwoApplicationJSONObject +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/canceldeployment.go b/src/__tests__/mockserver/internal/sdk/models/operations/canceldeployment.go new file mode 100644 index 00000000..44cae15f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/canceldeployment.go @@ -0,0 +1,4530 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type CancelDeploymentRequest struct { + // The unique identifier of the deployment. + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *CancelDeploymentRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CancelDeploymentRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CancelDeploymentRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type CancelDeploymentAliasAssignedAtType string + +const ( + CancelDeploymentAliasAssignedAtTypeNumber CancelDeploymentAliasAssignedAtType = "number" + CancelDeploymentAliasAssignedAtTypeBoolean CancelDeploymentAliasAssignedAtType = "boolean" +) + +type CancelDeploymentAliasAssignedAt struct { + Number *float64 + Boolean *bool + + Type CancelDeploymentAliasAssignedAtType +} + +func CreateCancelDeploymentAliasAssignedAtNumber(number float64) CancelDeploymentAliasAssignedAt { + typ := CancelDeploymentAliasAssignedAtTypeNumber + + return CancelDeploymentAliasAssignedAt{ + Number: &number, + Type: typ, + } +} + +func CreateCancelDeploymentAliasAssignedAtBoolean(boolean bool) CancelDeploymentAliasAssignedAt { + typ := CancelDeploymentAliasAssignedAtTypeBoolean + + return CancelDeploymentAliasAssignedAt{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *CancelDeploymentAliasAssignedAt) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = CancelDeploymentAliasAssignedAtTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = CancelDeploymentAliasAssignedAtTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentAliasAssignedAt", string(data)) +} + +func (u CancelDeploymentAliasAssignedAt) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentAliasAssignedAt: all fields are null") +} + +type CancelDeploymentBuild struct { + Env []string `json:"env"` +} + +func (o *CancelDeploymentBuild) GetEnv() []string { + if o == nil { + return []string{} + } + return o.Env +} + +type CancelDeploymentBuilds struct { +} + +type CancelDeploymentFramework string + +const ( + CancelDeploymentFrameworkBlitzjs CancelDeploymentFramework = "blitzjs" + CancelDeploymentFrameworkNextjs CancelDeploymentFramework = "nextjs" + CancelDeploymentFrameworkGatsby CancelDeploymentFramework = "gatsby" + CancelDeploymentFrameworkRemix CancelDeploymentFramework = "remix" + CancelDeploymentFrameworkAstro CancelDeploymentFramework = "astro" + CancelDeploymentFrameworkHexo CancelDeploymentFramework = "hexo" + CancelDeploymentFrameworkEleventy CancelDeploymentFramework = "eleventy" + CancelDeploymentFrameworkDocusaurus2 CancelDeploymentFramework = "docusaurus-2" + CancelDeploymentFrameworkDocusaurus CancelDeploymentFramework = "docusaurus" + CancelDeploymentFrameworkPreact CancelDeploymentFramework = "preact" + CancelDeploymentFrameworkSolidstart1 CancelDeploymentFramework = "solidstart-1" + CancelDeploymentFrameworkSolidstart CancelDeploymentFramework = "solidstart" + CancelDeploymentFrameworkDojo CancelDeploymentFramework = "dojo" + CancelDeploymentFrameworkEmber CancelDeploymentFramework = "ember" + CancelDeploymentFrameworkVue CancelDeploymentFramework = "vue" + CancelDeploymentFrameworkScully CancelDeploymentFramework = "scully" + CancelDeploymentFrameworkIonicAngular CancelDeploymentFramework = "ionic-angular" + CancelDeploymentFrameworkAngular CancelDeploymentFramework = "angular" + CancelDeploymentFrameworkPolymer CancelDeploymentFramework = "polymer" + CancelDeploymentFrameworkSvelte CancelDeploymentFramework = "svelte" + CancelDeploymentFrameworkSveltekit CancelDeploymentFramework = "sveltekit" + CancelDeploymentFrameworkSveltekit1 CancelDeploymentFramework = "sveltekit-1" + CancelDeploymentFrameworkIonicReact CancelDeploymentFramework = "ionic-react" + CancelDeploymentFrameworkCreateReactApp CancelDeploymentFramework = "create-react-app" + CancelDeploymentFrameworkGridsome CancelDeploymentFramework = "gridsome" + CancelDeploymentFrameworkUmijs CancelDeploymentFramework = "umijs" + CancelDeploymentFrameworkSapper CancelDeploymentFramework = "sapper" + CancelDeploymentFrameworkSaber CancelDeploymentFramework = "saber" + CancelDeploymentFrameworkStencil CancelDeploymentFramework = "stencil" + CancelDeploymentFrameworkNuxtjs CancelDeploymentFramework = "nuxtjs" + CancelDeploymentFrameworkRedwoodjs CancelDeploymentFramework = "redwoodjs" + CancelDeploymentFrameworkHugo CancelDeploymentFramework = "hugo" + CancelDeploymentFrameworkJekyll CancelDeploymentFramework = "jekyll" + CancelDeploymentFrameworkBrunch CancelDeploymentFramework = "brunch" + CancelDeploymentFrameworkMiddleman CancelDeploymentFramework = "middleman" + CancelDeploymentFrameworkZola CancelDeploymentFramework = "zola" + CancelDeploymentFrameworkHydrogen CancelDeploymentFramework = "hydrogen" + CancelDeploymentFrameworkVite CancelDeploymentFramework = "vite" + CancelDeploymentFrameworkVitepress CancelDeploymentFramework = "vitepress" + CancelDeploymentFrameworkVuepress CancelDeploymentFramework = "vuepress" + CancelDeploymentFrameworkParcel CancelDeploymentFramework = "parcel" + CancelDeploymentFrameworkFasthtml CancelDeploymentFramework = "fasthtml" + CancelDeploymentFrameworkSanityV3 CancelDeploymentFramework = "sanity-v3" + CancelDeploymentFrameworkSanity CancelDeploymentFramework = "sanity" + CancelDeploymentFrameworkStorybook CancelDeploymentFramework = "storybook" +) + +func (e CancelDeploymentFramework) ToPointer() *CancelDeploymentFramework { + return &e +} +func (e *CancelDeploymentFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = CancelDeploymentFramework(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentFramework: %v", v) + } +} + +type CancelDeploymentSpeedInsights struct { + ID string `json:"id"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` + PaidAt *float64 `json:"paidAt,omitempty"` +} + +func (o *CancelDeploymentSpeedInsights) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CancelDeploymentSpeedInsights) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *CancelDeploymentSpeedInsights) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *CancelDeploymentSpeedInsights) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CancelDeploymentSpeedInsights) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +func (o *CancelDeploymentSpeedInsights) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +type CancelDeploymentWebAnalytics struct { + ID string `json:"id"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` +} + +func (o *CancelDeploymentWebAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CancelDeploymentWebAnalytics) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *CancelDeploymentWebAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CancelDeploymentWebAnalytics) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *CancelDeploymentWebAnalytics) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +type CancelDeploymentProjectSettings struct { + BuildCommand *string `json:"buildCommand,omitempty"` + DevCommand *string `json:"devCommand,omitempty"` + Framework *CancelDeploymentFramework `json:"framework,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + InstallCommand *string `json:"installCommand,omitempty"` + OutputDirectory *string `json:"outputDirectory,omitempty"` + SpeedInsights *CancelDeploymentSpeedInsights `json:"speedInsights,omitempty"` + WebAnalytics *CancelDeploymentWebAnalytics `json:"webAnalytics,omitempty"` +} + +func (o *CancelDeploymentProjectSettings) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *CancelDeploymentProjectSettings) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *CancelDeploymentProjectSettings) GetFramework() *CancelDeploymentFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *CancelDeploymentProjectSettings) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *CancelDeploymentProjectSettings) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *CancelDeploymentProjectSettings) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *CancelDeploymentProjectSettings) GetSpeedInsights() *CancelDeploymentSpeedInsights { + if o == nil { + return nil + } + return o.SpeedInsights +} + +func (o *CancelDeploymentProjectSettings) GetWebAnalytics() *CancelDeploymentWebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +type CancelDeploymentDeploymentsStatus string + +const ( + CancelDeploymentDeploymentsStatusError CancelDeploymentDeploymentsStatus = "error" + CancelDeploymentDeploymentsStatusSkipped CancelDeploymentDeploymentsStatus = "skipped" + CancelDeploymentDeploymentsStatusPending CancelDeploymentDeploymentsStatus = "pending" + CancelDeploymentDeploymentsStatusReady CancelDeploymentDeploymentsStatus = "ready" + CancelDeploymentDeploymentsStatusTimeout CancelDeploymentDeploymentsStatus = "timeout" +) + +func (e CancelDeploymentDeploymentsStatus) ToPointer() *CancelDeploymentDeploymentsStatus { + return &e +} +func (e *CancelDeploymentDeploymentsStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "error": + fallthrough + case "skipped": + fallthrough + case "pending": + fallthrough + case "ready": + fallthrough + case "timeout": + *e = CancelDeploymentDeploymentsStatus(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentDeploymentsStatus: %v", v) + } +} + +type CancelDeploymentIntegrations struct { + Status CancelDeploymentDeploymentsStatus `json:"status"` + StartedAt float64 `json:"startedAt"` + CompletedAt *float64 `json:"completedAt,omitempty"` + SkippedAt *float64 `json:"skippedAt,omitempty"` + SkippedBy *string `json:"skippedBy,omitempty"` +} + +func (o *CancelDeploymentIntegrations) GetStatus() CancelDeploymentDeploymentsStatus { + if o == nil { + return CancelDeploymentDeploymentsStatus("") + } + return o.Status +} + +func (o *CancelDeploymentIntegrations) GetStartedAt() float64 { + if o == nil { + return 0.0 + } + return o.StartedAt +} + +func (o *CancelDeploymentIntegrations) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *CancelDeploymentIntegrations) GetSkippedAt() *float64 { + if o == nil { + return nil + } + return o.SkippedAt +} + +func (o *CancelDeploymentIntegrations) GetSkippedBy() *string { + if o == nil { + return nil + } + return o.SkippedBy +} + +// CancelDeploymentProtocol - Must be `http` or `https`. +type CancelDeploymentProtocol string + +const ( + CancelDeploymentProtocolHTTP CancelDeploymentProtocol = "http" + CancelDeploymentProtocolHTTPS CancelDeploymentProtocol = "https" +) + +func (e CancelDeploymentProtocol) ToPointer() *CancelDeploymentProtocol { + return &e +} +func (e *CancelDeploymentProtocol) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "http": + fallthrough + case "https": + *e = CancelDeploymentProtocol(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentProtocol: %v", v) + } +} + +type CancelDeploymentRemotePatterns struct { + // Must be `http` or `https`. + Protocol *CancelDeploymentProtocol `json:"protocol,omitempty"` + // Can be literal or wildcard. Single `*` matches a single subdomain. Double `**` matches any number of subdomains. + Hostname string `json:"hostname"` + // Can be literal port such as `8080` or empty string meaning no port. + Port *string `json:"port,omitempty"` + // Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments. + Pathname *string `json:"pathname,omitempty"` + // Can be literal query string such as `?v=1` or empty string meaning no query string. + Search *string `json:"search,omitempty"` +} + +func (o *CancelDeploymentRemotePatterns) GetProtocol() *CancelDeploymentProtocol { + if o == nil { + return nil + } + return o.Protocol +} + +func (o *CancelDeploymentRemotePatterns) GetHostname() string { + if o == nil { + return "" + } + return o.Hostname +} + +func (o *CancelDeploymentRemotePatterns) GetPort() *string { + if o == nil { + return nil + } + return o.Port +} + +func (o *CancelDeploymentRemotePatterns) GetPathname() *string { + if o == nil { + return nil + } + return o.Pathname +} + +func (o *CancelDeploymentRemotePatterns) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +type CancelDeploymentLocalPatterns struct { + // Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments. + Pathname *string `json:"pathname,omitempty"` + // Can be literal query string such as `?v=1` or empty string meaning no query string. + Search *string `json:"search,omitempty"` +} + +func (o *CancelDeploymentLocalPatterns) GetPathname() *string { + if o == nil { + return nil + } + return o.Pathname +} + +func (o *CancelDeploymentLocalPatterns) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +type CancelDeploymentFormats string + +const ( + CancelDeploymentFormatsImageAvif CancelDeploymentFormats = "image/avif" + CancelDeploymentFormatsImageWebp CancelDeploymentFormats = "image/webp" +) + +func (e CancelDeploymentFormats) ToPointer() *CancelDeploymentFormats { + return &e +} +func (e *CancelDeploymentFormats) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "image/avif": + fallthrough + case "image/webp": + *e = CancelDeploymentFormats(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentFormats: %v", v) + } +} + +type CancelDeploymentContentDispositionType string + +const ( + CancelDeploymentContentDispositionTypeInline CancelDeploymentContentDispositionType = "inline" + CancelDeploymentContentDispositionTypeAttachment CancelDeploymentContentDispositionType = "attachment" +) + +func (e CancelDeploymentContentDispositionType) ToPointer() *CancelDeploymentContentDispositionType { + return &e +} +func (e *CancelDeploymentContentDispositionType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "inline": + fallthrough + case "attachment": + *e = CancelDeploymentContentDispositionType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentContentDispositionType: %v", v) + } +} + +type CancelDeploymentImages struct { + Sizes []float64 `json:"sizes,omitempty"` + Qualities []float64 `json:"qualities,omitempty"` + Domains []string `json:"domains,omitempty"` + RemotePatterns []CancelDeploymentRemotePatterns `json:"remotePatterns,omitempty"` + LocalPatterns []CancelDeploymentLocalPatterns `json:"localPatterns,omitempty"` + MinimumCacheTTL *float64 `json:"minimumCacheTTL,omitempty"` + Formats []CancelDeploymentFormats `json:"formats,omitempty"` + DangerouslyAllowSVG *bool `json:"dangerouslyAllowSVG,omitempty"` + ContentSecurityPolicy *string `json:"contentSecurityPolicy,omitempty"` + ContentDispositionType *CancelDeploymentContentDispositionType `json:"contentDispositionType,omitempty"` +} + +func (o *CancelDeploymentImages) GetSizes() []float64 { + if o == nil { + return nil + } + return o.Sizes +} + +func (o *CancelDeploymentImages) GetQualities() []float64 { + if o == nil { + return nil + } + return o.Qualities +} + +func (o *CancelDeploymentImages) GetDomains() []string { + if o == nil { + return nil + } + return o.Domains +} + +func (o *CancelDeploymentImages) GetRemotePatterns() []CancelDeploymentRemotePatterns { + if o == nil { + return nil + } + return o.RemotePatterns +} + +func (o *CancelDeploymentImages) GetLocalPatterns() []CancelDeploymentLocalPatterns { + if o == nil { + return nil + } + return o.LocalPatterns +} + +func (o *CancelDeploymentImages) GetMinimumCacheTTL() *float64 { + if o == nil { + return nil + } + return o.MinimumCacheTTL +} + +func (o *CancelDeploymentImages) GetFormats() []CancelDeploymentFormats { + if o == nil { + return nil + } + return o.Formats +} + +func (o *CancelDeploymentImages) GetDangerouslyAllowSVG() *bool { + if o == nil { + return nil + } + return o.DangerouslyAllowSVG +} + +func (o *CancelDeploymentImages) GetContentSecurityPolicy() *string { + if o == nil { + return nil + } + return o.ContentSecurityPolicy +} + +func (o *CancelDeploymentImages) GetContentDispositionType() *CancelDeploymentContentDispositionType { + if o == nil { + return nil + } + return o.ContentDispositionType +} + +type CancelDeploymentCreator struct { + UID string `json:"uid"` + Username *string `json:"username,omitempty"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *CancelDeploymentCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *CancelDeploymentCreator) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +func (o *CancelDeploymentCreator) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +type CancelDeploymentDeploymentsReadyState string + +const ( + CancelDeploymentDeploymentsReadyStateBuilding CancelDeploymentDeploymentsReadyState = "BUILDING" + CancelDeploymentDeploymentsReadyStateError CancelDeploymentDeploymentsReadyState = "ERROR" + CancelDeploymentDeploymentsReadyStateInitializing CancelDeploymentDeploymentsReadyState = "INITIALIZING" + CancelDeploymentDeploymentsReadyStateReady CancelDeploymentDeploymentsReadyState = "READY" +) + +func (e CancelDeploymentDeploymentsReadyState) ToPointer() *CancelDeploymentDeploymentsReadyState { + return &e +} +func (e *CancelDeploymentDeploymentsReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + *e = CancelDeploymentDeploymentsReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentDeploymentsReadyState: %v", v) + } +} + +type CancelDeploymentOutput struct { + Path string `json:"path"` + FunctionName string `json:"functionName"` +} + +func (o *CancelDeploymentOutput) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *CancelDeploymentOutput) GetFunctionName() string { + if o == nil { + return "" + } + return o.FunctionName +} + +// CancelDeploymentLambdas - A partial representation of a Build used by the deployment endpoint. +type CancelDeploymentLambdas struct { + ID *string `json:"id,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + Entrypoint *string `json:"entrypoint,omitempty"` + ReadyState *CancelDeploymentDeploymentsReadyState `json:"readyState,omitempty"` + ReadyStateAt *float64 `json:"readyStateAt,omitempty"` + Output []CancelDeploymentOutput `json:"output"` +} + +func (o *CancelDeploymentLambdas) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *CancelDeploymentLambdas) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CancelDeploymentLambdas) GetEntrypoint() *string { + if o == nil { + return nil + } + return o.Entrypoint +} + +func (o *CancelDeploymentLambdas) GetReadyState() *CancelDeploymentDeploymentsReadyState { + if o == nil { + return nil + } + return o.ReadyState +} + +func (o *CancelDeploymentLambdas) GetReadyStateAt() *float64 { + if o == nil { + return nil + } + return o.ReadyStateAt +} + +func (o *CancelDeploymentLambdas) GetOutput() []CancelDeploymentOutput { + if o == nil { + return []CancelDeploymentOutput{} + } + return o.Output +} + +type CancelDeploymentStatus string + +const ( + CancelDeploymentStatusBuilding CancelDeploymentStatus = "BUILDING" + CancelDeploymentStatusError CancelDeploymentStatus = "ERROR" + CancelDeploymentStatusInitializing CancelDeploymentStatus = "INITIALIZING" + CancelDeploymentStatusQueued CancelDeploymentStatus = "QUEUED" + CancelDeploymentStatusReady CancelDeploymentStatus = "READY" + CancelDeploymentStatusCanceled CancelDeploymentStatus = "CANCELED" +) + +func (e CancelDeploymentStatus) ToPointer() *CancelDeploymentStatus { + return &e +} +func (e *CancelDeploymentStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = CancelDeploymentStatus(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentStatus: %v", v) + } +} + +type CancelDeploymentTeam struct { + ID string `json:"id"` + Name string `json:"name"` + Avatar *string `json:"avatar,omitempty"` + Slug string `json:"slug"` +} + +func (o *CancelDeploymentTeam) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CancelDeploymentTeam) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CancelDeploymentTeam) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +func (o *CancelDeploymentTeam) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +type CancelDeploymentCustomEnvironment2 struct { + ID string `json:"id"` +} + +func (o *CancelDeploymentCustomEnvironment2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type CancelDeploymentCustomEnvironment1 struct { +} + +type CancelDeploymentCustomEnvironmentType string + +const ( + CancelDeploymentCustomEnvironmentTypeCancelDeploymentCustomEnvironment1 CancelDeploymentCustomEnvironmentType = "cancelDeployment_customEnvironment_1" + CancelDeploymentCustomEnvironmentTypeCancelDeploymentCustomEnvironment2 CancelDeploymentCustomEnvironmentType = "cancelDeployment_customEnvironment_2" +) + +type CancelDeploymentCustomEnvironment struct { + CancelDeploymentCustomEnvironment1 *CancelDeploymentCustomEnvironment1 + CancelDeploymentCustomEnvironment2 *CancelDeploymentCustomEnvironment2 + + Type CancelDeploymentCustomEnvironmentType +} + +func CreateCancelDeploymentCustomEnvironmentCancelDeploymentCustomEnvironment1(cancelDeploymentCustomEnvironment1 CancelDeploymentCustomEnvironment1) CancelDeploymentCustomEnvironment { + typ := CancelDeploymentCustomEnvironmentTypeCancelDeploymentCustomEnvironment1 + + return CancelDeploymentCustomEnvironment{ + CancelDeploymentCustomEnvironment1: &cancelDeploymentCustomEnvironment1, + Type: typ, + } +} + +func CreateCancelDeploymentCustomEnvironmentCancelDeploymentCustomEnvironment2(cancelDeploymentCustomEnvironment2 CancelDeploymentCustomEnvironment2) CancelDeploymentCustomEnvironment { + typ := CancelDeploymentCustomEnvironmentTypeCancelDeploymentCustomEnvironment2 + + return CancelDeploymentCustomEnvironment{ + CancelDeploymentCustomEnvironment2: &cancelDeploymentCustomEnvironment2, + Type: typ, + } +} + +func (u *CancelDeploymentCustomEnvironment) UnmarshalJSON(data []byte) error { + + var cancelDeploymentCustomEnvironment1 CancelDeploymentCustomEnvironment1 = CancelDeploymentCustomEnvironment1{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentCustomEnvironment1, "", true, true); err == nil { + u.CancelDeploymentCustomEnvironment1 = &cancelDeploymentCustomEnvironment1 + u.Type = CancelDeploymentCustomEnvironmentTypeCancelDeploymentCustomEnvironment1 + return nil + } + + var cancelDeploymentCustomEnvironment2 CancelDeploymentCustomEnvironment2 = CancelDeploymentCustomEnvironment2{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentCustomEnvironment2, "", true, true); err == nil { + u.CancelDeploymentCustomEnvironment2 = &cancelDeploymentCustomEnvironment2 + u.Type = CancelDeploymentCustomEnvironmentTypeCancelDeploymentCustomEnvironment2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentCustomEnvironment", string(data)) +} + +func (u CancelDeploymentCustomEnvironment) MarshalJSON() ([]byte, error) { + if u.CancelDeploymentCustomEnvironment1 != nil { + return utils.MarshalJSON(u.CancelDeploymentCustomEnvironment1, "", true) + } + + if u.CancelDeploymentCustomEnvironment2 != nil { + return utils.MarshalJSON(u.CancelDeploymentCustomEnvironment2, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentCustomEnvironment: all fields are null") +} + +type CancelDeploymentAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *CancelDeploymentAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *CancelDeploymentAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type CancelDeploymentAliasWarning struct { + Code string `json:"code"` + Message string `json:"message"` + Link *string `json:"link,omitempty"` + Action *string `json:"action,omitempty"` +} + +func (o *CancelDeploymentAliasWarning) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *CancelDeploymentAliasWarning) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +func (o *CancelDeploymentAliasWarning) GetLink() *string { + if o == nil { + return nil + } + return o.Link +} + +func (o *CancelDeploymentAliasWarning) GetAction() *string { + if o == nil { + return nil + } + return o.Action +} + +type CancelDeploymentChecksState string + +const ( + CancelDeploymentChecksStateRegistered CancelDeploymentChecksState = "registered" + CancelDeploymentChecksStateRunning CancelDeploymentChecksState = "running" + CancelDeploymentChecksStateCompleted CancelDeploymentChecksState = "completed" +) + +func (e CancelDeploymentChecksState) ToPointer() *CancelDeploymentChecksState { + return &e +} +func (e *CancelDeploymentChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = CancelDeploymentChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentChecksState: %v", v) + } +} + +type CancelDeploymentChecksConclusion string + +const ( + CancelDeploymentChecksConclusionSkipped CancelDeploymentChecksConclusion = "skipped" + CancelDeploymentChecksConclusionSucceeded CancelDeploymentChecksConclusion = "succeeded" + CancelDeploymentChecksConclusionFailed CancelDeploymentChecksConclusion = "failed" + CancelDeploymentChecksConclusionCanceled CancelDeploymentChecksConclusion = "canceled" +) + +func (e CancelDeploymentChecksConclusion) ToPointer() *CancelDeploymentChecksConclusion { + return &e +} +func (e *CancelDeploymentChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "skipped": + fallthrough + case "succeeded": + fallthrough + case "failed": + fallthrough + case "canceled": + *e = CancelDeploymentChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentChecksConclusion: %v", v) + } +} + +type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type string + +const ( + CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9TypeBitbucket CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type = "bitbucket" +) + +func (e CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type) ToPointer() *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type { + return &e +} +func (e *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type: %v", v) + } +} + +type GitSource9 struct { + Type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + Owner *string `json:"owner,omitempty"` + Slug *string `json:"slug,omitempty"` + WorkspaceUUID string `json:"workspaceUuid"` + RepoUUID string `json:"repoUuid"` +} + +func (o *GitSource9) GetType() CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type { + if o == nil { + return CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type("") + } + return o.Type +} + +func (o *GitSource9) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GitSource9) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GitSource9) GetOwner() *string { + if o == nil { + return nil + } + return o.Owner +} + +func (o *GitSource9) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GitSource9) GetWorkspaceUUID() string { + if o == nil { + return "" + } + return o.WorkspaceUUID +} + +func (o *GitSource9) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type string + +const ( + CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8TypeGitlab CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type = "gitlab" +) + +func (e CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type) ToPointer() *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type { + return &e +} +func (e *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type: %v", v) + } +} + +type GitSource8 struct { + Type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + ProjectID float64 `json:"projectId"` +} + +func (o *GitSource8) GetType() CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type { + if o == nil { + return CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type("") + } + return o.Type +} + +func (o *GitSource8) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GitSource8) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GitSource8) GetProjectID() float64 { + if o == nil { + return 0.0 + } + return o.ProjectID +} + +type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type string + +const ( + CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7TypeGithub CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type = "github" +) + +func (e CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type) ToPointer() *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type { + return &e +} +func (e *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type: %v", v) + } +} + +type GitSource7 struct { + Type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + RepoID float64 `json:"repoId"` + Org *string `json:"org,omitempty"` + Repo *string `json:"repo,omitempty"` +} + +func (o *GitSource7) GetType() CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type { + if o == nil { + return CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type("") + } + return o.Type +} + +func (o *GitSource7) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GitSource7) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GitSource7) GetRepoID() float64 { + if o == nil { + return 0.0 + } + return o.RepoID +} + +func (o *GitSource7) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} + +func (o *GitSource7) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType string + +const ( + CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyTypeCustom CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType = "custom" +) + +func (e CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType) ToPointer() *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "custom": + *e = CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +// GitSource6 - Allows custom git sources (local folder mounted to the container) in test mode +type GitSource6 struct { + Type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + GitURL string `json:"gitUrl"` +} + +func (o *GitSource6) GetType() CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *GitSource6) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GitSource6) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GitSource6) GetGitURL() string { + if o == nil { + return "" + } + return o.GitURL +} + +type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType string + +const ( + CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONTypeBitbucket CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType = "bitbucket" +) + +func (e CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType) ToPointer() *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType { + return &e +} +func (e *CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType: %v", v) + } +} + +type CancelDeploymentGitSource5 struct { + Type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType `json:"type"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *CancelDeploymentGitSource5) GetType() CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType { + if o == nil { + return CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *CancelDeploymentGitSource5) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *CancelDeploymentGitSource5) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *CancelDeploymentGitSource5) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *CancelDeploymentGitSource5) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *CancelDeploymentGitSource5) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CancelDeploymentGitSourceDeploymentsResponse200Type string + +const ( + CancelDeploymentGitSourceDeploymentsResponse200TypeBitbucket CancelDeploymentGitSourceDeploymentsResponse200Type = "bitbucket" +) + +func (e CancelDeploymentGitSourceDeploymentsResponse200Type) ToPointer() *CancelDeploymentGitSourceDeploymentsResponse200Type { + return &e +} +func (e *CancelDeploymentGitSourceDeploymentsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CancelDeploymentGitSourceDeploymentsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceDeploymentsResponse200Type: %v", v) + } +} + +type CancelDeploymentGitSource4 struct { + Type CancelDeploymentGitSourceDeploymentsResponse200Type `json:"type"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` + RepoUUID string `json:"repoUuid"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *CancelDeploymentGitSource4) GetType() CancelDeploymentGitSourceDeploymentsResponse200Type { + if o == nil { + return CancelDeploymentGitSourceDeploymentsResponse200Type("") + } + return o.Type +} + +func (o *CancelDeploymentGitSource4) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +func (o *CancelDeploymentGitSource4) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +func (o *CancelDeploymentGitSource4) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *CancelDeploymentGitSource4) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *CancelDeploymentGitSource4) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CancelDeploymentGitSourceDeploymentsResponseType string + +const ( + CancelDeploymentGitSourceDeploymentsResponseTypeGitlab CancelDeploymentGitSourceDeploymentsResponseType = "gitlab" +) + +func (e CancelDeploymentGitSourceDeploymentsResponseType) ToPointer() *CancelDeploymentGitSourceDeploymentsResponseType { + return &e +} +func (e *CancelDeploymentGitSourceDeploymentsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = CancelDeploymentGitSourceDeploymentsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceDeploymentsResponseType: %v", v) + } +} + +type CancelDeploymentGitSourceProjectIDType string + +const ( + CancelDeploymentGitSourceProjectIDTypeStr CancelDeploymentGitSourceProjectIDType = "str" + CancelDeploymentGitSourceProjectIDTypeNumber CancelDeploymentGitSourceProjectIDType = "number" +) + +type CancelDeploymentGitSourceProjectID struct { + Str *string + Number *float64 + + Type CancelDeploymentGitSourceProjectIDType +} + +func CreateCancelDeploymentGitSourceProjectIDStr(str string) CancelDeploymentGitSourceProjectID { + typ := CancelDeploymentGitSourceProjectIDTypeStr + + return CancelDeploymentGitSourceProjectID{ + Str: &str, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceProjectIDNumber(number float64) CancelDeploymentGitSourceProjectID { + typ := CancelDeploymentGitSourceProjectIDTypeNumber + + return CancelDeploymentGitSourceProjectID{ + Number: &number, + Type: typ, + } +} + +func (u *CancelDeploymentGitSourceProjectID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = CancelDeploymentGitSourceProjectIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = CancelDeploymentGitSourceProjectIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentGitSourceProjectID", string(data)) +} + +func (u CancelDeploymentGitSourceProjectID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentGitSourceProjectID: all fields are null") +} + +type CancelDeploymentGitSource3 struct { + Type CancelDeploymentGitSourceDeploymentsResponseType `json:"type"` + ProjectID CancelDeploymentGitSourceProjectID `json:"projectId"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *CancelDeploymentGitSource3) GetType() CancelDeploymentGitSourceDeploymentsResponseType { + if o == nil { + return CancelDeploymentGitSourceDeploymentsResponseType("") + } + return o.Type +} + +func (o *CancelDeploymentGitSource3) GetProjectID() CancelDeploymentGitSourceProjectID { + if o == nil { + return CancelDeploymentGitSourceProjectID{} + } + return o.ProjectID +} + +func (o *CancelDeploymentGitSource3) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *CancelDeploymentGitSource3) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *CancelDeploymentGitSource3) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CancelDeploymentGitSourceDeploymentsType string + +const ( + CancelDeploymentGitSourceDeploymentsTypeGithub CancelDeploymentGitSourceDeploymentsType = "github" +) + +func (e CancelDeploymentGitSourceDeploymentsType) ToPointer() *CancelDeploymentGitSourceDeploymentsType { + return &e +} +func (e *CancelDeploymentGitSourceDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CancelDeploymentGitSourceDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceDeploymentsType: %v", v) + } +} + +type CancelDeploymentGitSource2 struct { + Type CancelDeploymentGitSourceDeploymentsType `json:"type"` + Org string `json:"org"` + Repo string `json:"repo"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *CancelDeploymentGitSource2) GetType() CancelDeploymentGitSourceDeploymentsType { + if o == nil { + return CancelDeploymentGitSourceDeploymentsType("") + } + return o.Type +} + +func (o *CancelDeploymentGitSource2) GetOrg() string { + if o == nil { + return "" + } + return o.Org +} + +func (o *CancelDeploymentGitSource2) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *CancelDeploymentGitSource2) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *CancelDeploymentGitSource2) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *CancelDeploymentGitSource2) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CancelDeploymentGitSourceType string + +const ( + CancelDeploymentGitSourceTypeGithub CancelDeploymentGitSourceType = "github" +) + +func (e CancelDeploymentGitSourceType) ToPointer() *CancelDeploymentGitSourceType { + return &e +} +func (e *CancelDeploymentGitSourceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CancelDeploymentGitSourceType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitSourceType: %v", v) + } +} + +type CancelDeploymentGitSourceRepoIDType string + +const ( + CancelDeploymentGitSourceRepoIDTypeStr CancelDeploymentGitSourceRepoIDType = "str" + CancelDeploymentGitSourceRepoIDTypeNumber CancelDeploymentGitSourceRepoIDType = "number" +) + +type CancelDeploymentGitSourceRepoID struct { + Str *string + Number *float64 + + Type CancelDeploymentGitSourceRepoIDType +} + +func CreateCancelDeploymentGitSourceRepoIDStr(str string) CancelDeploymentGitSourceRepoID { + typ := CancelDeploymentGitSourceRepoIDTypeStr + + return CancelDeploymentGitSourceRepoID{ + Str: &str, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceRepoIDNumber(number float64) CancelDeploymentGitSourceRepoID { + typ := CancelDeploymentGitSourceRepoIDTypeNumber + + return CancelDeploymentGitSourceRepoID{ + Number: &number, + Type: typ, + } +} + +func (u *CancelDeploymentGitSourceRepoID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = CancelDeploymentGitSourceRepoIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = CancelDeploymentGitSourceRepoIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentGitSourceRepoID", string(data)) +} + +func (u CancelDeploymentGitSourceRepoID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentGitSourceRepoID: all fields are null") +} + +type CancelDeploymentGitSource1 struct { + Type CancelDeploymentGitSourceType `json:"type"` + RepoID CancelDeploymentGitSourceRepoID `json:"repoId"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *CancelDeploymentGitSource1) GetType() CancelDeploymentGitSourceType { + if o == nil { + return CancelDeploymentGitSourceType("") + } + return o.Type +} + +func (o *CancelDeploymentGitSource1) GetRepoID() CancelDeploymentGitSourceRepoID { + if o == nil { + return CancelDeploymentGitSourceRepoID{} + } + return o.RepoID +} + +func (o *CancelDeploymentGitSource1) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *CancelDeploymentGitSource1) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *CancelDeploymentGitSource1) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CancelDeploymentGitSourceUnionType string + +const ( + CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource1 CancelDeploymentGitSourceUnionType = "cancelDeployment_gitSource_1" + CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource2 CancelDeploymentGitSourceUnionType = "cancelDeployment_gitSource_2" + CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource3 CancelDeploymentGitSourceUnionType = "cancelDeployment_gitSource_3" + CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource4 CancelDeploymentGitSourceUnionType = "cancelDeployment_gitSource_4" + CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource5 CancelDeploymentGitSourceUnionType = "cancelDeployment_gitSource_5" + CancelDeploymentGitSourceUnionTypeGitSource6 CancelDeploymentGitSourceUnionType = "gitSource_6" + CancelDeploymentGitSourceUnionTypeGitSource7 CancelDeploymentGitSourceUnionType = "gitSource_7" + CancelDeploymentGitSourceUnionTypeGitSource8 CancelDeploymentGitSourceUnionType = "gitSource_8" + CancelDeploymentGitSourceUnionTypeGitSource9 CancelDeploymentGitSourceUnionType = "gitSource_9" +) + +type CancelDeploymentGitSource struct { + CancelDeploymentGitSource1 *CancelDeploymentGitSource1 + CancelDeploymentGitSource2 *CancelDeploymentGitSource2 + CancelDeploymentGitSource3 *CancelDeploymentGitSource3 + CancelDeploymentGitSource4 *CancelDeploymentGitSource4 + CancelDeploymentGitSource5 *CancelDeploymentGitSource5 + GitSource6 *GitSource6 + GitSource7 *GitSource7 + GitSource8 *GitSource8 + GitSource9 *GitSource9 + + Type CancelDeploymentGitSourceUnionType +} + +func CreateCancelDeploymentGitSourceCancelDeploymentGitSource1(cancelDeploymentGitSource1 CancelDeploymentGitSource1) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource1 + + return CancelDeploymentGitSource{ + CancelDeploymentGitSource1: &cancelDeploymentGitSource1, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceCancelDeploymentGitSource2(cancelDeploymentGitSource2 CancelDeploymentGitSource2) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource2 + + return CancelDeploymentGitSource{ + CancelDeploymentGitSource2: &cancelDeploymentGitSource2, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceCancelDeploymentGitSource3(cancelDeploymentGitSource3 CancelDeploymentGitSource3) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource3 + + return CancelDeploymentGitSource{ + CancelDeploymentGitSource3: &cancelDeploymentGitSource3, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceCancelDeploymentGitSource4(cancelDeploymentGitSource4 CancelDeploymentGitSource4) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource4 + + return CancelDeploymentGitSource{ + CancelDeploymentGitSource4: &cancelDeploymentGitSource4, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceCancelDeploymentGitSource5(cancelDeploymentGitSource5 CancelDeploymentGitSource5) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource5 + + return CancelDeploymentGitSource{ + CancelDeploymentGitSource5: &cancelDeploymentGitSource5, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceGitSource6(gitSource6 GitSource6) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeGitSource6 + + return CancelDeploymentGitSource{ + GitSource6: &gitSource6, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceGitSource7(gitSource7 GitSource7) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeGitSource7 + + return CancelDeploymentGitSource{ + GitSource7: &gitSource7, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceGitSource8(gitSource8 GitSource8) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeGitSource8 + + return CancelDeploymentGitSource{ + GitSource8: &gitSource8, + Type: typ, + } +} + +func CreateCancelDeploymentGitSourceGitSource9(gitSource9 GitSource9) CancelDeploymentGitSource { + typ := CancelDeploymentGitSourceUnionTypeGitSource9 + + return CancelDeploymentGitSource{ + GitSource9: &gitSource9, + Type: typ, + } +} + +func (u *CancelDeploymentGitSource) UnmarshalJSON(data []byte) error { + + var gitSource6 GitSource6 = GitSource6{} + if err := utils.UnmarshalJSON(data, &gitSource6, "", true, true); err == nil { + u.GitSource6 = &gitSource6 + u.Type = CancelDeploymentGitSourceUnionTypeGitSource6 + return nil + } + + var gitSource8 GitSource8 = GitSource8{} + if err := utils.UnmarshalJSON(data, &gitSource8, "", true, true); err == nil { + u.GitSource8 = &gitSource8 + u.Type = CancelDeploymentGitSourceUnionTypeGitSource8 + return nil + } + + var cancelDeploymentGitSource1 CancelDeploymentGitSource1 = CancelDeploymentGitSource1{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentGitSource1, "", true, true); err == nil { + u.CancelDeploymentGitSource1 = &cancelDeploymentGitSource1 + u.Type = CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource1 + return nil + } + + var cancelDeploymentGitSource3 CancelDeploymentGitSource3 = CancelDeploymentGitSource3{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentGitSource3, "", true, true); err == nil { + u.CancelDeploymentGitSource3 = &cancelDeploymentGitSource3 + u.Type = CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource3 + return nil + } + + var cancelDeploymentGitSource2 CancelDeploymentGitSource2 = CancelDeploymentGitSource2{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentGitSource2, "", true, true); err == nil { + u.CancelDeploymentGitSource2 = &cancelDeploymentGitSource2 + u.Type = CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource2 + return nil + } + + var cancelDeploymentGitSource4 CancelDeploymentGitSource4 = CancelDeploymentGitSource4{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentGitSource4, "", true, true); err == nil { + u.CancelDeploymentGitSource4 = &cancelDeploymentGitSource4 + u.Type = CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource4 + return nil + } + + var cancelDeploymentGitSource5 CancelDeploymentGitSource5 = CancelDeploymentGitSource5{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentGitSource5, "", true, true); err == nil { + u.CancelDeploymentGitSource5 = &cancelDeploymentGitSource5 + u.Type = CancelDeploymentGitSourceUnionTypeCancelDeploymentGitSource5 + return nil + } + + var gitSource7 GitSource7 = GitSource7{} + if err := utils.UnmarshalJSON(data, &gitSource7, "", true, true); err == nil { + u.GitSource7 = &gitSource7 + u.Type = CancelDeploymentGitSourceUnionTypeGitSource7 + return nil + } + + var gitSource9 GitSource9 = GitSource9{} + if err := utils.UnmarshalJSON(data, &gitSource9, "", true, true); err == nil { + u.GitSource9 = &gitSource9 + u.Type = CancelDeploymentGitSourceUnionTypeGitSource9 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentGitSource", string(data)) +} + +func (u CancelDeploymentGitSource) MarshalJSON() ([]byte, error) { + if u.CancelDeploymentGitSource1 != nil { + return utils.MarshalJSON(u.CancelDeploymentGitSource1, "", true) + } + + if u.CancelDeploymentGitSource2 != nil { + return utils.MarshalJSON(u.CancelDeploymentGitSource2, "", true) + } + + if u.CancelDeploymentGitSource3 != nil { + return utils.MarshalJSON(u.CancelDeploymentGitSource3, "", true) + } + + if u.CancelDeploymentGitSource4 != nil { + return utils.MarshalJSON(u.CancelDeploymentGitSource4, "", true) + } + + if u.CancelDeploymentGitSource5 != nil { + return utils.MarshalJSON(u.CancelDeploymentGitSource5, "", true) + } + + if u.GitSource6 != nil { + return utils.MarshalJSON(u.GitSource6, "", true) + } + + if u.GitSource7 != nil { + return utils.MarshalJSON(u.GitSource7, "", true) + } + + if u.GitSource8 != nil { + return utils.MarshalJSON(u.GitSource8, "", true) + } + + if u.GitSource9 != nil { + return utils.MarshalJSON(u.GitSource9, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentGitSource: all fields are null") +} + +type CancelDeploymentProject struct { + ID string `json:"id"` + Name string `json:"name"` + Framework *string `json:"framework,omitempty"` +} + +func (o *CancelDeploymentProject) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CancelDeploymentProject) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CancelDeploymentProject) GetFramework() *string { + if o == nil { + return nil + } + return o.Framework +} + +type CancelDeploymentReadyState string + +const ( + CancelDeploymentReadyStateBuilding CancelDeploymentReadyState = "BUILDING" + CancelDeploymentReadyStateError CancelDeploymentReadyState = "ERROR" + CancelDeploymentReadyStateInitializing CancelDeploymentReadyState = "INITIALIZING" + CancelDeploymentReadyStateQueued CancelDeploymentReadyState = "QUEUED" + CancelDeploymentReadyStateReady CancelDeploymentReadyState = "READY" + CancelDeploymentReadyStateCanceled CancelDeploymentReadyState = "CANCELED" +) + +func (e CancelDeploymentReadyState) ToPointer() *CancelDeploymentReadyState { + return &e +} +func (e *CancelDeploymentReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = CancelDeploymentReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentReadyState: %v", v) + } +} + +// CancelDeploymentReadySubstate - Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic +type CancelDeploymentReadySubstate string + +const ( + CancelDeploymentReadySubstateStaged CancelDeploymentReadySubstate = "STAGED" + CancelDeploymentReadySubstatePromoted CancelDeploymentReadySubstate = "PROMOTED" +) + +func (e CancelDeploymentReadySubstate) ToPointer() *CancelDeploymentReadySubstate { + return &e +} +func (e *CancelDeploymentReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = CancelDeploymentReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentReadySubstate: %v", v) + } +} + +type CancelDeploymentSource string + +const ( + CancelDeploymentSourceAPITriggerGitDeploy CancelDeploymentSource = "api-trigger-git-deploy" + CancelDeploymentSourceCli CancelDeploymentSource = "cli" + CancelDeploymentSourceCloneRepo CancelDeploymentSource = "clone/repo" + CancelDeploymentSourceGit CancelDeploymentSource = "git" + CancelDeploymentSourceImport CancelDeploymentSource = "import" + CancelDeploymentSourceImportRepo CancelDeploymentSource = "import/repo" + CancelDeploymentSourceRedeploy CancelDeploymentSource = "redeploy" + CancelDeploymentSourceV0Web CancelDeploymentSource = "v0-web" +) + +func (e CancelDeploymentSource) ToPointer() *CancelDeploymentSource { + return &e +} +func (e *CancelDeploymentSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "api-trigger-git-deploy": + fallthrough + case "cli": + fallthrough + case "clone/repo": + fallthrough + case "git": + fallthrough + case "import": + fallthrough + case "import/repo": + fallthrough + case "redeploy": + fallthrough + case "v0-web": + *e = CancelDeploymentSource(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentSource: %v", v) + } +} + +type CancelDeploymentTarget string + +const ( + CancelDeploymentTargetProduction CancelDeploymentTarget = "production" + CancelDeploymentTargetStaging CancelDeploymentTarget = "staging" +) + +func (e CancelDeploymentTarget) ToPointer() *CancelDeploymentTarget { + return &e +} +func (e *CancelDeploymentTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "staging": + *e = CancelDeploymentTarget(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentTarget: %v", v) + } +} + +type CancelDeploymentType string + +const ( + CancelDeploymentTypeLambdas CancelDeploymentType = "LAMBDAS" +) + +func (e CancelDeploymentType) ToPointer() *CancelDeploymentType { + return &e +} +func (e *CancelDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = CancelDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentType: %v", v) + } +} + +type CancelDeploymentOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *CancelDeploymentOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *CancelDeploymentOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *CancelDeploymentOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *CancelDeploymentOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *CancelDeploymentOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *CancelDeploymentOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *CancelDeploymentOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *CancelDeploymentOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *CancelDeploymentOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type CancelDeploymentCrons struct { + Schedule string `json:"schedule"` + Path string `json:"path"` +} + +func (o *CancelDeploymentCrons) GetSchedule() string { + if o == nil { + return "" + } + return o.Schedule +} + +func (o *CancelDeploymentCrons) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +type CancelDeploymentFunctions struct { + Memory *float64 `json:"memory,omitempty"` + MaxDuration *float64 `json:"maxDuration,omitempty"` + Runtime *string `json:"runtime,omitempty"` + IncludeFiles *string `json:"includeFiles,omitempty"` + ExcludeFiles *string `json:"excludeFiles,omitempty"` +} + +func (o *CancelDeploymentFunctions) GetMemory() *float64 { + if o == nil { + return nil + } + return o.Memory +} + +func (o *CancelDeploymentFunctions) GetMaxDuration() *float64 { + if o == nil { + return nil + } + return o.MaxDuration +} + +func (o *CancelDeploymentFunctions) GetRuntime() *string { + if o == nil { + return nil + } + return o.Runtime +} + +func (o *CancelDeploymentFunctions) GetIncludeFiles() *string { + if o == nil { + return nil + } + return o.IncludeFiles +} + +func (o *CancelDeploymentFunctions) GetExcludeFiles() *string { + if o == nil { + return nil + } + return o.ExcludeFiles +} + +type CancelDeploymentPlan string + +const ( + CancelDeploymentPlanPro CancelDeploymentPlan = "pro" + CancelDeploymentPlanEnterprise CancelDeploymentPlan = "enterprise" + CancelDeploymentPlanHobby CancelDeploymentPlan = "hobby" +) + +func (e CancelDeploymentPlan) ToPointer() *CancelDeploymentPlan { + return &e +} +func (e *CancelDeploymentPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = CancelDeploymentPlan(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentPlan: %v", v) + } +} + +type CancelDeploymentRoutes3 struct { + Src string `json:"src"` + Continue bool `json:"continue"` + Middleware float64 `json:"middleware"` +} + +func (o *CancelDeploymentRoutes3) GetSrc() string { + if o == nil { + return "" + } + return o.Src +} + +func (o *CancelDeploymentRoutes3) GetContinue() bool { + if o == nil { + return false + } + return o.Continue +} + +func (o *CancelDeploymentRoutes3) GetMiddleware() float64 { + if o == nil { + return 0.0 + } + return o.Middleware +} + +type CancelDeploymentRoutesHandle string + +const ( + CancelDeploymentRoutesHandleError CancelDeploymentRoutesHandle = "error" + CancelDeploymentRoutesHandleFilesystem CancelDeploymentRoutesHandle = "filesystem" + CancelDeploymentRoutesHandleHit CancelDeploymentRoutesHandle = "hit" + CancelDeploymentRoutesHandleMiss CancelDeploymentRoutesHandle = "miss" + CancelDeploymentRoutesHandleRewrite CancelDeploymentRoutesHandle = "rewrite" + CancelDeploymentRoutesHandleResource CancelDeploymentRoutesHandle = "resource" +) + +func (e CancelDeploymentRoutesHandle) ToPointer() *CancelDeploymentRoutesHandle { + return &e +} +func (e *CancelDeploymentRoutesHandle) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "error": + fallthrough + case "filesystem": + fallthrough + case "hit": + fallthrough + case "miss": + fallthrough + case "rewrite": + fallthrough + case "resource": + *e = CancelDeploymentRoutesHandle(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentRoutesHandle: %v", v) + } +} + +type CancelDeploymentRoutes2 struct { + Handle CancelDeploymentRoutesHandle `json:"handle"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` + Status *float64 `json:"status,omitempty"` +} + +func (o *CancelDeploymentRoutes2) GetHandle() CancelDeploymentRoutesHandle { + if o == nil { + return CancelDeploymentRoutesHandle("") + } + return o.Handle +} + +func (o *CancelDeploymentRoutes2) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *CancelDeploymentRoutes2) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *CancelDeploymentRoutes2) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +type CancelDeploymentHasDeploymentsType string + +const ( + CancelDeploymentHasDeploymentsTypeHeader CancelDeploymentHasDeploymentsType = "header" + CancelDeploymentHasDeploymentsTypeCookie CancelDeploymentHasDeploymentsType = "cookie" + CancelDeploymentHasDeploymentsTypeQuery CancelDeploymentHasDeploymentsType = "query" +) + +func (e CancelDeploymentHasDeploymentsType) ToPointer() *CancelDeploymentHasDeploymentsType { + return &e +} +func (e *CancelDeploymentHasDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + *e = CancelDeploymentHasDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentHasDeploymentsType: %v", v) + } +} + +type CancelDeploymentHas2 struct { + Type CancelDeploymentHasDeploymentsType `json:"type"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +func (o *CancelDeploymentHas2) GetType() CancelDeploymentHasDeploymentsType { + if o == nil { + return CancelDeploymentHasDeploymentsType("") + } + return o.Type +} + +func (o *CancelDeploymentHas2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *CancelDeploymentHas2) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type CancelDeploymentHasType string + +const ( + CancelDeploymentHasTypeHost CancelDeploymentHasType = "host" +) + +func (e CancelDeploymentHasType) ToPointer() *CancelDeploymentHasType { + return &e +} +func (e *CancelDeploymentHasType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + *e = CancelDeploymentHasType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentHasType: %v", v) + } +} + +type CancelDeploymentHas1 struct { + Type CancelDeploymentHasType `json:"type"` + Value string `json:"value"` +} + +func (o *CancelDeploymentHas1) GetType() CancelDeploymentHasType { + if o == nil { + return CancelDeploymentHasType("") + } + return o.Type +} + +func (o *CancelDeploymentHas1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type CancelDeploymentRoutesHasType string + +const ( + CancelDeploymentRoutesHasTypeCancelDeploymentHas1 CancelDeploymentRoutesHasType = "cancelDeployment_has_1" + CancelDeploymentRoutesHasTypeCancelDeploymentHas2 CancelDeploymentRoutesHasType = "cancelDeployment_has_2" +) + +type CancelDeploymentRoutesHas struct { + CancelDeploymentHas1 *CancelDeploymentHas1 + CancelDeploymentHas2 *CancelDeploymentHas2 + + Type CancelDeploymentRoutesHasType +} + +func CreateCancelDeploymentRoutesHasCancelDeploymentHas1(cancelDeploymentHas1 CancelDeploymentHas1) CancelDeploymentRoutesHas { + typ := CancelDeploymentRoutesHasTypeCancelDeploymentHas1 + + return CancelDeploymentRoutesHas{ + CancelDeploymentHas1: &cancelDeploymentHas1, + Type: typ, + } +} + +func CreateCancelDeploymentRoutesHasCancelDeploymentHas2(cancelDeploymentHas2 CancelDeploymentHas2) CancelDeploymentRoutesHas { + typ := CancelDeploymentRoutesHasTypeCancelDeploymentHas2 + + return CancelDeploymentRoutesHas{ + CancelDeploymentHas2: &cancelDeploymentHas2, + Type: typ, + } +} + +func (u *CancelDeploymentRoutesHas) UnmarshalJSON(data []byte) error { + + var cancelDeploymentHas1 CancelDeploymentHas1 = CancelDeploymentHas1{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentHas1, "", true, true); err == nil { + u.CancelDeploymentHas1 = &cancelDeploymentHas1 + u.Type = CancelDeploymentRoutesHasTypeCancelDeploymentHas1 + return nil + } + + var cancelDeploymentHas2 CancelDeploymentHas2 = CancelDeploymentHas2{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentHas2, "", true, true); err == nil { + u.CancelDeploymentHas2 = &cancelDeploymentHas2 + u.Type = CancelDeploymentRoutesHasTypeCancelDeploymentHas2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentRoutesHas", string(data)) +} + +func (u CancelDeploymentRoutesHas) MarshalJSON() ([]byte, error) { + if u.CancelDeploymentHas1 != nil { + return utils.MarshalJSON(u.CancelDeploymentHas1, "", true) + } + + if u.CancelDeploymentHas2 != nil { + return utils.MarshalJSON(u.CancelDeploymentHas2, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentRoutesHas: all fields are null") +} + +type CancelDeploymentMissingDeploymentsType string + +const ( + CancelDeploymentMissingDeploymentsTypeHeader CancelDeploymentMissingDeploymentsType = "header" + CancelDeploymentMissingDeploymentsTypeCookie CancelDeploymentMissingDeploymentsType = "cookie" + CancelDeploymentMissingDeploymentsTypeQuery CancelDeploymentMissingDeploymentsType = "query" +) + +func (e CancelDeploymentMissingDeploymentsType) ToPointer() *CancelDeploymentMissingDeploymentsType { + return &e +} +func (e *CancelDeploymentMissingDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + *e = CancelDeploymentMissingDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentMissingDeploymentsType: %v", v) + } +} + +type CancelDeploymentMissing2 struct { + Type CancelDeploymentMissingDeploymentsType `json:"type"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +func (o *CancelDeploymentMissing2) GetType() CancelDeploymentMissingDeploymentsType { + if o == nil { + return CancelDeploymentMissingDeploymentsType("") + } + return o.Type +} + +func (o *CancelDeploymentMissing2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *CancelDeploymentMissing2) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type CancelDeploymentMissingType string + +const ( + CancelDeploymentMissingTypeHost CancelDeploymentMissingType = "host" +) + +func (e CancelDeploymentMissingType) ToPointer() *CancelDeploymentMissingType { + return &e +} +func (e *CancelDeploymentMissingType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + *e = CancelDeploymentMissingType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentMissingType: %v", v) + } +} + +type CancelDeploymentMissing1 struct { + Type CancelDeploymentMissingType `json:"type"` + Value string `json:"value"` +} + +func (o *CancelDeploymentMissing1) GetType() CancelDeploymentMissingType { + if o == nil { + return CancelDeploymentMissingType("") + } + return o.Type +} + +func (o *CancelDeploymentMissing1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type CancelDeploymentRoutesMissingType string + +const ( + CancelDeploymentRoutesMissingTypeCancelDeploymentMissing1 CancelDeploymentRoutesMissingType = "cancelDeployment_missing_1" + CancelDeploymentRoutesMissingTypeCancelDeploymentMissing2 CancelDeploymentRoutesMissingType = "cancelDeployment_missing_2" +) + +type CancelDeploymentRoutesMissing struct { + CancelDeploymentMissing1 *CancelDeploymentMissing1 + CancelDeploymentMissing2 *CancelDeploymentMissing2 + + Type CancelDeploymentRoutesMissingType +} + +func CreateCancelDeploymentRoutesMissingCancelDeploymentMissing1(cancelDeploymentMissing1 CancelDeploymentMissing1) CancelDeploymentRoutesMissing { + typ := CancelDeploymentRoutesMissingTypeCancelDeploymentMissing1 + + return CancelDeploymentRoutesMissing{ + CancelDeploymentMissing1: &cancelDeploymentMissing1, + Type: typ, + } +} + +func CreateCancelDeploymentRoutesMissingCancelDeploymentMissing2(cancelDeploymentMissing2 CancelDeploymentMissing2) CancelDeploymentRoutesMissing { + typ := CancelDeploymentRoutesMissingTypeCancelDeploymentMissing2 + + return CancelDeploymentRoutesMissing{ + CancelDeploymentMissing2: &cancelDeploymentMissing2, + Type: typ, + } +} + +func (u *CancelDeploymentRoutesMissing) UnmarshalJSON(data []byte) error { + + var cancelDeploymentMissing1 CancelDeploymentMissing1 = CancelDeploymentMissing1{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentMissing1, "", true, true); err == nil { + u.CancelDeploymentMissing1 = &cancelDeploymentMissing1 + u.Type = CancelDeploymentRoutesMissingTypeCancelDeploymentMissing1 + return nil + } + + var cancelDeploymentMissing2 CancelDeploymentMissing2 = CancelDeploymentMissing2{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentMissing2, "", true, true); err == nil { + u.CancelDeploymentMissing2 = &cancelDeploymentMissing2 + u.Type = CancelDeploymentRoutesMissingTypeCancelDeploymentMissing2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentRoutesMissing", string(data)) +} + +func (u CancelDeploymentRoutesMissing) MarshalJSON() ([]byte, error) { + if u.CancelDeploymentMissing1 != nil { + return utils.MarshalJSON(u.CancelDeploymentMissing1, "", true) + } + + if u.CancelDeploymentMissing2 != nil { + return utils.MarshalJSON(u.CancelDeploymentMissing2, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentRoutesMissing: all fields are null") +} + +type RoutesLocale struct { + Redirect map[string]string `json:"redirect,omitempty"` + Cookie *string `json:"cookie,omitempty"` +} + +func (o *RoutesLocale) GetRedirect() map[string]string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *RoutesLocale) GetCookie() *string { + if o == nil { + return nil + } + return o.Cookie +} + +type CancelDeploymentRoutes1 struct { + Src string `json:"src"` + Dest *string `json:"dest,omitempty"` + Headers map[string]string `json:"headers,omitempty"` + Methods []string `json:"methods,omitempty"` + Continue *bool `json:"continue,omitempty"` + Override *bool `json:"override,omitempty"` + CaseSensitive *bool `json:"caseSensitive,omitempty"` + Check *bool `json:"check,omitempty"` + Important *bool `json:"important,omitempty"` + Status *float64 `json:"status,omitempty"` + Has []CancelDeploymentRoutesHas `json:"has,omitempty"` + Missing []CancelDeploymentRoutesMissing `json:"missing,omitempty"` + Locale *RoutesLocale `json:"locale,omitempty"` + // A middleware key within the `output` key under the build result. Overrides a `middleware` definition. + MiddlewarePath *string `json:"middlewarePath,omitempty"` + // The original middleware matchers. + MiddlewareRawSrc []string `json:"middlewareRawSrc,omitempty"` + // A middleware index in the `middleware` key under the build result + Middleware *float64 `json:"middleware,omitempty"` +} + +func (o *CancelDeploymentRoutes1) GetSrc() string { + if o == nil { + return "" + } + return o.Src +} + +func (o *CancelDeploymentRoutes1) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *CancelDeploymentRoutes1) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *CancelDeploymentRoutes1) GetMethods() []string { + if o == nil { + return nil + } + return o.Methods +} + +func (o *CancelDeploymentRoutes1) GetContinue() *bool { + if o == nil { + return nil + } + return o.Continue +} + +func (o *CancelDeploymentRoutes1) GetOverride() *bool { + if o == nil { + return nil + } + return o.Override +} + +func (o *CancelDeploymentRoutes1) GetCaseSensitive() *bool { + if o == nil { + return nil + } + return o.CaseSensitive +} + +func (o *CancelDeploymentRoutes1) GetCheck() *bool { + if o == nil { + return nil + } + return o.Check +} + +func (o *CancelDeploymentRoutes1) GetImportant() *bool { + if o == nil { + return nil + } + return o.Important +} + +func (o *CancelDeploymentRoutes1) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +func (o *CancelDeploymentRoutes1) GetHas() []CancelDeploymentRoutesHas { + if o == nil { + return nil + } + return o.Has +} + +func (o *CancelDeploymentRoutes1) GetMissing() []CancelDeploymentRoutesMissing { + if o == nil { + return nil + } + return o.Missing +} + +func (o *CancelDeploymentRoutes1) GetLocale() *RoutesLocale { + if o == nil { + return nil + } + return o.Locale +} + +func (o *CancelDeploymentRoutes1) GetMiddlewarePath() *string { + if o == nil { + return nil + } + return o.MiddlewarePath +} + +func (o *CancelDeploymentRoutes1) GetMiddlewareRawSrc() []string { + if o == nil { + return nil + } + return o.MiddlewareRawSrc +} + +func (o *CancelDeploymentRoutes1) GetMiddleware() *float64 { + if o == nil { + return nil + } + return o.Middleware +} + +type CancelDeploymentRoutesType string + +const ( + CancelDeploymentRoutesTypeCancelDeploymentRoutes1 CancelDeploymentRoutesType = "cancelDeployment_routes_1" + CancelDeploymentRoutesTypeCancelDeploymentRoutes2 CancelDeploymentRoutesType = "cancelDeployment_routes_2" + CancelDeploymentRoutesTypeCancelDeploymentRoutes3 CancelDeploymentRoutesType = "cancelDeployment_routes_3" +) + +type CancelDeploymentRoutes struct { + CancelDeploymentRoutes1 *CancelDeploymentRoutes1 + CancelDeploymentRoutes2 *CancelDeploymentRoutes2 + CancelDeploymentRoutes3 *CancelDeploymentRoutes3 + + Type CancelDeploymentRoutesType +} + +func CreateCancelDeploymentRoutesCancelDeploymentRoutes1(cancelDeploymentRoutes1 CancelDeploymentRoutes1) CancelDeploymentRoutes { + typ := CancelDeploymentRoutesTypeCancelDeploymentRoutes1 + + return CancelDeploymentRoutes{ + CancelDeploymentRoutes1: &cancelDeploymentRoutes1, + Type: typ, + } +} + +func CreateCancelDeploymentRoutesCancelDeploymentRoutes2(cancelDeploymentRoutes2 CancelDeploymentRoutes2) CancelDeploymentRoutes { + typ := CancelDeploymentRoutesTypeCancelDeploymentRoutes2 + + return CancelDeploymentRoutes{ + CancelDeploymentRoutes2: &cancelDeploymentRoutes2, + Type: typ, + } +} + +func CreateCancelDeploymentRoutesCancelDeploymentRoutes3(cancelDeploymentRoutes3 CancelDeploymentRoutes3) CancelDeploymentRoutes { + typ := CancelDeploymentRoutesTypeCancelDeploymentRoutes3 + + return CancelDeploymentRoutes{ + CancelDeploymentRoutes3: &cancelDeploymentRoutes3, + Type: typ, + } +} + +func (u *CancelDeploymentRoutes) UnmarshalJSON(data []byte) error { + + var cancelDeploymentRoutes3 CancelDeploymentRoutes3 = CancelDeploymentRoutes3{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentRoutes3, "", true, true); err == nil { + u.CancelDeploymentRoutes3 = &cancelDeploymentRoutes3 + u.Type = CancelDeploymentRoutesTypeCancelDeploymentRoutes3 + return nil + } + + var cancelDeploymentRoutes2 CancelDeploymentRoutes2 = CancelDeploymentRoutes2{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentRoutes2, "", true, true); err == nil { + u.CancelDeploymentRoutes2 = &cancelDeploymentRoutes2 + u.Type = CancelDeploymentRoutesTypeCancelDeploymentRoutes2 + return nil + } + + var cancelDeploymentRoutes1 CancelDeploymentRoutes1 = CancelDeploymentRoutes1{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentRoutes1, "", true, true); err == nil { + u.CancelDeploymentRoutes1 = &cancelDeploymentRoutes1 + u.Type = CancelDeploymentRoutesTypeCancelDeploymentRoutes1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentRoutes", string(data)) +} + +func (u CancelDeploymentRoutes) MarshalJSON() ([]byte, error) { + if u.CancelDeploymentRoutes1 != nil { + return utils.MarshalJSON(u.CancelDeploymentRoutes1, "", true) + } + + if u.CancelDeploymentRoutes2 != nil { + return utils.MarshalJSON(u.CancelDeploymentRoutes2, "", true) + } + + if u.CancelDeploymentRoutes3 != nil { + return utils.MarshalJSON(u.CancelDeploymentRoutes3, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentRoutes: all fields are null") +} + +type CancelDeploymentGitRepoDeploymentsResponseType string + +const ( + CancelDeploymentGitRepoDeploymentsResponseTypeBitbucket CancelDeploymentGitRepoDeploymentsResponseType = "bitbucket" +) + +func (e CancelDeploymentGitRepoDeploymentsResponseType) ToPointer() *CancelDeploymentGitRepoDeploymentsResponseType { + return &e +} +func (e *CancelDeploymentGitRepoDeploymentsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CancelDeploymentGitRepoDeploymentsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitRepoDeploymentsResponseType: %v", v) + } +} + +type CancelDeploymentGitRepoDeploymentsResponseOwnerType string + +const ( + CancelDeploymentGitRepoDeploymentsResponseOwnerTypeTeam CancelDeploymentGitRepoDeploymentsResponseOwnerType = "team" + CancelDeploymentGitRepoDeploymentsResponseOwnerTypeUser CancelDeploymentGitRepoDeploymentsResponseOwnerType = "user" +) + +func (e CancelDeploymentGitRepoDeploymentsResponseOwnerType) ToPointer() *CancelDeploymentGitRepoDeploymentsResponseOwnerType { + return &e +} +func (e *CancelDeploymentGitRepoDeploymentsResponseOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = CancelDeploymentGitRepoDeploymentsResponseOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitRepoDeploymentsResponseOwnerType: %v", v) + } +} + +type CancelDeploymentGitRepo3 struct { + Owner string `json:"owner"` + RepoUUID string `json:"repoUuid"` + Slug string `json:"slug"` + Type CancelDeploymentGitRepoDeploymentsResponseType `json:"type"` + WorkspaceUUID string `json:"workspaceUuid"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType CancelDeploymentGitRepoDeploymentsResponseOwnerType `json:"ownerType"` +} + +func (o *CancelDeploymentGitRepo3) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *CancelDeploymentGitRepo3) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +func (o *CancelDeploymentGitRepo3) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *CancelDeploymentGitRepo3) GetType() CancelDeploymentGitRepoDeploymentsResponseType { + if o == nil { + return CancelDeploymentGitRepoDeploymentsResponseType("") + } + return o.Type +} + +func (o *CancelDeploymentGitRepo3) GetWorkspaceUUID() string { + if o == nil { + return "" + } + return o.WorkspaceUUID +} + +func (o *CancelDeploymentGitRepo3) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *CancelDeploymentGitRepo3) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *CancelDeploymentGitRepo3) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CancelDeploymentGitRepo3) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *CancelDeploymentGitRepo3) GetOwnerType() CancelDeploymentGitRepoDeploymentsResponseOwnerType { + if o == nil { + return CancelDeploymentGitRepoDeploymentsResponseOwnerType("") + } + return o.OwnerType +} + +type CancelDeploymentGitRepoDeploymentsType string + +const ( + CancelDeploymentGitRepoDeploymentsTypeGithub CancelDeploymentGitRepoDeploymentsType = "github" +) + +func (e CancelDeploymentGitRepoDeploymentsType) ToPointer() *CancelDeploymentGitRepoDeploymentsType { + return &e +} +func (e *CancelDeploymentGitRepoDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CancelDeploymentGitRepoDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitRepoDeploymentsType: %v", v) + } +} + +type CancelDeploymentGitRepoDeploymentsOwnerType string + +const ( + CancelDeploymentGitRepoDeploymentsOwnerTypeTeam CancelDeploymentGitRepoDeploymentsOwnerType = "team" + CancelDeploymentGitRepoDeploymentsOwnerTypeUser CancelDeploymentGitRepoDeploymentsOwnerType = "user" +) + +func (e CancelDeploymentGitRepoDeploymentsOwnerType) ToPointer() *CancelDeploymentGitRepoDeploymentsOwnerType { + return &e +} +func (e *CancelDeploymentGitRepoDeploymentsOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = CancelDeploymentGitRepoDeploymentsOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitRepoDeploymentsOwnerType: %v", v) + } +} + +type CancelDeploymentGitRepo2 struct { + Org string `json:"org"` + Repo string `json:"repo"` + RepoID float64 `json:"repoId"` + Type CancelDeploymentGitRepoDeploymentsType `json:"type"` + RepoOwnerID float64 `json:"repoOwnerId"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType CancelDeploymentGitRepoDeploymentsOwnerType `json:"ownerType"` +} + +func (o *CancelDeploymentGitRepo2) GetOrg() string { + if o == nil { + return "" + } + return o.Org +} + +func (o *CancelDeploymentGitRepo2) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *CancelDeploymentGitRepo2) GetRepoID() float64 { + if o == nil { + return 0.0 + } + return o.RepoID +} + +func (o *CancelDeploymentGitRepo2) GetType() CancelDeploymentGitRepoDeploymentsType { + if o == nil { + return CancelDeploymentGitRepoDeploymentsType("") + } + return o.Type +} + +func (o *CancelDeploymentGitRepo2) GetRepoOwnerID() float64 { + if o == nil { + return 0.0 + } + return o.RepoOwnerID +} + +func (o *CancelDeploymentGitRepo2) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *CancelDeploymentGitRepo2) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *CancelDeploymentGitRepo2) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CancelDeploymentGitRepo2) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *CancelDeploymentGitRepo2) GetOwnerType() CancelDeploymentGitRepoDeploymentsOwnerType { + if o == nil { + return CancelDeploymentGitRepoDeploymentsOwnerType("") + } + return o.OwnerType +} + +type CancelDeploymentGitRepoType string + +const ( + CancelDeploymentGitRepoTypeGitlab CancelDeploymentGitRepoType = "gitlab" +) + +func (e CancelDeploymentGitRepoType) ToPointer() *CancelDeploymentGitRepoType { + return &e +} +func (e *CancelDeploymentGitRepoType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = CancelDeploymentGitRepoType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitRepoType: %v", v) + } +} + +type CancelDeploymentGitRepoOwnerType string + +const ( + CancelDeploymentGitRepoOwnerTypeTeam CancelDeploymentGitRepoOwnerType = "team" + CancelDeploymentGitRepoOwnerTypeUser CancelDeploymentGitRepoOwnerType = "user" +) + +func (e CancelDeploymentGitRepoOwnerType) ToPointer() *CancelDeploymentGitRepoOwnerType { + return &e +} +func (e *CancelDeploymentGitRepoOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = CancelDeploymentGitRepoOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for CancelDeploymentGitRepoOwnerType: %v", v) + } +} + +type CancelDeploymentGitRepo1 struct { + Namespace string `json:"namespace"` + ProjectID float64 `json:"projectId"` + Type CancelDeploymentGitRepoType `json:"type"` + URL string `json:"url"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType CancelDeploymentGitRepoOwnerType `json:"ownerType"` +} + +func (o *CancelDeploymentGitRepo1) GetNamespace() string { + if o == nil { + return "" + } + return o.Namespace +} + +func (o *CancelDeploymentGitRepo1) GetProjectID() float64 { + if o == nil { + return 0.0 + } + return o.ProjectID +} + +func (o *CancelDeploymentGitRepo1) GetType() CancelDeploymentGitRepoType { + if o == nil { + return CancelDeploymentGitRepoType("") + } + return o.Type +} + +func (o *CancelDeploymentGitRepo1) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CancelDeploymentGitRepo1) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *CancelDeploymentGitRepo1) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *CancelDeploymentGitRepo1) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CancelDeploymentGitRepo1) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *CancelDeploymentGitRepo1) GetOwnerType() CancelDeploymentGitRepoOwnerType { + if o == nil { + return CancelDeploymentGitRepoOwnerType("") + } + return o.OwnerType +} + +type CancelDeploymentGitRepoUnionType string + +const ( + CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo1 CancelDeploymentGitRepoUnionType = "cancelDeployment_gitRepo_1" + CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo2 CancelDeploymentGitRepoUnionType = "cancelDeployment_gitRepo_2" + CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo3 CancelDeploymentGitRepoUnionType = "cancelDeployment_gitRepo_3" +) + +type CancelDeploymentGitRepo struct { + CancelDeploymentGitRepo1 *CancelDeploymentGitRepo1 + CancelDeploymentGitRepo2 *CancelDeploymentGitRepo2 + CancelDeploymentGitRepo3 *CancelDeploymentGitRepo3 + + Type CancelDeploymentGitRepoUnionType +} + +func CreateCancelDeploymentGitRepoCancelDeploymentGitRepo1(cancelDeploymentGitRepo1 CancelDeploymentGitRepo1) CancelDeploymentGitRepo { + typ := CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo1 + + return CancelDeploymentGitRepo{ + CancelDeploymentGitRepo1: &cancelDeploymentGitRepo1, + Type: typ, + } +} + +func CreateCancelDeploymentGitRepoCancelDeploymentGitRepo2(cancelDeploymentGitRepo2 CancelDeploymentGitRepo2) CancelDeploymentGitRepo { + typ := CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo2 + + return CancelDeploymentGitRepo{ + CancelDeploymentGitRepo2: &cancelDeploymentGitRepo2, + Type: typ, + } +} + +func CreateCancelDeploymentGitRepoCancelDeploymentGitRepo3(cancelDeploymentGitRepo3 CancelDeploymentGitRepo3) CancelDeploymentGitRepo { + typ := CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo3 + + return CancelDeploymentGitRepo{ + CancelDeploymentGitRepo3: &cancelDeploymentGitRepo3, + Type: typ, + } +} + +func (u *CancelDeploymentGitRepo) UnmarshalJSON(data []byte) error { + + var cancelDeploymentGitRepo1 CancelDeploymentGitRepo1 = CancelDeploymentGitRepo1{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentGitRepo1, "", true, true); err == nil { + u.CancelDeploymentGitRepo1 = &cancelDeploymentGitRepo1 + u.Type = CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo1 + return nil + } + + var cancelDeploymentGitRepo2 CancelDeploymentGitRepo2 = CancelDeploymentGitRepo2{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentGitRepo2, "", true, true); err == nil { + u.CancelDeploymentGitRepo2 = &cancelDeploymentGitRepo2 + u.Type = CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo2 + return nil + } + + var cancelDeploymentGitRepo3 CancelDeploymentGitRepo3 = CancelDeploymentGitRepo3{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentGitRepo3, "", true, true); err == nil { + u.CancelDeploymentGitRepo3 = &cancelDeploymentGitRepo3 + u.Type = CancelDeploymentGitRepoUnionTypeCancelDeploymentGitRepo3 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentGitRepo", string(data)) +} + +func (u CancelDeploymentGitRepo) MarshalJSON() ([]byte, error) { + if u.CancelDeploymentGitRepo1 != nil { + return utils.MarshalJSON(u.CancelDeploymentGitRepo1, "", true) + } + + if u.CancelDeploymentGitRepo2 != nil { + return utils.MarshalJSON(u.CancelDeploymentGitRepo2, "", true) + } + + if u.CancelDeploymentGitRepo3 != nil { + return utils.MarshalJSON(u.CancelDeploymentGitRepo3, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentGitRepo: all fields are null") +} + +// CancelDeploymentFlags2 - Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags. +type CancelDeploymentFlags2 struct { +} + +type FlagsOptions struct { + Value *components.FlagJSONValue `json:"value"` + Label *string `json:"label,omitempty"` +} + +func (o *FlagsOptions) GetValue() *components.FlagJSONValue { + if o == nil { + return nil + } + return o.Value +} + +func (o *FlagsOptions) GetLabel() *string { + if o == nil { + return nil + } + return o.Label +} + +type CancelDeploymentFlagsDefinitions struct { + Options []FlagsOptions `json:"options,omitempty"` + URL *string `json:"url,omitempty"` + Description *string `json:"description,omitempty"` +} + +func (o *CancelDeploymentFlagsDefinitions) GetOptions() []FlagsOptions { + if o == nil { + return nil + } + return o.Options +} + +func (o *CancelDeploymentFlagsDefinitions) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *CancelDeploymentFlagsDefinitions) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +// CancelDeploymentFlags1 - Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags. +type CancelDeploymentFlags1 struct { + Definitions map[string]CancelDeploymentFlagsDefinitions `json:"definitions"` +} + +func (o *CancelDeploymentFlags1) GetDefinitions() map[string]CancelDeploymentFlagsDefinitions { + if o == nil { + return map[string]CancelDeploymentFlagsDefinitions{} + } + return o.Definitions +} + +type CancelDeploymentFlagsType string + +const ( + CancelDeploymentFlagsTypeCancelDeploymentFlags1 CancelDeploymentFlagsType = "cancelDeployment_flags_1" + CancelDeploymentFlagsTypeArrayOfCancelDeploymentFlags2 CancelDeploymentFlagsType = "arrayOfCancelDeploymentFlags2" +) + +type CancelDeploymentFlags struct { + CancelDeploymentFlags1 *CancelDeploymentFlags1 + ArrayOfCancelDeploymentFlags2 []CancelDeploymentFlags2 + + Type CancelDeploymentFlagsType +} + +func CreateCancelDeploymentFlagsCancelDeploymentFlags1(cancelDeploymentFlags1 CancelDeploymentFlags1) CancelDeploymentFlags { + typ := CancelDeploymentFlagsTypeCancelDeploymentFlags1 + + return CancelDeploymentFlags{ + CancelDeploymentFlags1: &cancelDeploymentFlags1, + Type: typ, + } +} + +func CreateCancelDeploymentFlagsArrayOfCancelDeploymentFlags2(arrayOfCancelDeploymentFlags2 []CancelDeploymentFlags2) CancelDeploymentFlags { + typ := CancelDeploymentFlagsTypeArrayOfCancelDeploymentFlags2 + + return CancelDeploymentFlags{ + ArrayOfCancelDeploymentFlags2: arrayOfCancelDeploymentFlags2, + Type: typ, + } +} + +func (u *CancelDeploymentFlags) UnmarshalJSON(data []byte) error { + + var cancelDeploymentFlags1 CancelDeploymentFlags1 = CancelDeploymentFlags1{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentFlags1, "", true, true); err == nil { + u.CancelDeploymentFlags1 = &cancelDeploymentFlags1 + u.Type = CancelDeploymentFlagsTypeCancelDeploymentFlags1 + return nil + } + + var arrayOfCancelDeploymentFlags2 []CancelDeploymentFlags2 = []CancelDeploymentFlags2{} + if err := utils.UnmarshalJSON(data, &arrayOfCancelDeploymentFlags2, "", true, true); err == nil { + u.ArrayOfCancelDeploymentFlags2 = arrayOfCancelDeploymentFlags2 + u.Type = CancelDeploymentFlagsTypeArrayOfCancelDeploymentFlags2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentFlags", string(data)) +} + +func (u CancelDeploymentFlags) MarshalJSON() ([]byte, error) { + if u.CancelDeploymentFlags1 != nil { + return utils.MarshalJSON(u.CancelDeploymentFlags1, "", true) + } + + if u.ArrayOfCancelDeploymentFlags2 != nil { + return utils.MarshalJSON(u.ArrayOfCancelDeploymentFlags2, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentFlags: all fields are null") +} + +// MicrofrontendsApplications - A map of the other applications that are part of this group. Only defined on the default application. The field is set after deployments have been created, so can be undefined, but should be there for a successful deployment. +type MicrofrontendsApplications struct { + // This is the production alias, it will always show the most up to date of each application. + ProductionHost string `json:"productionHost"` + // Use the fixed deploymentAlias and deploymentHost so that the microfrontend preview stays in sync with the deployment. These are only present for mono-repos when a single commit creates multiple deployments. If they are not present, productionHost will be used. + DeploymentAlias *string `json:"deploymentAlias,omitempty"` + DeploymentHost *string `json:"deploymentHost,omitempty"` +} + +func (o *MicrofrontendsApplications) GetProductionHost() string { + if o == nil { + return "" + } + return o.ProductionHost +} + +func (o *MicrofrontendsApplications) GetDeploymentAlias() *string { + if o == nil { + return nil + } + return o.DeploymentAlias +} + +func (o *MicrofrontendsApplications) GetDeploymentHost() *string { + if o == nil { + return nil + } + return o.DeploymentHost +} + +type CancelDeploymentMicrofrontends2 struct { + // A map of the other applications that are part of this group. Only defined on the default application. The field is set after deployments have been created, so can be undefined, but should be there for a successful deployment. + Applications map[string]MicrofrontendsApplications `json:"applications,omitempty"` + IsDefaultApp bool `json:"isDefaultApp"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` + // The group of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` +} + +func (o *CancelDeploymentMicrofrontends2) GetApplications() map[string]MicrofrontendsApplications { + if o == nil { + return nil + } + return o.Applications +} + +func (o *CancelDeploymentMicrofrontends2) GetIsDefaultApp() bool { + if o == nil { + return false + } + return o.IsDefaultApp +} + +func (o *CancelDeploymentMicrofrontends2) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *CancelDeploymentMicrofrontends2) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +type CancelDeploymentMicrofrontends1 struct { + // Whether this project is the default application for the microfrontends group. The default application is the one that is used as the top level shell for the microfrontends group and hosts the other microfrontends. + IsDefaultApp *bool `json:"isDefaultApp,omitempty"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` + // The group of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` +} + +func (o *CancelDeploymentMicrofrontends1) GetIsDefaultApp() *bool { + if o == nil { + return nil + } + return o.IsDefaultApp +} + +func (o *CancelDeploymentMicrofrontends1) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *CancelDeploymentMicrofrontends1) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +type CancelDeploymentMicrofrontendsType string + +const ( + CancelDeploymentMicrofrontendsTypeCancelDeploymentMicrofrontends1 CancelDeploymentMicrofrontendsType = "cancelDeployment_microfrontends_1" + CancelDeploymentMicrofrontendsTypeCancelDeploymentMicrofrontends2 CancelDeploymentMicrofrontendsType = "cancelDeployment_microfrontends_2" +) + +type CancelDeploymentMicrofrontends struct { + CancelDeploymentMicrofrontends1 *CancelDeploymentMicrofrontends1 + CancelDeploymentMicrofrontends2 *CancelDeploymentMicrofrontends2 + + Type CancelDeploymentMicrofrontendsType +} + +func CreateCancelDeploymentMicrofrontendsCancelDeploymentMicrofrontends1(cancelDeploymentMicrofrontends1 CancelDeploymentMicrofrontends1) CancelDeploymentMicrofrontends { + typ := CancelDeploymentMicrofrontendsTypeCancelDeploymentMicrofrontends1 + + return CancelDeploymentMicrofrontends{ + CancelDeploymentMicrofrontends1: &cancelDeploymentMicrofrontends1, + Type: typ, + } +} + +func CreateCancelDeploymentMicrofrontendsCancelDeploymentMicrofrontends2(cancelDeploymentMicrofrontends2 CancelDeploymentMicrofrontends2) CancelDeploymentMicrofrontends { + typ := CancelDeploymentMicrofrontendsTypeCancelDeploymentMicrofrontends2 + + return CancelDeploymentMicrofrontends{ + CancelDeploymentMicrofrontends2: &cancelDeploymentMicrofrontends2, + Type: typ, + } +} + +func (u *CancelDeploymentMicrofrontends) UnmarshalJSON(data []byte) error { + + var cancelDeploymentMicrofrontends1 CancelDeploymentMicrofrontends1 = CancelDeploymentMicrofrontends1{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentMicrofrontends1, "", true, true); err == nil { + u.CancelDeploymentMicrofrontends1 = &cancelDeploymentMicrofrontends1 + u.Type = CancelDeploymentMicrofrontendsTypeCancelDeploymentMicrofrontends1 + return nil + } + + var cancelDeploymentMicrofrontends2 CancelDeploymentMicrofrontends2 = CancelDeploymentMicrofrontends2{} + if err := utils.UnmarshalJSON(data, &cancelDeploymentMicrofrontends2, "", true, true); err == nil { + u.CancelDeploymentMicrofrontends2 = &cancelDeploymentMicrofrontends2 + u.Type = CancelDeploymentMicrofrontendsTypeCancelDeploymentMicrofrontends2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CancelDeploymentMicrofrontends", string(data)) +} + +func (u CancelDeploymentMicrofrontends) MarshalJSON() ([]byte, error) { + if u.CancelDeploymentMicrofrontends1 != nil { + return utils.MarshalJSON(u.CancelDeploymentMicrofrontends1, "", true) + } + + if u.CancelDeploymentMicrofrontends2 != nil { + return utils.MarshalJSON(u.CancelDeploymentMicrofrontends2, "", true) + } + + return nil, errors.New("could not marshal union type CancelDeploymentMicrofrontends: all fields are null") +} + +// CancelDeploymentResponseBody - The private deployment representation of a Deployment. +type CancelDeploymentResponseBody struct { + AliasAssignedAt *CancelDeploymentAliasAssignedAt `json:"aliasAssignedAt,omitempty"` + AlwaysRefuseToBuild *bool `json:"alwaysRefuseToBuild,omitempty"` + Build CancelDeploymentBuild `json:"build"` + BuildArtifactUrls []string `json:"buildArtifactUrls,omitempty"` + Builds []CancelDeploymentBuilds `json:"builds,omitempty"` + Env []string `json:"env"` + InspectorURL *string `json:"inspectorUrl"` + IsInConcurrentBuildsQueue bool `json:"isInConcurrentBuildsQueue"` + IsInSystemBuildsQueue bool `json:"isInSystemBuildsQueue"` + ProjectSettings CancelDeploymentProjectSettings `json:"projectSettings"` + ReadyStateReason *string `json:"readyStateReason,omitempty"` + Integrations *CancelDeploymentIntegrations `json:"integrations,omitempty"` + Images *CancelDeploymentImages `json:"images,omitempty"` + Alias []string `json:"alias,omitempty"` + AliasAssigned bool `json:"aliasAssigned"` + BootedAt float64 `json:"bootedAt"` + BuildingAt float64 `json:"buildingAt"` + BuildSkipped bool `json:"buildSkipped"` + Creator CancelDeploymentCreator `json:"creator"` + InitReadyAt *float64 `json:"initReadyAt,omitempty"` + IsFirstBranchDeployment *bool `json:"isFirstBranchDeployment,omitempty"` + Lambdas []CancelDeploymentLambdas `json:"lambdas,omitempty"` + Public bool `json:"public"` + Ready *float64 `json:"ready,omitempty"` + Status CancelDeploymentStatus `json:"status"` + Team *CancelDeploymentTeam `json:"team,omitempty"` + UserAliases []string `json:"userAliases,omitempty"` + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + TtyBuildLogs *bool `json:"ttyBuildLogs,omitempty"` + CustomEnvironment *CancelDeploymentCustomEnvironment `json:"customEnvironment,omitempty"` + ID string `json:"id"` + AliasError *CancelDeploymentAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AliasWarning *CancelDeploymentAliasWarning `json:"aliasWarning,omitempty"` + // applies to custom domains only, defaults to `true` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BuildErrorAt *float64 `json:"buildErrorAt,omitempty"` + ChecksState *CancelDeploymentChecksState `json:"checksState,omitempty"` + ChecksConclusion *CancelDeploymentChecksConclusion `json:"checksConclusion,omitempty"` + CreatedAt float64 `json:"createdAt"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + // Computed field that is only available for deployments with a microfrontend configuration. + DefaultRoute *string `json:"defaultRoute,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorLink *string `json:"errorLink,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ErrorStep *string `json:"errorStep,omitempty"` + // Since November 2023 this field defines a set of regions that we will deploy the lambda to passively Lambdas will be deployed to these regions but only invoked if all of the primary `regions` are marked as out of service + PassiveRegions []string `json:"passiveRegions,omitempty"` + GitSource *CancelDeploymentGitSource `json:"gitSource,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta"` + OriginCacheRegion *string `json:"originCacheRegion,omitempty"` + Project *CancelDeploymentProject `json:"project,omitempty"` + ReadyState CancelDeploymentReadyState `json:"readyState"` + // Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic + ReadySubstate *CancelDeploymentReadySubstate `json:"readySubstate,omitempty"` + Regions []string `json:"regions"` + SoftDeletedByRetention *bool `json:"softDeletedByRetention,omitempty"` + Source *CancelDeploymentSource `json:"source,omitempty"` + Target *CancelDeploymentTarget `json:"target,omitempty"` + Type CancelDeploymentType `json:"type"` + UndeletedAt *float64 `json:"undeletedAt,omitempty"` + URL string `json:"url"` + Version float64 `json:"version"` + OidcTokenClaims *CancelDeploymentOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedIn string `json:"createdIn"` + Crons []CancelDeploymentCrons `json:"crons,omitempty"` + Functions map[string]CancelDeploymentFunctions `json:"functions,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OwnerID string `json:"ownerId"` + // Since November 2023 this field defines a Secure Compute network that will only be used to deploy passive lambdas to (as in passiveRegions) + PassiveConnectConfigurationID *string `json:"passiveConnectConfigurationId,omitempty"` + Plan CancelDeploymentPlan `json:"plan"` + ProjectID string `json:"projectId"` + Routes []CancelDeploymentRoutes `json:"routes"` + GitRepo *CancelDeploymentGitRepo `json:"gitRepo,omitempty"` + Flags *CancelDeploymentFlags `json:"flags,omitempty"` + Microfrontends *CancelDeploymentMicrofrontends `json:"microfrontends,omitempty"` +} + +func (o *CancelDeploymentResponseBody) GetAliasAssignedAt() *CancelDeploymentAliasAssignedAt { + if o == nil { + return nil + } + return o.AliasAssignedAt +} + +func (o *CancelDeploymentResponseBody) GetAlwaysRefuseToBuild() *bool { + if o == nil { + return nil + } + return o.AlwaysRefuseToBuild +} + +func (o *CancelDeploymentResponseBody) GetBuild() CancelDeploymentBuild { + if o == nil { + return CancelDeploymentBuild{} + } + return o.Build +} + +func (o *CancelDeploymentResponseBody) GetBuildArtifactUrls() []string { + if o == nil { + return nil + } + return o.BuildArtifactUrls +} + +func (o *CancelDeploymentResponseBody) GetBuilds() []CancelDeploymentBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *CancelDeploymentResponseBody) GetEnv() []string { + if o == nil { + return []string{} + } + return o.Env +} + +func (o *CancelDeploymentResponseBody) GetInspectorURL() *string { + if o == nil { + return nil + } + return o.InspectorURL +} + +func (o *CancelDeploymentResponseBody) GetIsInConcurrentBuildsQueue() bool { + if o == nil { + return false + } + return o.IsInConcurrentBuildsQueue +} + +func (o *CancelDeploymentResponseBody) GetIsInSystemBuildsQueue() bool { + if o == nil { + return false + } + return o.IsInSystemBuildsQueue +} + +func (o *CancelDeploymentResponseBody) GetProjectSettings() CancelDeploymentProjectSettings { + if o == nil { + return CancelDeploymentProjectSettings{} + } + return o.ProjectSettings +} + +func (o *CancelDeploymentResponseBody) GetReadyStateReason() *string { + if o == nil { + return nil + } + return o.ReadyStateReason +} + +func (o *CancelDeploymentResponseBody) GetIntegrations() *CancelDeploymentIntegrations { + if o == nil { + return nil + } + return o.Integrations +} + +func (o *CancelDeploymentResponseBody) GetImages() *CancelDeploymentImages { + if o == nil { + return nil + } + return o.Images +} + +func (o *CancelDeploymentResponseBody) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *CancelDeploymentResponseBody) GetAliasAssigned() bool { + if o == nil { + return false + } + return o.AliasAssigned +} + +func (o *CancelDeploymentResponseBody) GetBootedAt() float64 { + if o == nil { + return 0.0 + } + return o.BootedAt +} + +func (o *CancelDeploymentResponseBody) GetBuildingAt() float64 { + if o == nil { + return 0.0 + } + return o.BuildingAt +} + +func (o *CancelDeploymentResponseBody) GetBuildSkipped() bool { + if o == nil { + return false + } + return o.BuildSkipped +} + +func (o *CancelDeploymentResponseBody) GetCreator() CancelDeploymentCreator { + if o == nil { + return CancelDeploymentCreator{} + } + return o.Creator +} + +func (o *CancelDeploymentResponseBody) GetInitReadyAt() *float64 { + if o == nil { + return nil + } + return o.InitReadyAt +} + +func (o *CancelDeploymentResponseBody) GetIsFirstBranchDeployment() *bool { + if o == nil { + return nil + } + return o.IsFirstBranchDeployment +} + +func (o *CancelDeploymentResponseBody) GetLambdas() []CancelDeploymentLambdas { + if o == nil { + return nil + } + return o.Lambdas +} + +func (o *CancelDeploymentResponseBody) GetPublic() bool { + if o == nil { + return false + } + return o.Public +} + +func (o *CancelDeploymentResponseBody) GetReady() *float64 { + if o == nil { + return nil + } + return o.Ready +} + +func (o *CancelDeploymentResponseBody) GetStatus() CancelDeploymentStatus { + if o == nil { + return CancelDeploymentStatus("") + } + return o.Status +} + +func (o *CancelDeploymentResponseBody) GetTeam() *CancelDeploymentTeam { + if o == nil { + return nil + } + return o.Team +} + +func (o *CancelDeploymentResponseBody) GetUserAliases() []string { + if o == nil { + return nil + } + return o.UserAliases +} + +func (o *CancelDeploymentResponseBody) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *CancelDeploymentResponseBody) GetTtyBuildLogs() *bool { + if o == nil { + return nil + } + return o.TtyBuildLogs +} + +func (o *CancelDeploymentResponseBody) GetCustomEnvironment() *CancelDeploymentCustomEnvironment { + if o == nil { + return nil + } + return o.CustomEnvironment +} + +func (o *CancelDeploymentResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CancelDeploymentResponseBody) GetAliasError() *CancelDeploymentAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *CancelDeploymentResponseBody) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *CancelDeploymentResponseBody) GetAliasWarning() *CancelDeploymentAliasWarning { + if o == nil { + return nil + } + return o.AliasWarning +} + +func (o *CancelDeploymentResponseBody) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *CancelDeploymentResponseBody) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *CancelDeploymentResponseBody) GetBuildErrorAt() *float64 { + if o == nil { + return nil + } + return o.BuildErrorAt +} + +func (o *CancelDeploymentResponseBody) GetChecksState() *CancelDeploymentChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *CancelDeploymentResponseBody) GetChecksConclusion() *CancelDeploymentChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *CancelDeploymentResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CancelDeploymentResponseBody) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *CancelDeploymentResponseBody) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *CancelDeploymentResponseBody) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CancelDeploymentResponseBody) GetErrorCode() *string { + if o == nil { + return nil + } + return o.ErrorCode +} + +func (o *CancelDeploymentResponseBody) GetErrorLink() *string { + if o == nil { + return nil + } + return o.ErrorLink +} + +func (o *CancelDeploymentResponseBody) GetErrorMessage() *string { + if o == nil { + return nil + } + return o.ErrorMessage +} + +func (o *CancelDeploymentResponseBody) GetErrorStep() *string { + if o == nil { + return nil + } + return o.ErrorStep +} + +func (o *CancelDeploymentResponseBody) GetPassiveRegions() []string { + if o == nil { + return nil + } + return o.PassiveRegions +} + +func (o *CancelDeploymentResponseBody) GetGitSource() *CancelDeploymentGitSource { + if o == nil { + return nil + } + return o.GitSource +} + +func (o *CancelDeploymentResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CancelDeploymentResponseBody) GetMeta() map[string]string { + if o == nil { + return map[string]string{} + } + return o.Meta +} + +func (o *CancelDeploymentResponseBody) GetOriginCacheRegion() *string { + if o == nil { + return nil + } + return o.OriginCacheRegion +} + +func (o *CancelDeploymentResponseBody) GetProject() *CancelDeploymentProject { + if o == nil { + return nil + } + return o.Project +} + +func (o *CancelDeploymentResponseBody) GetReadyState() CancelDeploymentReadyState { + if o == nil { + return CancelDeploymentReadyState("") + } + return o.ReadyState +} + +func (o *CancelDeploymentResponseBody) GetReadySubstate() *CancelDeploymentReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *CancelDeploymentResponseBody) GetRegions() []string { + if o == nil { + return []string{} + } + return o.Regions +} + +func (o *CancelDeploymentResponseBody) GetSoftDeletedByRetention() *bool { + if o == nil { + return nil + } + return o.SoftDeletedByRetention +} + +func (o *CancelDeploymentResponseBody) GetSource() *CancelDeploymentSource { + if o == nil { + return nil + } + return o.Source +} + +func (o *CancelDeploymentResponseBody) GetTarget() *CancelDeploymentTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *CancelDeploymentResponseBody) GetType() CancelDeploymentType { + if o == nil { + return CancelDeploymentType("") + } + return o.Type +} + +func (o *CancelDeploymentResponseBody) GetUndeletedAt() *float64 { + if o == nil { + return nil + } + return o.UndeletedAt +} + +func (o *CancelDeploymentResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CancelDeploymentResponseBody) GetVersion() float64 { + if o == nil { + return 0.0 + } + return o.Version +} + +func (o *CancelDeploymentResponseBody) GetOidcTokenClaims() *CancelDeploymentOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *CancelDeploymentResponseBody) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *CancelDeploymentResponseBody) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *CancelDeploymentResponseBody) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *CancelDeploymentResponseBody) GetCrons() []CancelDeploymentCrons { + if o == nil { + return nil + } + return o.Crons +} + +func (o *CancelDeploymentResponseBody) GetFunctions() map[string]CancelDeploymentFunctions { + if o == nil { + return nil + } + return o.Functions +} + +func (o *CancelDeploymentResponseBody) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *CancelDeploymentResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *CancelDeploymentResponseBody) GetPassiveConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.PassiveConnectConfigurationID +} + +func (o *CancelDeploymentResponseBody) GetPlan() CancelDeploymentPlan { + if o == nil { + return CancelDeploymentPlan("") + } + return o.Plan +} + +func (o *CancelDeploymentResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *CancelDeploymentResponseBody) GetRoutes() []CancelDeploymentRoutes { + if o == nil { + return nil + } + return o.Routes +} + +func (o *CancelDeploymentResponseBody) GetGitRepo() *CancelDeploymentGitRepo { + if o == nil { + return nil + } + return o.GitRepo +} + +func (o *CancelDeploymentResponseBody) GetFlags() *CancelDeploymentFlags { + if o == nil { + return nil + } + return o.Flags +} + +func (o *CancelDeploymentResponseBody) GetMicrofrontends() *CancelDeploymentMicrofrontends { + if o == nil { + return nil + } + return o.Microfrontends +} + +type CancelDeploymentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CancelDeploymentResponseBody +} + +func (o *CancelDeploymentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CancelDeploymentResponse) GetObject() *CancelDeploymentResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/checkdomainprice.go b/src/__tests__/mockserver/internal/sdk/models/operations/checkdomainprice.go new file mode 100644 index 00000000..13ccc5af --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/checkdomainprice.go @@ -0,0 +1,123 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// QueryParamType - In which status of the domain the price needs to be checked. +type QueryParamType string + +const ( + QueryParamTypeNew QueryParamType = "new" + QueryParamTypeRenewal QueryParamType = "renewal" + QueryParamTypeTransfer QueryParamType = "transfer" + QueryParamTypeRedemption QueryParamType = "redemption" +) + +func (e QueryParamType) ToPointer() *QueryParamType { + return &e +} +func (e *QueryParamType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "new": + fallthrough + case "renewal": + fallthrough + case "transfer": + fallthrough + case "redemption": + *e = QueryParamType(v) + return nil + default: + return fmt.Errorf("invalid value for QueryParamType: %v", v) + } +} + +type CheckDomainPriceRequest struct { + // The name of the domain for which the price needs to be checked. + Name string `queryParam:"style=form,explode=true,name=name"` + // In which status of the domain the price needs to be checked. + Type *QueryParamType `queryParam:"style=form,explode=true,name=type"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *CheckDomainPriceRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CheckDomainPriceRequest) GetType() *QueryParamType { + if o == nil { + return nil + } + return o.Type +} + +func (o *CheckDomainPriceRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CheckDomainPriceRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// CheckDomainPriceResponseBody - Successful response which returns the price of the domain and the period. +type CheckDomainPriceResponseBody struct { + // The domain price in USD. + Price float64 `json:"price"` + // The number of years the domain could be held before paying again. + Period float64 `json:"period"` +} + +func (o *CheckDomainPriceResponseBody) GetPrice() float64 { + if o == nil { + return 0.0 + } + return o.Price +} + +func (o *CheckDomainPriceResponseBody) GetPeriod() float64 { + if o == nil { + return 0.0 + } + return o.Period +} + +type CheckDomainPriceResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response which returns the price of the domain and the period. + Object *CheckDomainPriceResponseBody +} + +func (o *CheckDomainPriceResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CheckDomainPriceResponse) GetObject() *CheckDomainPriceResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/checkdomainstatus.go b/src/__tests__/mockserver/internal/sdk/models/operations/checkdomainstatus.go new file mode 100644 index 00000000..399dcbdd --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/checkdomainstatus.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CheckDomainStatusRequest struct { + // The name of the domain for which we would like to check the status. + Name string `queryParam:"style=form,explode=true,name=name"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *CheckDomainStatusRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CheckDomainStatusRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CheckDomainStatusRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// CheckDomainStatusResponseBody - Successful response checking if a Domain's name is available. +type CheckDomainStatusResponseBody struct { + Available bool `json:"available"` +} + +func (o *CheckDomainStatusResponseBody) GetAvailable() bool { + if o == nil { + return false + } + return o.Available +} + +type CheckDomainStatusResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response checking if a Domain's name is available. + Object *CheckDomainStatusResponseBody +} + +func (o *CheckDomainStatusResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CheckDomainStatusResponse) GetObject() *CheckDomainStatusResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createaccessgroup.go b/src/__tests__/mockserver/internal/sdk/models/operations/createaccessgroup.go new file mode 100644 index 00000000..77b9f04d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createaccessgroup.go @@ -0,0 +1,201 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// CreateAccessGroupRole - The project role that will be added to this Access Group. \"null\" will remove this project level role. +type CreateAccessGroupRole string + +const ( + CreateAccessGroupRoleAdmin CreateAccessGroupRole = "ADMIN" + CreateAccessGroupRoleProjectViewer CreateAccessGroupRole = "PROJECT_VIEWER" + CreateAccessGroupRoleProjectDeveloper CreateAccessGroupRole = "PROJECT_DEVELOPER" +) + +func (e CreateAccessGroupRole) ToPointer() *CreateAccessGroupRole { + return &e +} +func (e *CreateAccessGroupRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_VIEWER": + fallthrough + case "PROJECT_DEVELOPER": + *e = CreateAccessGroupRole(v) + return nil + default: + return fmt.Errorf("invalid value for CreateAccessGroupRole: %v", v) + } +} + +type CreateAccessGroupProjects struct { + // The ID of the project. + ProjectID string `json:"projectId"` + // The project role that will be added to this Access Group. \"null\" will remove this project level role. + Role *CreateAccessGroupRole `json:"role"` +} + +func (o *CreateAccessGroupProjects) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *CreateAccessGroupProjects) GetRole() *CreateAccessGroupRole { + if o == nil { + return nil + } + return o.Role +} + +type CreateAccessGroupRequestBody struct { + // The name of the access group + Name string `json:"name"` + Projects []CreateAccessGroupProjects `json:"projects,omitempty"` + // List of members to add to the access group. + MembersToAdd []string `json:"membersToAdd,omitempty"` +} + +func (o *CreateAccessGroupRequestBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateAccessGroupRequestBody) GetProjects() []CreateAccessGroupProjects { + if o == nil { + return nil + } + return o.Projects +} + +func (o *CreateAccessGroupRequestBody) GetMembersToAdd() []string { + if o == nil { + return nil + } + return o.MembersToAdd +} + +type CreateAccessGroupRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateAccessGroupRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateAccessGroupRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateAccessGroupRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateAccessGroupRequest) GetRequestBody() CreateAccessGroupRequestBody { + if o == nil { + return CreateAccessGroupRequestBody{} + } + return o.RequestBody +} + +type CreateAccessGroupResponseBody struct { + MembersCount float64 `json:"membersCount"` + ProjectsCount float64 `json:"projectsCount"` + // The name of this access group. + Name string `json:"name"` + // Timestamp in milliseconds when the access group was created. + CreatedAt string `json:"createdAt"` + // ID of the team that this access group belongs to. + TeamID string `json:"teamId"` + // Timestamp in milliseconds when the access group was last updated. + UpdatedAt string `json:"updatedAt"` + // ID of the access group. + AccessGroupID string `json:"accessGroupId"` +} + +func (o *CreateAccessGroupResponseBody) GetMembersCount() float64 { + if o == nil { + return 0.0 + } + return o.MembersCount +} + +func (o *CreateAccessGroupResponseBody) GetProjectsCount() float64 { + if o == nil { + return 0.0 + } + return o.ProjectsCount +} + +func (o *CreateAccessGroupResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateAccessGroupResponseBody) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *CreateAccessGroupResponseBody) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *CreateAccessGroupResponseBody) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *CreateAccessGroupResponseBody) GetAccessGroupID() string { + if o == nil { + return "" + } + return o.AccessGroupID +} + +type CreateAccessGroupResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CreateAccessGroupResponseBody +} + +func (o *CreateAccessGroupResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateAccessGroupResponse) GetObject() *CreateAccessGroupResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createaccessgroupproject.go b/src/__tests__/mockserver/internal/sdk/models/operations/createaccessgroupproject.go new file mode 100644 index 00000000..9dba0530 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createaccessgroupproject.go @@ -0,0 +1,196 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// CreateAccessGroupProjectRole - The project role that will be added to this Access Group. +type CreateAccessGroupProjectRole string + +const ( + CreateAccessGroupProjectRoleAdmin CreateAccessGroupProjectRole = "ADMIN" + CreateAccessGroupProjectRoleProjectViewer CreateAccessGroupProjectRole = "PROJECT_VIEWER" + CreateAccessGroupProjectRoleProjectDeveloper CreateAccessGroupProjectRole = "PROJECT_DEVELOPER" +) + +func (e CreateAccessGroupProjectRole) ToPointer() *CreateAccessGroupProjectRole { + return &e +} +func (e *CreateAccessGroupProjectRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_VIEWER": + fallthrough + case "PROJECT_DEVELOPER": + *e = CreateAccessGroupProjectRole(v) + return nil + default: + return fmt.Errorf("invalid value for CreateAccessGroupProjectRole: %v", v) + } +} + +type CreateAccessGroupProjectRequestBody struct { + // The ID of the project. + ProjectID string `json:"projectId"` + // The project role that will be added to this Access Group. + Role CreateAccessGroupProjectRole `json:"role"` +} + +func (o *CreateAccessGroupProjectRequestBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *CreateAccessGroupProjectRequestBody) GetRole() CreateAccessGroupProjectRole { + if o == nil { + return CreateAccessGroupProjectRole("") + } + return o.Role +} + +type CreateAccessGroupProjectRequest struct { + AccessGroupIDOrName string `pathParam:"style=simple,explode=false,name=accessGroupIdOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateAccessGroupProjectRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateAccessGroupProjectRequest) GetAccessGroupIDOrName() string { + if o == nil { + return "" + } + return o.AccessGroupIDOrName +} + +func (o *CreateAccessGroupProjectRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateAccessGroupProjectRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateAccessGroupProjectRequest) GetRequestBody() CreateAccessGroupProjectRequestBody { + if o == nil { + return CreateAccessGroupProjectRequestBody{} + } + return o.RequestBody +} + +type CreateAccessGroupProjectAccessGroupsRole string + +const ( + CreateAccessGroupProjectAccessGroupsRoleAdmin CreateAccessGroupProjectAccessGroupsRole = "ADMIN" + CreateAccessGroupProjectAccessGroupsRoleProjectDeveloper CreateAccessGroupProjectAccessGroupsRole = "PROJECT_DEVELOPER" + CreateAccessGroupProjectAccessGroupsRoleProjectViewer CreateAccessGroupProjectAccessGroupsRole = "PROJECT_VIEWER" +) + +func (e CreateAccessGroupProjectAccessGroupsRole) ToPointer() *CreateAccessGroupProjectAccessGroupsRole { + return &e +} +func (e *CreateAccessGroupProjectAccessGroupsRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = CreateAccessGroupProjectAccessGroupsRole(v) + return nil + default: + return fmt.Errorf("invalid value for CreateAccessGroupProjectAccessGroupsRole: %v", v) + } +} + +type CreateAccessGroupProjectResponseBody struct { + TeamID string `json:"teamId"` + AccessGroupID string `json:"accessGroupId"` + ProjectID string `json:"projectId"` + Role CreateAccessGroupProjectAccessGroupsRole `json:"role"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` +} + +func (o *CreateAccessGroupProjectResponseBody) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *CreateAccessGroupProjectResponseBody) GetAccessGroupID() string { + if o == nil { + return "" + } + return o.AccessGroupID +} + +func (o *CreateAccessGroupProjectResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *CreateAccessGroupProjectResponseBody) GetRole() CreateAccessGroupProjectAccessGroupsRole { + if o == nil { + return CreateAccessGroupProjectAccessGroupsRole("") + } + return o.Role +} + +func (o *CreateAccessGroupProjectResponseBody) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *CreateAccessGroupProjectResponseBody) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +type CreateAccessGroupProjectResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CreateAccessGroupProjectResponseBody +} + +func (o *CreateAccessGroupProjectResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateAccessGroupProjectResponse) GetObject() *CreateAccessGroupProjectResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createauthtoken.go b/src/__tests__/mockserver/internal/sdk/models/operations/createauthtoken.go new file mode 100644 index 00000000..16b66ffe --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createauthtoken.go @@ -0,0 +1,97 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateAuthTokenRequestBody struct { + Name string `json:"name"` + ExpiresAt *float64 `json:"expiresAt,omitempty"` +} + +func (o *CreateAuthTokenRequestBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateAuthTokenRequestBody) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +type CreateAuthTokenRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateAuthTokenRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateAuthTokenRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateAuthTokenRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateAuthTokenRequest) GetRequestBody() CreateAuthTokenRequestBody { + if o == nil { + return CreateAuthTokenRequestBody{} + } + return o.RequestBody +} + +// CreateAuthTokenResponseBody - Successful response. +type CreateAuthTokenResponseBody struct { + // Authentication token metadata. + Token components.AuthToken `json:"token"` + // The authentication token's actual value. This token is only provided in this response, and can never be retrieved again in the future. Be sure to save it somewhere safe! + BearerToken string `json:"bearerToken"` +} + +func (o *CreateAuthTokenResponseBody) GetToken() components.AuthToken { + if o == nil { + return components.AuthToken{} + } + return o.Token +} + +func (o *CreateAuthTokenResponseBody) GetBearerToken() string { + if o == nil { + return "" + } + return o.BearerToken +} + +type CreateAuthTokenResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + Object *CreateAuthTokenResponseBody +} + +func (o *CreateAuthTokenResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateAuthTokenResponse) GetObject() *CreateAuthTokenResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createcheck.go b/src/__tests__/mockserver/internal/sdk/models/operations/createcheck.go new file mode 100644 index 00000000..4b22af5e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createcheck.go @@ -0,0 +1,625 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type CreateCheckRequestBody struct { + // The name of the check being created + Name string `json:"name"` + // Path of the page that is being checked + Path *string `json:"path,omitempty"` + // Whether the check should block a deployment from succeeding + Blocking bool `json:"blocking"` + // URL to display for further details + DetailsURL *string `json:"detailsUrl,omitempty"` + // An identifier that can be used as an external reference + ExternalID *string `json:"externalId,omitempty"` + // Whether a user should be able to request for the check to be rerun if it fails + Rerequestable *bool `json:"rerequestable,omitempty"` +} + +func (o *CreateCheckRequestBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateCheckRequestBody) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +func (o *CreateCheckRequestBody) GetBlocking() bool { + if o == nil { + return false + } + return o.Blocking +} + +func (o *CreateCheckRequestBody) GetDetailsURL() *string { + if o == nil { + return nil + } + return o.DetailsURL +} + +func (o *CreateCheckRequestBody) GetExternalID() *string { + if o == nil { + return nil + } + return o.ExternalID +} + +func (o *CreateCheckRequestBody) GetRerequestable() *bool { + if o == nil { + return nil + } + return o.Rerequestable +} + +type CreateCheckRequest struct { + // The deployment to create the check for. + DeploymentID string `pathParam:"style=simple,explode=false,name=deploymentId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateCheckRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateCheckRequest) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *CreateCheckRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateCheckRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateCheckRequest) GetRequestBody() CreateCheckRequestBody { + if o == nil { + return CreateCheckRequestBody{} + } + return o.RequestBody +} + +type CreateCheckStatus string + +const ( + CreateCheckStatusRegistered CreateCheckStatus = "registered" + CreateCheckStatusRunning CreateCheckStatus = "running" + CreateCheckStatusCompleted CreateCheckStatus = "completed" +) + +func (e CreateCheckStatus) ToPointer() *CreateCheckStatus { + return &e +} +func (e *CreateCheckStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = CreateCheckStatus(v) + return nil + default: + return fmt.Errorf("invalid value for CreateCheckStatus: %v", v) + } +} + +type CreateCheckConclusion string + +const ( + CreateCheckConclusionCanceled CreateCheckConclusion = "canceled" + CreateCheckConclusionFailed CreateCheckConclusion = "failed" + CreateCheckConclusionNeutral CreateCheckConclusion = "neutral" + CreateCheckConclusionSucceeded CreateCheckConclusion = "succeeded" + CreateCheckConclusionSkipped CreateCheckConclusion = "skipped" + CreateCheckConclusionStale CreateCheckConclusion = "stale" +) + +func (e CreateCheckConclusion) ToPointer() *CreateCheckConclusion { + return &e +} +func (e *CreateCheckConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "canceled": + fallthrough + case "failed": + fallthrough + case "neutral": + fallthrough + case "succeeded": + fallthrough + case "skipped": + fallthrough + case "stale": + *e = CreateCheckConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for CreateCheckConclusion: %v", v) + } +} + +type CreateCheckSource string + +const ( + CreateCheckSourceWebVitals CreateCheckSource = "web-vitals" +) + +func (e CreateCheckSource) ToPointer() *CreateCheckSource { + return &e +} +func (e *CreateCheckSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = CreateCheckSource(v) + return nil + default: + return fmt.Errorf("invalid value for CreateCheckSource: %v", v) + } +} + +type CreateCheckFCP struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source CreateCheckSource `json:"source"` +} + +func (o *CreateCheckFCP) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *CreateCheckFCP) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *CreateCheckFCP) GetSource() CreateCheckSource { + if o == nil { + return CreateCheckSource("") + } + return o.Source +} + +type CreateCheckChecksSource string + +const ( + CreateCheckChecksSourceWebVitals CreateCheckChecksSource = "web-vitals" +) + +func (e CreateCheckChecksSource) ToPointer() *CreateCheckChecksSource { + return &e +} +func (e *CreateCheckChecksSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = CreateCheckChecksSource(v) + return nil + default: + return fmt.Errorf("invalid value for CreateCheckChecksSource: %v", v) + } +} + +type CreateCheckLCP struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source CreateCheckChecksSource `json:"source"` +} + +func (o *CreateCheckLCP) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *CreateCheckLCP) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *CreateCheckLCP) GetSource() CreateCheckChecksSource { + if o == nil { + return CreateCheckChecksSource("") + } + return o.Source +} + +type CreateCheckChecksResponseSource string + +const ( + CreateCheckChecksResponseSourceWebVitals CreateCheckChecksResponseSource = "web-vitals" +) + +func (e CreateCheckChecksResponseSource) ToPointer() *CreateCheckChecksResponseSource { + return &e +} +func (e *CreateCheckChecksResponseSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = CreateCheckChecksResponseSource(v) + return nil + default: + return fmt.Errorf("invalid value for CreateCheckChecksResponseSource: %v", v) + } +} + +type CreateCheckCLS struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source CreateCheckChecksResponseSource `json:"source"` +} + +func (o *CreateCheckCLS) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *CreateCheckCLS) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *CreateCheckCLS) GetSource() CreateCheckChecksResponseSource { + if o == nil { + return CreateCheckChecksResponseSource("") + } + return o.Source +} + +type CreateCheckChecksResponse200Source string + +const ( + CreateCheckChecksResponse200SourceWebVitals CreateCheckChecksResponse200Source = "web-vitals" +) + +func (e CreateCheckChecksResponse200Source) ToPointer() *CreateCheckChecksResponse200Source { + return &e +} +func (e *CreateCheckChecksResponse200Source) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = CreateCheckChecksResponse200Source(v) + return nil + default: + return fmt.Errorf("invalid value for CreateCheckChecksResponse200Source: %v", v) + } +} + +type CreateCheckTBT struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source CreateCheckChecksResponse200Source `json:"source"` +} + +func (o *CreateCheckTBT) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *CreateCheckTBT) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *CreateCheckTBT) GetSource() CreateCheckChecksResponse200Source { + if o == nil { + return CreateCheckChecksResponse200Source("") + } + return o.Source +} + +type CreateCheckChecksResponse200ApplicationJSONSource string + +const ( + CreateCheckChecksResponse200ApplicationJSONSourceWebVitals CreateCheckChecksResponse200ApplicationJSONSource = "web-vitals" +) + +func (e CreateCheckChecksResponse200ApplicationJSONSource) ToPointer() *CreateCheckChecksResponse200ApplicationJSONSource { + return &e +} +func (e *CreateCheckChecksResponse200ApplicationJSONSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = CreateCheckChecksResponse200ApplicationJSONSource(v) + return nil + default: + return fmt.Errorf("invalid value for CreateCheckChecksResponse200ApplicationJSONSource: %v", v) + } +} + +type CreateCheckVirtualExperienceScore struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source CreateCheckChecksResponse200ApplicationJSONSource `json:"source"` +} + +func (o *CreateCheckVirtualExperienceScore) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *CreateCheckVirtualExperienceScore) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *CreateCheckVirtualExperienceScore) GetSource() CreateCheckChecksResponse200ApplicationJSONSource { + if o == nil { + return CreateCheckChecksResponse200ApplicationJSONSource("") + } + return o.Source +} + +type CreateCheckMetrics struct { + Fcp CreateCheckFCP `json:"FCP"` + Lcp CreateCheckLCP `json:"LCP"` + Cls CreateCheckCLS `json:"CLS"` + Tbt CreateCheckTBT `json:"TBT"` + VirtualExperienceScore *CreateCheckVirtualExperienceScore `json:"virtualExperienceScore,omitempty"` +} + +func (o *CreateCheckMetrics) GetFcp() CreateCheckFCP { + if o == nil { + return CreateCheckFCP{} + } + return o.Fcp +} + +func (o *CreateCheckMetrics) GetLcp() CreateCheckLCP { + if o == nil { + return CreateCheckLCP{} + } + return o.Lcp +} + +func (o *CreateCheckMetrics) GetCls() CreateCheckCLS { + if o == nil { + return CreateCheckCLS{} + } + return o.Cls +} + +func (o *CreateCheckMetrics) GetTbt() CreateCheckTBT { + if o == nil { + return CreateCheckTBT{} + } + return o.Tbt +} + +func (o *CreateCheckMetrics) GetVirtualExperienceScore() *CreateCheckVirtualExperienceScore { + if o == nil { + return nil + } + return o.VirtualExperienceScore +} + +type CreateCheckOutput struct { + Metrics *CreateCheckMetrics `json:"metrics,omitempty"` +} + +func (o *CreateCheckOutput) GetMetrics() *CreateCheckMetrics { + if o == nil { + return nil + } + return o.Metrics +} + +type CreateCheckResponseBody struct { + ID string `json:"id"` + Name string `json:"name"` + Path *string `json:"path,omitempty"` + Status CreateCheckStatus `json:"status"` + Conclusion *CreateCheckConclusion `json:"conclusion,omitempty"` + Blocking bool `json:"blocking"` + Output *CreateCheckOutput `json:"output,omitempty"` + DetailsURL *string `json:"detailsUrl,omitempty"` + IntegrationID string `json:"integrationId"` + DeploymentID string `json:"deploymentId"` + ExternalID *string `json:"externalId,omitempty"` + CreatedAt float64 `json:"createdAt"` + UpdatedAt float64 `json:"updatedAt"` + StartedAt *float64 `json:"startedAt,omitempty"` + CompletedAt *float64 `json:"completedAt,omitempty"` + Rerequestable *bool `json:"rerequestable,omitempty"` +} + +func (o *CreateCheckResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateCheckResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateCheckResponseBody) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +func (o *CreateCheckResponseBody) GetStatus() CreateCheckStatus { + if o == nil { + return CreateCheckStatus("") + } + return o.Status +} + +func (o *CreateCheckResponseBody) GetConclusion() *CreateCheckConclusion { + if o == nil { + return nil + } + return o.Conclusion +} + +func (o *CreateCheckResponseBody) GetBlocking() bool { + if o == nil { + return false + } + return o.Blocking +} + +func (o *CreateCheckResponseBody) GetOutput() *CreateCheckOutput { + if o == nil { + return nil + } + return o.Output +} + +func (o *CreateCheckResponseBody) GetDetailsURL() *string { + if o == nil { + return nil + } + return o.DetailsURL +} + +func (o *CreateCheckResponseBody) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *CreateCheckResponseBody) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *CreateCheckResponseBody) GetExternalID() *string { + if o == nil { + return nil + } + return o.ExternalID +} + +func (o *CreateCheckResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateCheckResponseBody) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *CreateCheckResponseBody) GetStartedAt() *float64 { + if o == nil { + return nil + } + return o.StartedAt +} + +func (o *CreateCheckResponseBody) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *CreateCheckResponseBody) GetRerequestable() *bool { + if o == nil { + return nil + } + return o.Rerequestable +} + +type CreateCheckResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CreateCheckResponseBody +} + +func (o *CreateCheckResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateCheckResponse) GetObject() *CreateCheckResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createconfigurablelogdrain.go b/src/__tests__/mockserver/internal/sdk/models/operations/createconfigurablelogdrain.go new file mode 100644 index 00000000..5d71b12e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createconfigurablelogdrain.go @@ -0,0 +1,602 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// CreateConfigurableLogDrainDeliveryFormat - The delivery log format +type CreateConfigurableLogDrainDeliveryFormat string + +const ( + CreateConfigurableLogDrainDeliveryFormatJSON CreateConfigurableLogDrainDeliveryFormat = "json" + CreateConfigurableLogDrainDeliveryFormatNdjson CreateConfigurableLogDrainDeliveryFormat = "ndjson" +) + +func (e CreateConfigurableLogDrainDeliveryFormat) ToPointer() *CreateConfigurableLogDrainDeliveryFormat { + return &e +} +func (e *CreateConfigurableLogDrainDeliveryFormat) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "json": + fallthrough + case "ndjson": + *e = CreateConfigurableLogDrainDeliveryFormat(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainDeliveryFormat: %v", v) + } +} + +type CreateConfigurableLogDrainSources string + +const ( + CreateConfigurableLogDrainSourcesStatic CreateConfigurableLogDrainSources = "static" + CreateConfigurableLogDrainSourcesLambda CreateConfigurableLogDrainSources = "lambda" + CreateConfigurableLogDrainSourcesBuild CreateConfigurableLogDrainSources = "build" + CreateConfigurableLogDrainSourcesEdge CreateConfigurableLogDrainSources = "edge" + CreateConfigurableLogDrainSourcesExternal CreateConfigurableLogDrainSources = "external" + CreateConfigurableLogDrainSourcesFirewall CreateConfigurableLogDrainSources = "firewall" +) + +func (e CreateConfigurableLogDrainSources) ToPointer() *CreateConfigurableLogDrainSources { + return &e +} +func (e *CreateConfigurableLogDrainSources) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "static": + fallthrough + case "lambda": + fallthrough + case "build": + fallthrough + case "edge": + fallthrough + case "external": + fallthrough + case "firewall": + *e = CreateConfigurableLogDrainSources(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainSources: %v", v) + } +} + +type CreateConfigurableLogDrainEnvironments string + +const ( + CreateConfigurableLogDrainEnvironmentsPreview CreateConfigurableLogDrainEnvironments = "preview" + CreateConfigurableLogDrainEnvironmentsProduction CreateConfigurableLogDrainEnvironments = "production" +) + +func (e CreateConfigurableLogDrainEnvironments) ToPointer() *CreateConfigurableLogDrainEnvironments { + return &e +} +func (e *CreateConfigurableLogDrainEnvironments) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "preview": + fallthrough + case "production": + *e = CreateConfigurableLogDrainEnvironments(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainEnvironments: %v", v) + } +} + +type CreateConfigurableLogDrainRequestBody struct { + // The delivery log format + DeliveryFormat CreateConfigurableLogDrainDeliveryFormat `json:"deliveryFormat"` + // The log drain url + URL string `json:"url"` + // Headers to be sent together with the request + Headers map[string]string `json:"headers,omitempty"` + ProjectIds []string `json:"projectIds,omitempty"` + Sources []CreateConfigurableLogDrainSources `json:"sources"` + Environments []CreateConfigurableLogDrainEnvironments `json:"environments,omitempty"` + // Custom secret of log drain + Secret *string `json:"secret,omitempty"` + // The sampling rate for this log drain. It should be a percentage rate between 0 and 100. With max 2 decimal points + SamplingRate *float64 `json:"samplingRate,omitempty"` + // The custom name of this log drain. + Name *string `json:"name,omitempty"` +} + +func (o *CreateConfigurableLogDrainRequestBody) GetDeliveryFormat() CreateConfigurableLogDrainDeliveryFormat { + if o == nil { + return CreateConfigurableLogDrainDeliveryFormat("") + } + return o.DeliveryFormat +} + +func (o *CreateConfigurableLogDrainRequestBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateConfigurableLogDrainRequestBody) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *CreateConfigurableLogDrainRequestBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +func (o *CreateConfigurableLogDrainRequestBody) GetSources() []CreateConfigurableLogDrainSources { + if o == nil { + return []CreateConfigurableLogDrainSources{} + } + return o.Sources +} + +func (o *CreateConfigurableLogDrainRequestBody) GetEnvironments() []CreateConfigurableLogDrainEnvironments { + if o == nil { + return nil + } + return o.Environments +} + +func (o *CreateConfigurableLogDrainRequestBody) GetSecret() *string { + if o == nil { + return nil + } + return o.Secret +} + +func (o *CreateConfigurableLogDrainRequestBody) GetSamplingRate() *float64 { + if o == nil { + return nil + } + return o.SamplingRate +} + +func (o *CreateConfigurableLogDrainRequestBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +type CreateConfigurableLogDrainRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateConfigurableLogDrainRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateConfigurableLogDrainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateConfigurableLogDrainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateConfigurableLogDrainRequest) GetRequestBody() CreateConfigurableLogDrainRequestBody { + if o == nil { + return CreateConfigurableLogDrainRequestBody{} + } + return o.RequestBody +} + +type CreateConfigurableLogDrainLogDrainsDeliveryFormat string + +const ( + CreateConfigurableLogDrainLogDrainsDeliveryFormatJSON CreateConfigurableLogDrainLogDrainsDeliveryFormat = "json" + CreateConfigurableLogDrainLogDrainsDeliveryFormatNdjson CreateConfigurableLogDrainLogDrainsDeliveryFormat = "ndjson" + CreateConfigurableLogDrainLogDrainsDeliveryFormatSyslog CreateConfigurableLogDrainLogDrainsDeliveryFormat = "syslog" +) + +func (e CreateConfigurableLogDrainLogDrainsDeliveryFormat) ToPointer() *CreateConfigurableLogDrainLogDrainsDeliveryFormat { + return &e +} +func (e *CreateConfigurableLogDrainLogDrainsDeliveryFormat) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "json": + fallthrough + case "ndjson": + fallthrough + case "syslog": + *e = CreateConfigurableLogDrainLogDrainsDeliveryFormat(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainLogDrainsDeliveryFormat: %v", v) + } +} + +type CreateConfigurableLogDrainLogDrainsSources string + +const ( + CreateConfigurableLogDrainLogDrainsSourcesBuild CreateConfigurableLogDrainLogDrainsSources = "build" + CreateConfigurableLogDrainLogDrainsSourcesEdge CreateConfigurableLogDrainLogDrainsSources = "edge" + CreateConfigurableLogDrainLogDrainsSourcesLambda CreateConfigurableLogDrainLogDrainsSources = "lambda" + CreateConfigurableLogDrainLogDrainsSourcesStatic CreateConfigurableLogDrainLogDrainsSources = "static" + CreateConfigurableLogDrainLogDrainsSourcesExternal CreateConfigurableLogDrainLogDrainsSources = "external" + CreateConfigurableLogDrainLogDrainsSourcesFirewall CreateConfigurableLogDrainLogDrainsSources = "firewall" +) + +func (e CreateConfigurableLogDrainLogDrainsSources) ToPointer() *CreateConfigurableLogDrainLogDrainsSources { + return &e +} +func (e *CreateConfigurableLogDrainLogDrainsSources) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "build": + fallthrough + case "edge": + fallthrough + case "lambda": + fallthrough + case "static": + fallthrough + case "external": + fallthrough + case "firewall": + *e = CreateConfigurableLogDrainLogDrainsSources(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainLogDrainsSources: %v", v) + } +} + +type CreateConfigurableLogDrainLogDrainsEnvironments string + +const ( + CreateConfigurableLogDrainLogDrainsEnvironmentsProduction CreateConfigurableLogDrainLogDrainsEnvironments = "production" + CreateConfigurableLogDrainLogDrainsEnvironmentsPreview CreateConfigurableLogDrainLogDrainsEnvironments = "preview" +) + +func (e CreateConfigurableLogDrainLogDrainsEnvironments) ToPointer() *CreateConfigurableLogDrainLogDrainsEnvironments { + return &e +} +func (e *CreateConfigurableLogDrainLogDrainsEnvironments) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + *e = CreateConfigurableLogDrainLogDrainsEnvironments(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainLogDrainsEnvironments: %v", v) + } +} + +type CreateConfigurableLogDrainStatus string + +const ( + CreateConfigurableLogDrainStatusEnabled CreateConfigurableLogDrainStatus = "enabled" + CreateConfigurableLogDrainStatusDisabled CreateConfigurableLogDrainStatus = "disabled" + CreateConfigurableLogDrainStatusErrored CreateConfigurableLogDrainStatus = "errored" +) + +func (e CreateConfigurableLogDrainStatus) ToPointer() *CreateConfigurableLogDrainStatus { + return &e +} +func (e *CreateConfigurableLogDrainStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "enabled": + fallthrough + case "disabled": + fallthrough + case "errored": + *e = CreateConfigurableLogDrainStatus(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainStatus: %v", v) + } +} + +type CreateConfigurableLogDrainDisabledReason string + +const ( + CreateConfigurableLogDrainDisabledReasonDisabledByOwner CreateConfigurableLogDrainDisabledReason = "disabled-by-owner" + CreateConfigurableLogDrainDisabledReasonFeatureNotAvailable CreateConfigurableLogDrainDisabledReason = "feature-not-available" + CreateConfigurableLogDrainDisabledReasonAccountPlanDowngrade CreateConfigurableLogDrainDisabledReason = "account-plan-downgrade" + CreateConfigurableLogDrainDisabledReasonDisabledByAdmin CreateConfigurableLogDrainDisabledReason = "disabled-by-admin" +) + +func (e CreateConfigurableLogDrainDisabledReason) ToPointer() *CreateConfigurableLogDrainDisabledReason { + return &e +} +func (e *CreateConfigurableLogDrainDisabledReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "disabled-by-owner": + fallthrough + case "feature-not-available": + fallthrough + case "account-plan-downgrade": + fallthrough + case "disabled-by-admin": + *e = CreateConfigurableLogDrainDisabledReason(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainDisabledReason: %v", v) + } +} + +type CreateConfigurableLogDrainCreatedFrom string + +const ( + CreateConfigurableLogDrainCreatedFromSelfServed CreateConfigurableLogDrainCreatedFrom = "self-served" +) + +func (e CreateConfigurableLogDrainCreatedFrom) ToPointer() *CreateConfigurableLogDrainCreatedFrom { + return &e +} +func (e *CreateConfigurableLogDrainCreatedFrom) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "self-served": + *e = CreateConfigurableLogDrainCreatedFrom(v) + return nil + default: + return fmt.Errorf("invalid value for CreateConfigurableLogDrainCreatedFrom: %v", v) + } +} + +type CreateConfigurableLogDrainResponseBody struct { + // The secret to validate the log-drain payload + Secret *string `json:"secret,omitempty"` + ID string `json:"id"` + DeliveryFormat CreateConfigurableLogDrainLogDrainsDeliveryFormat `json:"deliveryFormat"` + URL string `json:"url"` + Name string `json:"name"` + ClientID *string `json:"clientId,omitempty"` + ConfigurationID *string `json:"configurationId,omitempty"` + TeamID *string `json:"teamId,omitempty"` + OwnerID string `json:"ownerId"` + ProjectIds []string `json:"projectIds,omitempty"` + CreatedAt float64 `json:"createdAt"` + DeletedAt *float64 `json:"deletedAt"` + UpdatedAt float64 `json:"updatedAt"` + Sources []CreateConfigurableLogDrainLogDrainsSources `json:"sources,omitempty"` + Headers map[string]string `json:"headers,omitempty"` + Environments []CreateConfigurableLogDrainLogDrainsEnvironments `json:"environments"` + Status *CreateConfigurableLogDrainStatus `json:"status,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + DisabledReason *CreateConfigurableLogDrainDisabledReason `json:"disabledReason,omitempty"` + DisabledBy *string `json:"disabledBy,omitempty"` + FirstErrorTimestamp *float64 `json:"firstErrorTimestamp,omitempty"` + SamplingRate *float64 `json:"samplingRate,omitempty"` + HideIPAddresses *bool `json:"hideIpAddresses,omitempty"` + CreatedFrom *CreateConfigurableLogDrainCreatedFrom `json:"createdFrom,omitempty"` +} + +func (o *CreateConfigurableLogDrainResponseBody) GetSecret() *string { + if o == nil { + return nil + } + return o.Secret +} + +func (o *CreateConfigurableLogDrainResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateConfigurableLogDrainResponseBody) GetDeliveryFormat() CreateConfigurableLogDrainLogDrainsDeliveryFormat { + if o == nil { + return CreateConfigurableLogDrainLogDrainsDeliveryFormat("") + } + return o.DeliveryFormat +} + +func (o *CreateConfigurableLogDrainResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateConfigurableLogDrainResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateConfigurableLogDrainResponseBody) GetClientID() *string { + if o == nil { + return nil + } + return o.ClientID +} + +func (o *CreateConfigurableLogDrainResponseBody) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *CreateConfigurableLogDrainResponseBody) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateConfigurableLogDrainResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *CreateConfigurableLogDrainResponseBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +func (o *CreateConfigurableLogDrainResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateConfigurableLogDrainResponseBody) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *CreateConfigurableLogDrainResponseBody) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *CreateConfigurableLogDrainResponseBody) GetSources() []CreateConfigurableLogDrainLogDrainsSources { + if o == nil { + return nil + } + return o.Sources +} + +func (o *CreateConfigurableLogDrainResponseBody) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *CreateConfigurableLogDrainResponseBody) GetEnvironments() []CreateConfigurableLogDrainLogDrainsEnvironments { + if o == nil { + return []CreateConfigurableLogDrainLogDrainsEnvironments{} + } + return o.Environments +} + +func (o *CreateConfigurableLogDrainResponseBody) GetStatus() *CreateConfigurableLogDrainStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *CreateConfigurableLogDrainResponseBody) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *CreateConfigurableLogDrainResponseBody) GetDisabledReason() *CreateConfigurableLogDrainDisabledReason { + if o == nil { + return nil + } + return o.DisabledReason +} + +func (o *CreateConfigurableLogDrainResponseBody) GetDisabledBy() *string { + if o == nil { + return nil + } + return o.DisabledBy +} + +func (o *CreateConfigurableLogDrainResponseBody) GetFirstErrorTimestamp() *float64 { + if o == nil { + return nil + } + return o.FirstErrorTimestamp +} + +func (o *CreateConfigurableLogDrainResponseBody) GetSamplingRate() *float64 { + if o == nil { + return nil + } + return o.SamplingRate +} + +func (o *CreateConfigurableLogDrainResponseBody) GetHideIPAddresses() *bool { + if o == nil { + return nil + } + return o.HideIPAddresses +} + +func (o *CreateConfigurableLogDrainResponseBody) GetCreatedFrom() *CreateConfigurableLogDrainCreatedFrom { + if o == nil { + return nil + } + return o.CreatedFrom +} + +type CreateConfigurableLogDrainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CreateConfigurableLogDrainResponseBody +} + +func (o *CreateConfigurableLogDrainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateConfigurableLogDrainResponse) GetObject() *CreateConfigurableLogDrainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createdeployment.go b/src/__tests__/mockserver/internal/sdk/models/operations/createdeployment.go new file mode 100644 index 00000000..87ab9e9d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createdeployment.go @@ -0,0 +1,5825 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// ForceNew - Forces a new deployment even if there is a previous similar deployment +type ForceNew string + +const ( + ForceNewZero ForceNew = "0" + ForceNewOne ForceNew = "1" +) + +func (e ForceNew) ToPointer() *ForceNew { + return &e +} +func (e *ForceNew) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "0": + fallthrough + case "1": + *e = ForceNew(v) + return nil + default: + return fmt.Errorf("invalid value for ForceNew: %v", v) + } +} + +// SkipAutoDetectionConfirmation - Allows to skip framework detection so the API would not fail to ask for confirmation +type SkipAutoDetectionConfirmation string + +const ( + SkipAutoDetectionConfirmationZero SkipAutoDetectionConfirmation = "0" + SkipAutoDetectionConfirmationOne SkipAutoDetectionConfirmation = "1" +) + +func (e SkipAutoDetectionConfirmation) ToPointer() *SkipAutoDetectionConfirmation { + return &e +} +func (e *SkipAutoDetectionConfirmation) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "0": + fallthrough + case "1": + *e = SkipAutoDetectionConfirmation(v) + return nil + default: + return fmt.Errorf("invalid value for SkipAutoDetectionConfirmation: %v", v) + } +} + +// UploadedFile - Used in the case you want to reference a file that was already uploaded +type UploadedFile struct { + // The file path relative to the project root + File string `json:"file"` + // The file contents hashed with SHA1, used to check the integrity + Sha *string `json:"sha,omitempty"` + // The file size in bytes + Size *int64 `json:"size,omitempty"` +} + +func (o *UploadedFile) GetFile() string { + if o == nil { + return "" + } + return o.File +} + +func (o *UploadedFile) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *UploadedFile) GetSize() *int64 { + if o == nil { + return nil + } + return o.Size +} + +// Encoding - The file content encoding, it could be either a base64 (useful for images, etc.) of the files or the plain text for source code. +type Encoding string + +const ( + EncodingBase64 Encoding = "base64" + EncodingUTF8 Encoding = "utf-8" +) + +func (e Encoding) ToPointer() *Encoding { + return &e +} +func (e *Encoding) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "base64": + fallthrough + case "utf-8": + *e = Encoding(v) + return nil + default: + return fmt.Errorf("invalid value for Encoding: %v", v) + } +} + +// InlinedFile - Used in the case you want to inline a file inside the request +type InlinedFile struct { + // The file content, it could be either a `base64` (useful for images, etc.) of the files or the plain content for source code + Data string `json:"data"` + // The file content encoding, it could be either a base64 (useful for images, etc.) of the files or the plain text for source code. + Encoding *Encoding `json:"encoding,omitempty"` + // The file name including the whole path + File string `json:"file"` +} + +func (o *InlinedFile) GetData() string { + if o == nil { + return "" + } + return o.Data +} + +func (o *InlinedFile) GetEncoding() *Encoding { + if o == nil { + return nil + } + return o.Encoding +} + +func (o *InlinedFile) GetFile() string { + if o == nil { + return "" + } + return o.File +} + +type FilesType string + +const ( + FilesTypeInlinedFile FilesType = "InlinedFile" + FilesTypeUploadedFile FilesType = "UploadedFile" +) + +type Files struct { + InlinedFile *InlinedFile + UploadedFile *UploadedFile + + Type FilesType +} + +func CreateFilesInlinedFile(inlinedFile InlinedFile) Files { + typ := FilesTypeInlinedFile + + return Files{ + InlinedFile: &inlinedFile, + Type: typ, + } +} + +func CreateFilesUploadedFile(uploadedFile UploadedFile) Files { + typ := FilesTypeUploadedFile + + return Files{ + UploadedFile: &uploadedFile, + Type: typ, + } +} + +func (u *Files) UnmarshalJSON(data []byte) error { + + var inlinedFile InlinedFile = InlinedFile{} + if err := utils.UnmarshalJSON(data, &inlinedFile, "", true, true); err == nil { + u.InlinedFile = &inlinedFile + u.Type = FilesTypeInlinedFile + return nil + } + + var uploadedFile UploadedFile = UploadedFile{} + if err := utils.UnmarshalJSON(data, &uploadedFile, "", true, true); err == nil { + u.UploadedFile = &uploadedFile + u.Type = FilesTypeUploadedFile + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Files", string(data)) +} + +func (u Files) MarshalJSON() ([]byte, error) { + if u.InlinedFile != nil { + return utils.MarshalJSON(u.InlinedFile, "", true) + } + + if u.UploadedFile != nil { + return utils.MarshalJSON(u.UploadedFile, "", true) + } + + return nil, errors.New("could not marshal union type Files: all fields are null") +} + +// GitMetadata - Populates initial git metadata for different git providers. +type GitMetadata struct { + // The git repository's remote origin url + RemoteURL *string `json:"remoteUrl,omitempty"` + // The name of the author of the commit + CommitAuthorName *string `json:"commitAuthorName,omitempty"` + // The commit message + CommitMessage *string `json:"commitMessage,omitempty"` + // The branch on which the commit was made + CommitRef *string `json:"commitRef,omitempty"` + // The hash of the commit + CommitSha *string `json:"commitSha,omitempty"` + // Whether or not there have been modifications to the working tree since the latest commit + Dirty *bool `json:"dirty,omitempty"` +} + +func (o *GitMetadata) GetRemoteURL() *string { + if o == nil { + return nil + } + return o.RemoteURL +} + +func (o *GitMetadata) GetCommitAuthorName() *string { + if o == nil { + return nil + } + return o.CommitAuthorName +} + +func (o *GitMetadata) GetCommitMessage() *string { + if o == nil { + return nil + } + return o.CommitMessage +} + +func (o *GitMetadata) GetCommitRef() *string { + if o == nil { + return nil + } + return o.CommitRef +} + +func (o *GitMetadata) GetCommitSha() *string { + if o == nil { + return nil + } + return o.CommitSha +} + +func (o *GitMetadata) GetDirty() *bool { + if o == nil { + return nil + } + return o.Dirty +} + +type CreateDeploymentGitSourceDeploymentsRequestType string + +const ( + CreateDeploymentGitSourceDeploymentsRequestTypeBitbucket CreateDeploymentGitSourceDeploymentsRequestType = "bitbucket" +) + +func (e CreateDeploymentGitSourceDeploymentsRequestType) ToPointer() *CreateDeploymentGitSourceDeploymentsRequestType { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsRequestType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CreateDeploymentGitSourceDeploymentsRequestType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsRequestType: %v", v) + } +} + +type Five struct { + Owner string `json:"owner"` + Ref string `json:"ref"` + Sha *string `json:"sha,omitempty"` + Slug string `json:"slug"` + Type CreateDeploymentGitSourceDeploymentsRequestType `json:"type"` +} + +func (o *Five) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *Five) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *Five) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *Five) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *Five) GetType() CreateDeploymentGitSourceDeploymentsRequestType { + if o == nil { + return CreateDeploymentGitSourceDeploymentsRequestType("") + } + return o.Type +} + +type CreateDeploymentGitSourceDeploymentsType string + +const ( + CreateDeploymentGitSourceDeploymentsTypeBitbucket CreateDeploymentGitSourceDeploymentsType = "bitbucket" +) + +func (e CreateDeploymentGitSourceDeploymentsType) ToPointer() *CreateDeploymentGitSourceDeploymentsType { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CreateDeploymentGitSourceDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsType: %v", v) + } +} + +type Four struct { + Ref string `json:"ref"` + RepoUUID string `json:"repoUuid"` + Sha *string `json:"sha,omitempty"` + Type CreateDeploymentGitSourceDeploymentsType `json:"type"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` +} + +func (o *Four) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *Four) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +func (o *Four) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *Four) GetType() CreateDeploymentGitSourceDeploymentsType { + if o == nil { + return CreateDeploymentGitSourceDeploymentsType("") + } + return o.Type +} + +func (o *Four) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +type ProjectIDType string + +const ( + ProjectIDTypeNumber ProjectIDType = "number" + ProjectIDTypeStr ProjectIDType = "str" +) + +type ProjectID struct { + Number *float64 + Str *string + + Type ProjectIDType +} + +func CreateProjectIDNumber(number float64) ProjectID { + typ := ProjectIDTypeNumber + + return ProjectID{ + Number: &number, + Type: typ, + } +} + +func CreateProjectIDStr(str string) ProjectID { + typ := ProjectIDTypeStr + + return ProjectID{ + Str: &str, + Type: typ, + } +} + +func (u *ProjectID) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = ProjectIDTypeNumber + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = ProjectIDTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ProjectID", string(data)) +} + +func (u ProjectID) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + return nil, errors.New("could not marshal union type ProjectID: all fields are null") +} + +type CreateDeploymentGitSourceType string + +const ( + CreateDeploymentGitSourceTypeGitlab CreateDeploymentGitSourceType = "gitlab" +) + +func (e CreateDeploymentGitSourceType) ToPointer() *CreateDeploymentGitSourceType { + return &e +} +func (e *CreateDeploymentGitSourceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = CreateDeploymentGitSourceType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceType: %v", v) + } +} + +type Three struct { + ProjectID ProjectID `json:"projectId"` + Ref string `json:"ref"` + Sha *string `json:"sha,omitempty"` + Type CreateDeploymentGitSourceType `json:"type"` +} + +func (o *Three) GetProjectID() ProjectID { + if o == nil { + return ProjectID{} + } + return o.ProjectID +} + +func (o *Three) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *Three) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *Three) GetType() CreateDeploymentGitSourceType { + if o == nil { + return CreateDeploymentGitSourceType("") + } + return o.Type +} + +type GitSourceType string + +const ( + GitSourceTypeGithub GitSourceType = "github" +) + +func (e GitSourceType) ToPointer() *GitSourceType { + return &e +} +func (e *GitSourceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GitSourceType(v) + return nil + default: + return fmt.Errorf("invalid value for GitSourceType: %v", v) + } +} + +type Two struct { + Org string `json:"org"` + Ref string `json:"ref"` + Repo string `json:"repo"` + Sha *string `json:"sha,omitempty"` + Type GitSourceType `json:"type"` +} + +func (o *Two) GetOrg() string { + if o == nil { + return "" + } + return o.Org +} + +func (o *Two) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *Two) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *Two) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *Two) GetType() GitSourceType { + if o == nil { + return GitSourceType("") + } + return o.Type +} + +type RepoIDType string + +const ( + RepoIDTypeNumber RepoIDType = "number" + RepoIDTypeStr RepoIDType = "str" +) + +type RepoID struct { + Number *float64 + Str *string + + Type RepoIDType +} + +func CreateRepoIDNumber(number float64) RepoID { + typ := RepoIDTypeNumber + + return RepoID{ + Number: &number, + Type: typ, + } +} + +func CreateRepoIDStr(str string) RepoID { + typ := RepoIDTypeStr + + return RepoID{ + Str: &str, + Type: typ, + } +} + +func (u *RepoID) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = RepoIDTypeNumber + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = RepoIDTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RepoID", string(data)) +} + +func (u RepoID) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + return nil, errors.New("could not marshal union type RepoID: all fields are null") +} + +type Type string + +const ( + TypeGithub Type = "github" +) + +func (e Type) ToPointer() *Type { + return &e +} +func (e *Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = Type(v) + return nil + default: + return fmt.Errorf("invalid value for Type: %v", v) + } +} + +type One struct { + Ref string `json:"ref"` + RepoID RepoID `json:"repoId"` + Sha *string `json:"sha,omitempty"` + Type Type `json:"type"` +} + +func (o *One) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *One) GetRepoID() RepoID { + if o == nil { + return RepoID{} + } + return o.RepoID +} + +func (o *One) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *One) GetType() Type { + if o == nil { + return Type("") + } + return o.Type +} + +type GitSourceUnionType string + +const ( + GitSourceUnionTypeOne GitSourceUnionType = "1" + GitSourceUnionTypeTwo GitSourceUnionType = "2" + GitSourceUnionTypeThree GitSourceUnionType = "3" + GitSourceUnionTypeFour GitSourceUnionType = "4" + GitSourceUnionTypeFive GitSourceUnionType = "5" +) + +// GitSource - Defines the Git Repository source to be deployed. This property can not be used in combination with `files`. +type GitSource struct { + One *One + Two *Two + Three *Three + Four *Four + Five *Five + + Type GitSourceUnionType +} + +func CreateGitSourceOne(one One) GitSource { + typ := GitSourceUnionTypeOne + + return GitSource{ + One: &one, + Type: typ, + } +} + +func CreateGitSourceTwo(two Two) GitSource { + typ := GitSourceUnionTypeTwo + + return GitSource{ + Two: &two, + Type: typ, + } +} + +func CreateGitSourceThree(three Three) GitSource { + typ := GitSourceUnionTypeThree + + return GitSource{ + Three: &three, + Type: typ, + } +} + +func CreateGitSourceFour(four Four) GitSource { + typ := GitSourceUnionTypeFour + + return GitSource{ + Four: &four, + Type: typ, + } +} + +func CreateGitSourceFive(five Five) GitSource { + typ := GitSourceUnionTypeFive + + return GitSource{ + Five: &five, + Type: typ, + } +} + +func (u *GitSource) UnmarshalJSON(data []byte) error { + + var one One = One{} + if err := utils.UnmarshalJSON(data, &one, "", true, true); err == nil { + u.One = &one + u.Type = GitSourceUnionTypeOne + return nil + } + + var three Three = Three{} + if err := utils.UnmarshalJSON(data, &three, "", true, true); err == nil { + u.Three = &three + u.Type = GitSourceUnionTypeThree + return nil + } + + var two Two = Two{} + if err := utils.UnmarshalJSON(data, &two, "", true, true); err == nil { + u.Two = &two + u.Type = GitSourceUnionTypeTwo + return nil + } + + var four Four = Four{} + if err := utils.UnmarshalJSON(data, &four, "", true, true); err == nil { + u.Four = &four + u.Type = GitSourceUnionTypeFour + return nil + } + + var five Five = Five{} + if err := utils.UnmarshalJSON(data, &five, "", true, true); err == nil { + u.Five = &five + u.Type = GitSourceUnionTypeFive + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GitSource", string(data)) +} + +func (u GitSource) MarshalJSON() ([]byte, error) { + if u.One != nil { + return utils.MarshalJSON(u.One, "", true) + } + + if u.Two != nil { + return utils.MarshalJSON(u.Two, "", true) + } + + if u.Three != nil { + return utils.MarshalJSON(u.Three, "", true) + } + + if u.Four != nil { + return utils.MarshalJSON(u.Four, "", true) + } + + if u.Five != nil { + return utils.MarshalJSON(u.Five, "", true) + } + + return nil, errors.New("could not marshal union type GitSource: all fields are null") +} + +// Framework - The framework that is being used for this project. When `null` is used no framework is selected +type Framework string + +const ( + FrameworkBlitzjs Framework = "blitzjs" + FrameworkNextjs Framework = "nextjs" + FrameworkGatsby Framework = "gatsby" + FrameworkRemix Framework = "remix" + FrameworkAstro Framework = "astro" + FrameworkHexo Framework = "hexo" + FrameworkEleventy Framework = "eleventy" + FrameworkDocusaurus2 Framework = "docusaurus-2" + FrameworkDocusaurus Framework = "docusaurus" + FrameworkPreact Framework = "preact" + FrameworkSolidstart1 Framework = "solidstart-1" + FrameworkSolidstart Framework = "solidstart" + FrameworkDojo Framework = "dojo" + FrameworkEmber Framework = "ember" + FrameworkVue Framework = "vue" + FrameworkScully Framework = "scully" + FrameworkIonicAngular Framework = "ionic-angular" + FrameworkAngular Framework = "angular" + FrameworkPolymer Framework = "polymer" + FrameworkSvelte Framework = "svelte" + FrameworkSveltekit Framework = "sveltekit" + FrameworkSveltekit1 Framework = "sveltekit-1" + FrameworkIonicReact Framework = "ionic-react" + FrameworkCreateReactApp Framework = "create-react-app" + FrameworkGridsome Framework = "gridsome" + FrameworkUmijs Framework = "umijs" + FrameworkSapper Framework = "sapper" + FrameworkSaber Framework = "saber" + FrameworkStencil Framework = "stencil" + FrameworkNuxtjs Framework = "nuxtjs" + FrameworkRedwoodjs Framework = "redwoodjs" + FrameworkHugo Framework = "hugo" + FrameworkJekyll Framework = "jekyll" + FrameworkBrunch Framework = "brunch" + FrameworkMiddleman Framework = "middleman" + FrameworkZola Framework = "zola" + FrameworkHydrogen Framework = "hydrogen" + FrameworkVite Framework = "vite" + FrameworkVitepress Framework = "vitepress" + FrameworkVuepress Framework = "vuepress" + FrameworkParcel Framework = "parcel" + FrameworkFasthtml Framework = "fasthtml" + FrameworkSanityV3 Framework = "sanity-v3" + FrameworkSanity Framework = "sanity" + FrameworkStorybook Framework = "storybook" +) + +func (e Framework) ToPointer() *Framework { + return &e +} +func (e *Framework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = Framework(v) + return nil + default: + return fmt.Errorf("invalid value for Framework: %v", v) + } +} + +// NodeVersion - Override the Node.js version that should be used for this deployment +type NodeVersion string + +const ( + NodeVersionTwentyTwoX NodeVersion = "22.x" + NodeVersionTwentyX NodeVersion = "20.x" + NodeVersionEighteenX NodeVersion = "18.x" + NodeVersionSixteenX NodeVersion = "16.x" + NodeVersionFourteenX NodeVersion = "14.x" + NodeVersionTwelveX NodeVersion = "12.x" + NodeVersionTenX NodeVersion = "10.x" + NodeVersionEight10X NodeVersion = "8.10.x" +) + +func (e NodeVersion) ToPointer() *NodeVersion { + return &e +} +func (e *NodeVersion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "22.x": + fallthrough + case "20.x": + fallthrough + case "18.x": + fallthrough + case "16.x": + fallthrough + case "14.x": + fallthrough + case "12.x": + fallthrough + case "10.x": + fallthrough + case "8.10.x": + *e = NodeVersion(v) + return nil + default: + return fmt.Errorf("invalid value for NodeVersion: %v", v) + } +} + +// ProjectSettings - Project settings that will be applied to the deployment. It is required for the first deployment of a project and will be saved for any following deployments +type ProjectSettings struct { + // The build command for this project. When `null` is used this value will be automatically detected + BuildCommand *string `json:"buildCommand,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + // The dev command for this project. When `null` is used this value will be automatically detected + DevCommand *string `json:"devCommand,omitempty"` + // The framework that is being used for this project. When `null` is used no framework is selected + Framework *Framework `json:"framework,omitempty"` + // The install command for this project. When `null` is used this value will be automatically detected + InstallCommand *string `json:"installCommand,omitempty"` + // Override the Node.js version that should be used for this deployment + NodeVersion *NodeVersion `json:"nodeVersion,omitempty"` + // The output directory of the project. When `null` is used this value will be automatically detected + OutputDirectory *string `json:"outputDirectory,omitempty"` + // The name of a directory or relative path to the source code of your project. When `null` is used it will default to the project root + RootDirectory *string `json:"rootDirectory,omitempty"` + // The region to deploy Serverless Functions in this project + ServerlessFunctionRegion *string `json:"serverlessFunctionRegion,omitempty"` + // Opts-out of the message prompting a CLI user to connect a Git repository in `vercel link`. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + SkipGitConnectDuringLink *bool `json:"skipGitConnectDuringLink,omitempty"` + // Indicates if there are source files outside of the root directory, typically used for monorepos + SourceFilesOutsideRootDirectory *bool `json:"sourceFilesOutsideRootDirectory,omitempty"` +} + +func (o *ProjectSettings) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *ProjectSettings) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *ProjectSettings) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *ProjectSettings) GetFramework() *Framework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *ProjectSettings) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *ProjectSettings) GetNodeVersion() *NodeVersion { + if o == nil { + return nil + } + return o.NodeVersion +} + +func (o *ProjectSettings) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *ProjectSettings) GetRootDirectory() *string { + if o == nil { + return nil + } + return o.RootDirectory +} + +func (o *ProjectSettings) GetServerlessFunctionRegion() *string { + if o == nil { + return nil + } + return o.ServerlessFunctionRegion +} + +func (o *ProjectSettings) GetSkipGitConnectDuringLink() *bool { + if o == nil { + return nil + } + return o.SkipGitConnectDuringLink +} + +func (o *ProjectSettings) GetSourceFilesOutsideRootDirectory() *bool { + if o == nil { + return nil + } + return o.SourceFilesOutsideRootDirectory +} + +// Target - Either not defined, `staging`, or `production`. If `staging`, a staging alias in the format `-.vercel.app` will be assigned. If `production`, any aliases defined in `alias` will be assigned. If omitted, the target will be `preview` +type Target string + +const ( + TargetStaging Target = "staging" + TargetProduction Target = "production" +) + +func (e Target) ToPointer() *Target { + return &e +} +func (e *Target) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "staging": + fallthrough + case "production": + *e = Target(v) + return nil + default: + return fmt.Errorf("invalid value for Target: %v", v) + } +} + +type CreateDeploymentRequestBody struct { + // Deploy to a custom environment, which will override the default environment + CustomEnvironmentSlugOrID *string `json:"customEnvironmentSlugOrId,omitempty"` + // An deployment id for an existing deployment to redeploy + DeploymentID *string `json:"deploymentId,omitempty"` + // A list of objects with the files to be deployed + Files []Files `json:"files,omitempty"` + // Populates initial git metadata for different git providers. + GitMetadata *GitMetadata `json:"gitMetadata,omitempty"` + // Defines the Git Repository source to be deployed. This property can not be used in combination with `files`. + GitSource *GitSource `json:"gitSource,omitempty"` + // An object containing the deployment's metadata. Multiple key-value pairs can be attached to a deployment + Meta map[string]string `json:"meta,omitempty"` + // The monorepo manager that is being used for this deployment. When `null` is used no monorepo manager is selected + MonorepoManager *string `json:"monorepoManager,omitempty"` + // A string with the project name used in the deployment URL + Name string `json:"name"` + // The target project identifier in which the deployment will be created. When defined, this parameter overrides name + Project *string `json:"project,omitempty"` + // Project settings that will be applied to the deployment. It is required for the first deployment of a project and will be saved for any following deployments + ProjectSettings *ProjectSettings `json:"projectSettings,omitempty"` + // Either not defined, `staging`, or `production`. If `staging`, a staging alias in the format `-.vercel.app` will be assigned. If `production`, any aliases defined in `alias` will be assigned. If omitted, the target will be `preview` + Target *Target `json:"target,omitempty"` + // When `true` and `deploymentId` is passed in, the sha from the previous deployment's `gitSource` is removed forcing the latest commit to be used. + WithLatestCommit *bool `json:"withLatestCommit,omitempty"` +} + +func (o *CreateDeploymentRequestBody) GetCustomEnvironmentSlugOrID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentSlugOrID +} + +func (o *CreateDeploymentRequestBody) GetDeploymentID() *string { + if o == nil { + return nil + } + return o.DeploymentID +} + +func (o *CreateDeploymentRequestBody) GetFiles() []Files { + if o == nil { + return nil + } + return o.Files +} + +func (o *CreateDeploymentRequestBody) GetGitMetadata() *GitMetadata { + if o == nil { + return nil + } + return o.GitMetadata +} + +func (o *CreateDeploymentRequestBody) GetGitSource() *GitSource { + if o == nil { + return nil + } + return o.GitSource +} + +func (o *CreateDeploymentRequestBody) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *CreateDeploymentRequestBody) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *CreateDeploymentRequestBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateDeploymentRequestBody) GetProject() *string { + if o == nil { + return nil + } + return o.Project +} + +func (o *CreateDeploymentRequestBody) GetProjectSettings() *ProjectSettings { + if o == nil { + return nil + } + return o.ProjectSettings +} + +func (o *CreateDeploymentRequestBody) GetTarget() *Target { + if o == nil { + return nil + } + return o.Target +} + +func (o *CreateDeploymentRequestBody) GetWithLatestCommit() *bool { + if o == nil { + return nil + } + return o.WithLatestCommit +} + +type CreateDeploymentRequest struct { + // Forces a new deployment even if there is a previous similar deployment + ForceNew *ForceNew `queryParam:"style=form,explode=true,name=forceNew"` + // Allows to skip framework detection so the API would not fail to ask for confirmation + SkipAutoDetectionConfirmation *SkipAutoDetectionConfirmation `queryParam:"style=form,explode=true,name=skipAutoDetectionConfirmation"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateDeploymentRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateDeploymentRequest) GetForceNew() *ForceNew { + if o == nil { + return nil + } + return o.ForceNew +} + +func (o *CreateDeploymentRequest) GetSkipAutoDetectionConfirmation() *SkipAutoDetectionConfirmation { + if o == nil { + return nil + } + return o.SkipAutoDetectionConfirmation +} + +func (o *CreateDeploymentRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateDeploymentRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateDeploymentRequest) GetRequestBody() CreateDeploymentRequestBody { + if o == nil { + return CreateDeploymentRequestBody{} + } + return o.RequestBody +} + +type AliasAssignedAtType string + +const ( + AliasAssignedAtTypeNumber AliasAssignedAtType = "number" + AliasAssignedAtTypeBoolean AliasAssignedAtType = "boolean" +) + +type AliasAssignedAt struct { + Number *float64 + Boolean *bool + + Type AliasAssignedAtType +} + +func CreateAliasAssignedAtNumber(number float64) AliasAssignedAt { + typ := AliasAssignedAtTypeNumber + + return AliasAssignedAt{ + Number: &number, + Type: typ, + } +} + +func CreateAliasAssignedAtBoolean(boolean bool) AliasAssignedAt { + typ := AliasAssignedAtTypeBoolean + + return AliasAssignedAt{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *AliasAssignedAt) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = AliasAssignedAtTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = AliasAssignedAtTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AliasAssignedAt", string(data)) +} + +func (u AliasAssignedAt) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type AliasAssignedAt: all fields are null") +} + +type Build struct { + Env []string `json:"env"` +} + +func (o *Build) GetEnv() []string { + if o == nil { + return []string{} + } + return o.Env +} + +type Builds struct { +} + +type CreateDeploymentFramework string + +const ( + CreateDeploymentFrameworkBlitzjs CreateDeploymentFramework = "blitzjs" + CreateDeploymentFrameworkNextjs CreateDeploymentFramework = "nextjs" + CreateDeploymentFrameworkGatsby CreateDeploymentFramework = "gatsby" + CreateDeploymentFrameworkRemix CreateDeploymentFramework = "remix" + CreateDeploymentFrameworkAstro CreateDeploymentFramework = "astro" + CreateDeploymentFrameworkHexo CreateDeploymentFramework = "hexo" + CreateDeploymentFrameworkEleventy CreateDeploymentFramework = "eleventy" + CreateDeploymentFrameworkDocusaurus2 CreateDeploymentFramework = "docusaurus-2" + CreateDeploymentFrameworkDocusaurus CreateDeploymentFramework = "docusaurus" + CreateDeploymentFrameworkPreact CreateDeploymentFramework = "preact" + CreateDeploymentFrameworkSolidstart1 CreateDeploymentFramework = "solidstart-1" + CreateDeploymentFrameworkSolidstart CreateDeploymentFramework = "solidstart" + CreateDeploymentFrameworkDojo CreateDeploymentFramework = "dojo" + CreateDeploymentFrameworkEmber CreateDeploymentFramework = "ember" + CreateDeploymentFrameworkVue CreateDeploymentFramework = "vue" + CreateDeploymentFrameworkScully CreateDeploymentFramework = "scully" + CreateDeploymentFrameworkIonicAngular CreateDeploymentFramework = "ionic-angular" + CreateDeploymentFrameworkAngular CreateDeploymentFramework = "angular" + CreateDeploymentFrameworkPolymer CreateDeploymentFramework = "polymer" + CreateDeploymentFrameworkSvelte CreateDeploymentFramework = "svelte" + CreateDeploymentFrameworkSveltekit CreateDeploymentFramework = "sveltekit" + CreateDeploymentFrameworkSveltekit1 CreateDeploymentFramework = "sveltekit-1" + CreateDeploymentFrameworkIonicReact CreateDeploymentFramework = "ionic-react" + CreateDeploymentFrameworkCreateReactApp CreateDeploymentFramework = "create-react-app" + CreateDeploymentFrameworkGridsome CreateDeploymentFramework = "gridsome" + CreateDeploymentFrameworkUmijs CreateDeploymentFramework = "umijs" + CreateDeploymentFrameworkSapper CreateDeploymentFramework = "sapper" + CreateDeploymentFrameworkSaber CreateDeploymentFramework = "saber" + CreateDeploymentFrameworkStencil CreateDeploymentFramework = "stencil" + CreateDeploymentFrameworkNuxtjs CreateDeploymentFramework = "nuxtjs" + CreateDeploymentFrameworkRedwoodjs CreateDeploymentFramework = "redwoodjs" + CreateDeploymentFrameworkHugo CreateDeploymentFramework = "hugo" + CreateDeploymentFrameworkJekyll CreateDeploymentFramework = "jekyll" + CreateDeploymentFrameworkBrunch CreateDeploymentFramework = "brunch" + CreateDeploymentFrameworkMiddleman CreateDeploymentFramework = "middleman" + CreateDeploymentFrameworkZola CreateDeploymentFramework = "zola" + CreateDeploymentFrameworkHydrogen CreateDeploymentFramework = "hydrogen" + CreateDeploymentFrameworkVite CreateDeploymentFramework = "vite" + CreateDeploymentFrameworkVitepress CreateDeploymentFramework = "vitepress" + CreateDeploymentFrameworkVuepress CreateDeploymentFramework = "vuepress" + CreateDeploymentFrameworkParcel CreateDeploymentFramework = "parcel" + CreateDeploymentFrameworkFasthtml CreateDeploymentFramework = "fasthtml" + CreateDeploymentFrameworkSanityV3 CreateDeploymentFramework = "sanity-v3" + CreateDeploymentFrameworkSanity CreateDeploymentFramework = "sanity" + CreateDeploymentFrameworkStorybook CreateDeploymentFramework = "storybook" +) + +func (e CreateDeploymentFramework) ToPointer() *CreateDeploymentFramework { + return &e +} +func (e *CreateDeploymentFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = CreateDeploymentFramework(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentFramework: %v", v) + } +} + +type CreateDeploymentSpeedInsights struct { + ID string `json:"id"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` + PaidAt *float64 `json:"paidAt,omitempty"` +} + +func (o *CreateDeploymentSpeedInsights) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateDeploymentSpeedInsights) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *CreateDeploymentSpeedInsights) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *CreateDeploymentSpeedInsights) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CreateDeploymentSpeedInsights) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +func (o *CreateDeploymentSpeedInsights) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +type CreateDeploymentWebAnalytics struct { + ID string `json:"id"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` +} + +func (o *CreateDeploymentWebAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateDeploymentWebAnalytics) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *CreateDeploymentWebAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CreateDeploymentWebAnalytics) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *CreateDeploymentWebAnalytics) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +type CreateDeploymentProjectSettings struct { + BuildCommand *string `json:"buildCommand,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + DevCommand *string `json:"devCommand,omitempty"` + Framework *CreateDeploymentFramework `json:"framework,omitempty"` + InstallCommand *string `json:"installCommand,omitempty"` + OutputDirectory *string `json:"outputDirectory,omitempty"` + SpeedInsights *CreateDeploymentSpeedInsights `json:"speedInsights,omitempty"` + WebAnalytics *CreateDeploymentWebAnalytics `json:"webAnalytics,omitempty"` +} + +func (o *CreateDeploymentProjectSettings) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *CreateDeploymentProjectSettings) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *CreateDeploymentProjectSettings) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *CreateDeploymentProjectSettings) GetFramework() *CreateDeploymentFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *CreateDeploymentProjectSettings) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *CreateDeploymentProjectSettings) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *CreateDeploymentProjectSettings) GetSpeedInsights() *CreateDeploymentSpeedInsights { + if o == nil { + return nil + } + return o.SpeedInsights +} + +func (o *CreateDeploymentProjectSettings) GetWebAnalytics() *CreateDeploymentWebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +type CreateDeploymentDeploymentsStatus string + +const ( + CreateDeploymentDeploymentsStatusError CreateDeploymentDeploymentsStatus = "error" + CreateDeploymentDeploymentsStatusSkipped CreateDeploymentDeploymentsStatus = "skipped" + CreateDeploymentDeploymentsStatusPending CreateDeploymentDeploymentsStatus = "pending" + CreateDeploymentDeploymentsStatusReady CreateDeploymentDeploymentsStatus = "ready" + CreateDeploymentDeploymentsStatusTimeout CreateDeploymentDeploymentsStatus = "timeout" +) + +func (e CreateDeploymentDeploymentsStatus) ToPointer() *CreateDeploymentDeploymentsStatus { + return &e +} +func (e *CreateDeploymentDeploymentsStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "error": + fallthrough + case "skipped": + fallthrough + case "pending": + fallthrough + case "ready": + fallthrough + case "timeout": + *e = CreateDeploymentDeploymentsStatus(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentDeploymentsStatus: %v", v) + } +} + +type Integrations struct { + Status CreateDeploymentDeploymentsStatus `json:"status"` + StartedAt float64 `json:"startedAt"` + CompletedAt *float64 `json:"completedAt,omitempty"` + SkippedAt *float64 `json:"skippedAt,omitempty"` + SkippedBy *string `json:"skippedBy,omitempty"` +} + +func (o *Integrations) GetStatus() CreateDeploymentDeploymentsStatus { + if o == nil { + return CreateDeploymentDeploymentsStatus("") + } + return o.Status +} + +func (o *Integrations) GetStartedAt() float64 { + if o == nil { + return 0.0 + } + return o.StartedAt +} + +func (o *Integrations) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *Integrations) GetSkippedAt() *float64 { + if o == nil { + return nil + } + return o.SkippedAt +} + +func (o *Integrations) GetSkippedBy() *string { + if o == nil { + return nil + } + return o.SkippedBy +} + +// Protocol - Must be `http` or `https`. +type Protocol string + +const ( + ProtocolHTTP Protocol = "http" + ProtocolHTTPS Protocol = "https" +) + +func (e Protocol) ToPointer() *Protocol { + return &e +} +func (e *Protocol) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "http": + fallthrough + case "https": + *e = Protocol(v) + return nil + default: + return fmt.Errorf("invalid value for Protocol: %v", v) + } +} + +type RemotePatterns struct { + // Must be `http` or `https`. + Protocol *Protocol `json:"protocol,omitempty"` + // Can be literal or wildcard. Single `*` matches a single subdomain. Double `**` matches any number of subdomains. + Hostname string `json:"hostname"` + // Can be literal port such as `8080` or empty string meaning no port. + Port *string `json:"port,omitempty"` + // Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments. + Pathname *string `json:"pathname,omitempty"` + // Can be literal query string such as `?v=1` or empty string meaning no query string. + Search *string `json:"search,omitempty"` +} + +func (o *RemotePatterns) GetProtocol() *Protocol { + if o == nil { + return nil + } + return o.Protocol +} + +func (o *RemotePatterns) GetHostname() string { + if o == nil { + return "" + } + return o.Hostname +} + +func (o *RemotePatterns) GetPort() *string { + if o == nil { + return nil + } + return o.Port +} + +func (o *RemotePatterns) GetPathname() *string { + if o == nil { + return nil + } + return o.Pathname +} + +func (o *RemotePatterns) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +type LocalPatterns struct { + // Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments. + Pathname *string `json:"pathname,omitempty"` + // Can be literal query string such as `?v=1` or empty string meaning no query string. + Search *string `json:"search,omitempty"` +} + +func (o *LocalPatterns) GetPathname() *string { + if o == nil { + return nil + } + return o.Pathname +} + +func (o *LocalPatterns) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +type Formats string + +const ( + FormatsImageAvif Formats = "image/avif" + FormatsImageWebp Formats = "image/webp" +) + +func (e Formats) ToPointer() *Formats { + return &e +} +func (e *Formats) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "image/avif": + fallthrough + case "image/webp": + *e = Formats(v) + return nil + default: + return fmt.Errorf("invalid value for Formats: %v", v) + } +} + +type ContentDispositionType string + +const ( + ContentDispositionTypeInline ContentDispositionType = "inline" + ContentDispositionTypeAttachment ContentDispositionType = "attachment" +) + +func (e ContentDispositionType) ToPointer() *ContentDispositionType { + return &e +} +func (e *ContentDispositionType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "inline": + fallthrough + case "attachment": + *e = ContentDispositionType(v) + return nil + default: + return fmt.Errorf("invalid value for ContentDispositionType: %v", v) + } +} + +type Images struct { + Sizes []float64 `json:"sizes,omitempty"` + Qualities []float64 `json:"qualities,omitempty"` + Domains []string `json:"domains,omitempty"` + RemotePatterns []RemotePatterns `json:"remotePatterns,omitempty"` + LocalPatterns []LocalPatterns `json:"localPatterns,omitempty"` + MinimumCacheTTL *float64 `json:"minimumCacheTTL,omitempty"` + Formats []Formats `json:"formats,omitempty"` + DangerouslyAllowSVG *bool `json:"dangerouslyAllowSVG,omitempty"` + ContentSecurityPolicy *string `json:"contentSecurityPolicy,omitempty"` + ContentDispositionType *ContentDispositionType `json:"contentDispositionType,omitempty"` +} + +func (o *Images) GetSizes() []float64 { + if o == nil { + return nil + } + return o.Sizes +} + +func (o *Images) GetQualities() []float64 { + if o == nil { + return nil + } + return o.Qualities +} + +func (o *Images) GetDomains() []string { + if o == nil { + return nil + } + return o.Domains +} + +func (o *Images) GetRemotePatterns() []RemotePatterns { + if o == nil { + return nil + } + return o.RemotePatterns +} + +func (o *Images) GetLocalPatterns() []LocalPatterns { + if o == nil { + return nil + } + return o.LocalPatterns +} + +func (o *Images) GetMinimumCacheTTL() *float64 { + if o == nil { + return nil + } + return o.MinimumCacheTTL +} + +func (o *Images) GetFormats() []Formats { + if o == nil { + return nil + } + return o.Formats +} + +func (o *Images) GetDangerouslyAllowSVG() *bool { + if o == nil { + return nil + } + return o.DangerouslyAllowSVG +} + +func (o *Images) GetContentSecurityPolicy() *string { + if o == nil { + return nil + } + return o.ContentSecurityPolicy +} + +func (o *Images) GetContentDispositionType() *ContentDispositionType { + if o == nil { + return nil + } + return o.ContentDispositionType +} + +type Creator struct { + UID string `json:"uid"` + Username *string `json:"username,omitempty"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *Creator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *Creator) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +func (o *Creator) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +type CreateDeploymentReadyState string + +const ( + CreateDeploymentReadyStateBuilding CreateDeploymentReadyState = "BUILDING" + CreateDeploymentReadyStateError CreateDeploymentReadyState = "ERROR" + CreateDeploymentReadyStateInitializing CreateDeploymentReadyState = "INITIALIZING" + CreateDeploymentReadyStateReady CreateDeploymentReadyState = "READY" +) + +func (e CreateDeploymentReadyState) ToPointer() *CreateDeploymentReadyState { + return &e +} +func (e *CreateDeploymentReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + *e = CreateDeploymentReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentReadyState: %v", v) + } +} + +type CreateDeploymentOutput struct { + Path string `json:"path"` + FunctionName string `json:"functionName"` +} + +func (o *CreateDeploymentOutput) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *CreateDeploymentOutput) GetFunctionName() string { + if o == nil { + return "" + } + return o.FunctionName +} + +// Lambdas - A partial representation of a Build used by the deployment endpoint. +type Lambdas struct { + ID *string `json:"id,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + Entrypoint *string `json:"entrypoint,omitempty"` + ReadyState *CreateDeploymentReadyState `json:"readyState,omitempty"` + ReadyStateAt *float64 `json:"readyStateAt,omitempty"` + Output []CreateDeploymentOutput `json:"output"` +} + +func (o *Lambdas) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Lambdas) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Lambdas) GetEntrypoint() *string { + if o == nil { + return nil + } + return o.Entrypoint +} + +func (o *Lambdas) GetReadyState() *CreateDeploymentReadyState { + if o == nil { + return nil + } + return o.ReadyState +} + +func (o *Lambdas) GetReadyStateAt() *float64 { + if o == nil { + return nil + } + return o.ReadyStateAt +} + +func (o *Lambdas) GetOutput() []CreateDeploymentOutput { + if o == nil { + return []CreateDeploymentOutput{} + } + return o.Output +} + +type CreateDeploymentStatus string + +const ( + CreateDeploymentStatusCanceled CreateDeploymentStatus = "CANCELED" + CreateDeploymentStatusError CreateDeploymentStatus = "ERROR" + CreateDeploymentStatusQueued CreateDeploymentStatus = "QUEUED" + CreateDeploymentStatusBuilding CreateDeploymentStatus = "BUILDING" + CreateDeploymentStatusInitializing CreateDeploymentStatus = "INITIALIZING" + CreateDeploymentStatusReady CreateDeploymentStatus = "READY" +) + +func (e CreateDeploymentStatus) ToPointer() *CreateDeploymentStatus { + return &e +} +func (e *CreateDeploymentStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CANCELED": + fallthrough + case "ERROR": + fallthrough + case "QUEUED": + fallthrough + case "BUILDING": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + *e = CreateDeploymentStatus(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentStatus: %v", v) + } +} + +type Team struct { + Name string `json:"name"` + ID string `json:"id"` + Slug string `json:"slug"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *Team) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Team) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Team) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *Team) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +type CustomEnvironment2 struct { + ID string `json:"id"` +} + +func (o *CustomEnvironment2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type CustomEnvironment1 struct { +} + +type CustomEnvironmentType string + +const ( + CustomEnvironmentTypeCustomEnvironment1 CustomEnvironmentType = "customEnvironment_1" + CustomEnvironmentTypeCustomEnvironment2 CustomEnvironmentType = "customEnvironment_2" +) + +type CustomEnvironment struct { + CustomEnvironment1 *CustomEnvironment1 + CustomEnvironment2 *CustomEnvironment2 + + Type CustomEnvironmentType +} + +func CreateCustomEnvironmentCustomEnvironment1(customEnvironment1 CustomEnvironment1) CustomEnvironment { + typ := CustomEnvironmentTypeCustomEnvironment1 + + return CustomEnvironment{ + CustomEnvironment1: &customEnvironment1, + Type: typ, + } +} + +func CreateCustomEnvironmentCustomEnvironment2(customEnvironment2 CustomEnvironment2) CustomEnvironment { + typ := CustomEnvironmentTypeCustomEnvironment2 + + return CustomEnvironment{ + CustomEnvironment2: &customEnvironment2, + Type: typ, + } +} + +func (u *CustomEnvironment) UnmarshalJSON(data []byte) error { + + var customEnvironment1 CustomEnvironment1 = CustomEnvironment1{} + if err := utils.UnmarshalJSON(data, &customEnvironment1, "", true, true); err == nil { + u.CustomEnvironment1 = &customEnvironment1 + u.Type = CustomEnvironmentTypeCustomEnvironment1 + return nil + } + + var customEnvironment2 CustomEnvironment2 = CustomEnvironment2{} + if err := utils.UnmarshalJSON(data, &customEnvironment2, "", true, true); err == nil { + u.CustomEnvironment2 = &customEnvironment2 + u.Type = CustomEnvironmentTypeCustomEnvironment2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CustomEnvironment", string(data)) +} + +func (u CustomEnvironment) MarshalJSON() ([]byte, error) { + if u.CustomEnvironment1 != nil { + return utils.MarshalJSON(u.CustomEnvironment1, "", true) + } + + if u.CustomEnvironment2 != nil { + return utils.MarshalJSON(u.CustomEnvironment2, "", true) + } + + return nil, errors.New("could not marshal union type CustomEnvironment: all fields are null") +} + +type CreateDeploymentType string + +const ( + CreateDeploymentTypeLambdas CreateDeploymentType = "LAMBDAS" +) + +func (e CreateDeploymentType) ToPointer() *CreateDeploymentType { + return &e +} +func (e *CreateDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = CreateDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentType: %v", v) + } +} + +type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type string + +const ( + CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9TypeBitbucket CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type = "bitbucket" +) + +func (e CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type) ToPointer() *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type: %v", v) + } +} + +type CreateDeploymentGitSource9 struct { + Type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + Owner *string `json:"owner,omitempty"` + Slug *string `json:"slug,omitempty"` + WorkspaceUUID string `json:"workspaceUuid"` + RepoUUID string `json:"repoUuid"` +} + +func (o *CreateDeploymentGitSource9) GetType() CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type("") + } + return o.Type +} + +func (o *CreateDeploymentGitSource9) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *CreateDeploymentGitSource9) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *CreateDeploymentGitSource9) GetOwner() *string { + if o == nil { + return nil + } + return o.Owner +} + +func (o *CreateDeploymentGitSource9) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateDeploymentGitSource9) GetWorkspaceUUID() string { + if o == nil { + return "" + } + return o.WorkspaceUUID +} + +func (o *CreateDeploymentGitSource9) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type string + +const ( + CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8TypeGitlab CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type = "gitlab" +) + +func (e CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type) ToPointer() *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type: %v", v) + } +} + +type CreateDeploymentGitSource8 struct { + Type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + ProjectID float64 `json:"projectId"` +} + +func (o *CreateDeploymentGitSource8) GetType() CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type("") + } + return o.Type +} + +func (o *CreateDeploymentGitSource8) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *CreateDeploymentGitSource8) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *CreateDeploymentGitSource8) GetProjectID() float64 { + if o == nil { + return 0.0 + } + return o.ProjectID +} + +type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type string + +const ( + CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7TypeGithub CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type = "github" +) + +func (e CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type) ToPointer() *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type: %v", v) + } +} + +type CreateDeploymentGitSource7 struct { + Type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + RepoID float64 `json:"repoId"` + Org *string `json:"org,omitempty"` + Repo *string `json:"repo,omitempty"` +} + +func (o *CreateDeploymentGitSource7) GetType() CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type("") + } + return o.Type +} + +func (o *CreateDeploymentGitSource7) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *CreateDeploymentGitSource7) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *CreateDeploymentGitSource7) GetRepoID() float64 { + if o == nil { + return 0.0 + } + return o.RepoID +} + +func (o *CreateDeploymentGitSource7) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} + +func (o *CreateDeploymentGitSource7) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type string + +const ( + CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6TypeCustom CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type = "custom" +) + +func (e CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type) ToPointer() *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "custom": + *e = CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type: %v", v) + } +} + +// CreateDeploymentGitSource6 - Allows custom git sources (local folder mounted to the container) in test mode +type CreateDeploymentGitSource6 struct { + Type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + GitURL string `json:"gitUrl"` +} + +func (o *CreateDeploymentGitSource6) GetType() CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody6Type("") + } + return o.Type +} + +func (o *CreateDeploymentGitSource6) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *CreateDeploymentGitSource6) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *CreateDeploymentGitSource6) GetGitURL() string { + if o == nil { + return "" + } + return o.GitURL +} + +type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type string + +const ( + CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5TypeBitbucket CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type = "bitbucket" +) + +func (e CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type) ToPointer() *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type: %v", v) + } +} + +type GitSource5 struct { + Type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type `json:"type"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GitSource5) GetType() CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody5Type("") + } + return o.Type +} + +func (o *GitSource5) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *GitSource5) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GitSource5) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GitSource5) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GitSource5) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType string + +const ( + CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyTypeBitbucket CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType = "bitbucket" +) + +func (e CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType) ToPointer() *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type GitSource4 struct { + Type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType `json:"type"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` + RepoUUID string `json:"repoUuid"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GitSource4) GetType() CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *GitSource4) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +func (o *GitSource4) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +func (o *GitSource4) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GitSource4) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GitSource4) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType string + +const ( + CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONTypeGitlab CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType = "gitlab" +) + +func (e CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType) ToPointer() *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType: %v", v) + } +} + +type GitSourceProjectIDType string + +const ( + GitSourceProjectIDTypeStr GitSourceProjectIDType = "str" + GitSourceProjectIDTypeNumber GitSourceProjectIDType = "number" +) + +type GitSourceProjectID struct { + Str *string + Number *float64 + + Type GitSourceProjectIDType +} + +func CreateGitSourceProjectIDStr(str string) GitSourceProjectID { + typ := GitSourceProjectIDTypeStr + + return GitSourceProjectID{ + Str: &str, + Type: typ, + } +} + +func CreateGitSourceProjectIDNumber(number float64) GitSourceProjectID { + typ := GitSourceProjectIDTypeNumber + + return GitSourceProjectID{ + Number: &number, + Type: typ, + } +} + +func (u *GitSourceProjectID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GitSourceProjectIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GitSourceProjectIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GitSourceProjectID", string(data)) +} + +func (u GitSourceProjectID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GitSourceProjectID: all fields are null") +} + +type GitSource3 struct { + Type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType `json:"type"` + ProjectID GitSourceProjectID `json:"projectId"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GitSource3) GetType() CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *GitSource3) GetProjectID() GitSourceProjectID { + if o == nil { + return GitSourceProjectID{} + } + return o.ProjectID +} + +func (o *GitSource3) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GitSource3) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GitSource3) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CreateDeploymentGitSourceDeploymentsResponse200Type string + +const ( + CreateDeploymentGitSourceDeploymentsResponse200TypeGithub CreateDeploymentGitSourceDeploymentsResponse200Type = "github" +) + +func (e CreateDeploymentGitSourceDeploymentsResponse200Type) ToPointer() *CreateDeploymentGitSourceDeploymentsResponse200Type { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CreateDeploymentGitSourceDeploymentsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponse200Type: %v", v) + } +} + +type GitSource2 struct { + Type CreateDeploymentGitSourceDeploymentsResponse200Type `json:"type"` + Org string `json:"org"` + Repo string `json:"repo"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GitSource2) GetType() CreateDeploymentGitSourceDeploymentsResponse200Type { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponse200Type("") + } + return o.Type +} + +func (o *GitSource2) GetOrg() string { + if o == nil { + return "" + } + return o.Org +} + +func (o *GitSource2) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *GitSource2) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GitSource2) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GitSource2) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CreateDeploymentGitSourceDeploymentsResponseType string + +const ( + CreateDeploymentGitSourceDeploymentsResponseTypeGithub CreateDeploymentGitSourceDeploymentsResponseType = "github" +) + +func (e CreateDeploymentGitSourceDeploymentsResponseType) ToPointer() *CreateDeploymentGitSourceDeploymentsResponseType { + return &e +} +func (e *CreateDeploymentGitSourceDeploymentsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CreateDeploymentGitSourceDeploymentsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitSourceDeploymentsResponseType: %v", v) + } +} + +type GitSourceRepoIDType string + +const ( + GitSourceRepoIDTypeStr GitSourceRepoIDType = "str" + GitSourceRepoIDTypeNumber GitSourceRepoIDType = "number" +) + +type GitSourceRepoID struct { + Str *string + Number *float64 + + Type GitSourceRepoIDType +} + +func CreateGitSourceRepoIDStr(str string) GitSourceRepoID { + typ := GitSourceRepoIDTypeStr + + return GitSourceRepoID{ + Str: &str, + Type: typ, + } +} + +func CreateGitSourceRepoIDNumber(number float64) GitSourceRepoID { + typ := GitSourceRepoIDTypeNumber + + return GitSourceRepoID{ + Number: &number, + Type: typ, + } +} + +func (u *GitSourceRepoID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GitSourceRepoIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GitSourceRepoIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GitSourceRepoID", string(data)) +} + +func (u GitSourceRepoID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GitSourceRepoID: all fields are null") +} + +type GitSource1 struct { + Type CreateDeploymentGitSourceDeploymentsResponseType `json:"type"` + RepoID GitSourceRepoID `json:"repoId"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GitSource1) GetType() CreateDeploymentGitSourceDeploymentsResponseType { + if o == nil { + return CreateDeploymentGitSourceDeploymentsResponseType("") + } + return o.Type +} + +func (o *GitSource1) GetRepoID() GitSourceRepoID { + if o == nil { + return GitSourceRepoID{} + } + return o.RepoID +} + +func (o *GitSource1) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GitSource1) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GitSource1) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type CreateDeploymentGitSourceUnionType string + +const ( + CreateDeploymentGitSourceUnionTypeGitSource1 CreateDeploymentGitSourceUnionType = "gitSource_1" + CreateDeploymentGitSourceUnionTypeGitSource2 CreateDeploymentGitSourceUnionType = "gitSource_2" + CreateDeploymentGitSourceUnionTypeGitSource3 CreateDeploymentGitSourceUnionType = "gitSource_3" + CreateDeploymentGitSourceUnionTypeGitSource4 CreateDeploymentGitSourceUnionType = "gitSource_4" + CreateDeploymentGitSourceUnionTypeGitSource5 CreateDeploymentGitSourceUnionType = "gitSource_5" + CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource6 CreateDeploymentGitSourceUnionType = "createDeployment_gitSource_6" + CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource7 CreateDeploymentGitSourceUnionType = "createDeployment_gitSource_7" + CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource8 CreateDeploymentGitSourceUnionType = "createDeployment_gitSource_8" + CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource9 CreateDeploymentGitSourceUnionType = "createDeployment_gitSource_9" +) + +type CreateDeploymentGitSource struct { + GitSource1 *GitSource1 + GitSource2 *GitSource2 + GitSource3 *GitSource3 + GitSource4 *GitSource4 + GitSource5 *GitSource5 + CreateDeploymentGitSource6 *CreateDeploymentGitSource6 + CreateDeploymentGitSource7 *CreateDeploymentGitSource7 + CreateDeploymentGitSource8 *CreateDeploymentGitSource8 + CreateDeploymentGitSource9 *CreateDeploymentGitSource9 + + Type CreateDeploymentGitSourceUnionType +} + +func CreateCreateDeploymentGitSourceGitSource1(gitSource1 GitSource1) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeGitSource1 + + return CreateDeploymentGitSource{ + GitSource1: &gitSource1, + Type: typ, + } +} + +func CreateCreateDeploymentGitSourceGitSource2(gitSource2 GitSource2) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeGitSource2 + + return CreateDeploymentGitSource{ + GitSource2: &gitSource2, + Type: typ, + } +} + +func CreateCreateDeploymentGitSourceGitSource3(gitSource3 GitSource3) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeGitSource3 + + return CreateDeploymentGitSource{ + GitSource3: &gitSource3, + Type: typ, + } +} + +func CreateCreateDeploymentGitSourceGitSource4(gitSource4 GitSource4) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeGitSource4 + + return CreateDeploymentGitSource{ + GitSource4: &gitSource4, + Type: typ, + } +} + +func CreateCreateDeploymentGitSourceGitSource5(gitSource5 GitSource5) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeGitSource5 + + return CreateDeploymentGitSource{ + GitSource5: &gitSource5, + Type: typ, + } +} + +func CreateCreateDeploymentGitSourceCreateDeploymentGitSource6(createDeploymentGitSource6 CreateDeploymentGitSource6) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource6 + + return CreateDeploymentGitSource{ + CreateDeploymentGitSource6: &createDeploymentGitSource6, + Type: typ, + } +} + +func CreateCreateDeploymentGitSourceCreateDeploymentGitSource7(createDeploymentGitSource7 CreateDeploymentGitSource7) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource7 + + return CreateDeploymentGitSource{ + CreateDeploymentGitSource7: &createDeploymentGitSource7, + Type: typ, + } +} + +func CreateCreateDeploymentGitSourceCreateDeploymentGitSource8(createDeploymentGitSource8 CreateDeploymentGitSource8) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource8 + + return CreateDeploymentGitSource{ + CreateDeploymentGitSource8: &createDeploymentGitSource8, + Type: typ, + } +} + +func CreateCreateDeploymentGitSourceCreateDeploymentGitSource9(createDeploymentGitSource9 CreateDeploymentGitSource9) CreateDeploymentGitSource { + typ := CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource9 + + return CreateDeploymentGitSource{ + CreateDeploymentGitSource9: &createDeploymentGitSource9, + Type: typ, + } +} + +func (u *CreateDeploymentGitSource) UnmarshalJSON(data []byte) error { + + var createDeploymentGitSource6 CreateDeploymentGitSource6 = CreateDeploymentGitSource6{} + if err := utils.UnmarshalJSON(data, &createDeploymentGitSource6, "", true, true); err == nil { + u.CreateDeploymentGitSource6 = &createDeploymentGitSource6 + u.Type = CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource6 + return nil + } + + var createDeploymentGitSource8 CreateDeploymentGitSource8 = CreateDeploymentGitSource8{} + if err := utils.UnmarshalJSON(data, &createDeploymentGitSource8, "", true, true); err == nil { + u.CreateDeploymentGitSource8 = &createDeploymentGitSource8 + u.Type = CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource8 + return nil + } + + var gitSource1 GitSource1 = GitSource1{} + if err := utils.UnmarshalJSON(data, &gitSource1, "", true, true); err == nil { + u.GitSource1 = &gitSource1 + u.Type = CreateDeploymentGitSourceUnionTypeGitSource1 + return nil + } + + var gitSource3 GitSource3 = GitSource3{} + if err := utils.UnmarshalJSON(data, &gitSource3, "", true, true); err == nil { + u.GitSource3 = &gitSource3 + u.Type = CreateDeploymentGitSourceUnionTypeGitSource3 + return nil + } + + var gitSource2 GitSource2 = GitSource2{} + if err := utils.UnmarshalJSON(data, &gitSource2, "", true, true); err == nil { + u.GitSource2 = &gitSource2 + u.Type = CreateDeploymentGitSourceUnionTypeGitSource2 + return nil + } + + var gitSource4 GitSource4 = GitSource4{} + if err := utils.UnmarshalJSON(data, &gitSource4, "", true, true); err == nil { + u.GitSource4 = &gitSource4 + u.Type = CreateDeploymentGitSourceUnionTypeGitSource4 + return nil + } + + var gitSource5 GitSource5 = GitSource5{} + if err := utils.UnmarshalJSON(data, &gitSource5, "", true, true); err == nil { + u.GitSource5 = &gitSource5 + u.Type = CreateDeploymentGitSourceUnionTypeGitSource5 + return nil + } + + var createDeploymentGitSource7 CreateDeploymentGitSource7 = CreateDeploymentGitSource7{} + if err := utils.UnmarshalJSON(data, &createDeploymentGitSource7, "", true, true); err == nil { + u.CreateDeploymentGitSource7 = &createDeploymentGitSource7 + u.Type = CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource7 + return nil + } + + var createDeploymentGitSource9 CreateDeploymentGitSource9 = CreateDeploymentGitSource9{} + if err := utils.UnmarshalJSON(data, &createDeploymentGitSource9, "", true, true); err == nil { + u.CreateDeploymentGitSource9 = &createDeploymentGitSource9 + u.Type = CreateDeploymentGitSourceUnionTypeCreateDeploymentGitSource9 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateDeploymentGitSource", string(data)) +} + +func (u CreateDeploymentGitSource) MarshalJSON() ([]byte, error) { + if u.GitSource1 != nil { + return utils.MarshalJSON(u.GitSource1, "", true) + } + + if u.GitSource2 != nil { + return utils.MarshalJSON(u.GitSource2, "", true) + } + + if u.GitSource3 != nil { + return utils.MarshalJSON(u.GitSource3, "", true) + } + + if u.GitSource4 != nil { + return utils.MarshalJSON(u.GitSource4, "", true) + } + + if u.GitSource5 != nil { + return utils.MarshalJSON(u.GitSource5, "", true) + } + + if u.CreateDeploymentGitSource6 != nil { + return utils.MarshalJSON(u.CreateDeploymentGitSource6, "", true) + } + + if u.CreateDeploymentGitSource7 != nil { + return utils.MarshalJSON(u.CreateDeploymentGitSource7, "", true) + } + + if u.CreateDeploymentGitSource8 != nil { + return utils.MarshalJSON(u.CreateDeploymentGitSource8, "", true) + } + + if u.CreateDeploymentGitSource9 != nil { + return utils.MarshalJSON(u.CreateDeploymentGitSource9, "", true) + } + + return nil, errors.New("could not marshal union type CreateDeploymentGitSource: all fields are null") +} + +type Project struct { + ID string `json:"id"` + Name string `json:"name"` + Framework *string `json:"framework,omitempty"` +} + +func (o *Project) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Project) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Project) GetFramework() *string { + if o == nil { + return nil + } + return o.Framework +} + +type ReadyState string + +const ( + ReadyStateCanceled ReadyState = "CANCELED" + ReadyStateError ReadyState = "ERROR" + ReadyStateQueued ReadyState = "QUEUED" + ReadyStateBuilding ReadyState = "BUILDING" + ReadyStateInitializing ReadyState = "INITIALIZING" + ReadyStateReady ReadyState = "READY" +) + +func (e ReadyState) ToPointer() *ReadyState { + return &e +} +func (e *ReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CANCELED": + fallthrough + case "ERROR": + fallthrough + case "QUEUED": + fallthrough + case "BUILDING": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + *e = ReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for ReadyState: %v", v) + } +} + +type CreateDeploymentSource string + +const ( + CreateDeploymentSourceCli CreateDeploymentSource = "cli" + CreateDeploymentSourceGit CreateDeploymentSource = "git" + CreateDeploymentSourceImport CreateDeploymentSource = "import" + CreateDeploymentSourceImportRepo CreateDeploymentSource = "import/repo" + CreateDeploymentSourceCloneRepo CreateDeploymentSource = "clone/repo" + CreateDeploymentSourceAPITriggerGitDeploy CreateDeploymentSource = "api-trigger-git-deploy" + CreateDeploymentSourceRedeploy CreateDeploymentSource = "redeploy" + CreateDeploymentSourceV0Web CreateDeploymentSource = "v0-web" +) + +func (e CreateDeploymentSource) ToPointer() *CreateDeploymentSource { + return &e +} +func (e *CreateDeploymentSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "cli": + fallthrough + case "git": + fallthrough + case "import": + fallthrough + case "import/repo": + fallthrough + case "clone/repo": + fallthrough + case "api-trigger-git-deploy": + fallthrough + case "redeploy": + fallthrough + case "v0-web": + *e = CreateDeploymentSource(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentSource: %v", v) + } +} + +type CreateDeploymentTarget string + +const ( + CreateDeploymentTargetStaging CreateDeploymentTarget = "staging" + CreateDeploymentTargetProduction CreateDeploymentTarget = "production" +) + +func (e CreateDeploymentTarget) ToPointer() *CreateDeploymentTarget { + return &e +} +func (e *CreateDeploymentTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "staging": + fallthrough + case "production": + *e = CreateDeploymentTarget(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentTarget: %v", v) + } +} + +type AliasWarning struct { + Code string `json:"code"` + Message string `json:"message"` + Link *string `json:"link,omitempty"` + Action *string `json:"action,omitempty"` +} + +func (o *AliasWarning) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *AliasWarning) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +func (o *AliasWarning) GetLink() *string { + if o == nil { + return nil + } + return o.Link +} + +func (o *AliasWarning) GetAction() *string { + if o == nil { + return nil + } + return o.Action +} + +type AliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *AliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *AliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type ChecksState string + +const ( + ChecksStateRegistered ChecksState = "registered" + ChecksStateRunning ChecksState = "running" + ChecksStateCompleted ChecksState = "completed" +) + +func (e ChecksState) ToPointer() *ChecksState { + return &e +} +func (e *ChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = ChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for ChecksState: %v", v) + } +} + +type ChecksConclusion string + +const ( + ChecksConclusionSucceeded ChecksConclusion = "succeeded" + ChecksConclusionFailed ChecksConclusion = "failed" + ChecksConclusionSkipped ChecksConclusion = "skipped" + ChecksConclusionCanceled ChecksConclusion = "canceled" +) + +func (e ChecksConclusion) ToPointer() *ChecksConclusion { + return &e +} +func (e *ChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = ChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for ChecksConclusion: %v", v) + } +} + +// ReadySubstate - Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic +type ReadySubstate string + +const ( + ReadySubstateStaged ReadySubstate = "STAGED" + ReadySubstatePromoted ReadySubstate = "PROMOTED" +) + +func (e ReadySubstate) ToPointer() *ReadySubstate { + return &e +} +func (e *ReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = ReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for ReadySubstate: %v", v) + } +} + +type OidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *OidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *OidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *OidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *OidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *OidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *OidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *OidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *OidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *OidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +// Applications - A map of the other applications that are part of this group. Only defined on the default application. The field is set after deployments have been created, so can be undefined, but should be there for a successful deployment. +type Applications struct { + // This is the production alias, it will always show the most up to date of each application. + ProductionHost string `json:"productionHost"` + // Use the fixed deploymentAlias and deploymentHost so that the microfrontend preview stays in sync with the deployment. These are only present for mono-repos when a single commit creates multiple deployments. If they are not present, productionHost will be used. + DeploymentAlias *string `json:"deploymentAlias,omitempty"` + DeploymentHost *string `json:"deploymentHost,omitempty"` +} + +func (o *Applications) GetProductionHost() string { + if o == nil { + return "" + } + return o.ProductionHost +} + +func (o *Applications) GetDeploymentAlias() *string { + if o == nil { + return nil + } + return o.DeploymentAlias +} + +func (o *Applications) GetDeploymentHost() *string { + if o == nil { + return nil + } + return o.DeploymentHost +} + +type Microfrontends2 struct { + // A map of the other applications that are part of this group. Only defined on the default application. The field is set after deployments have been created, so can be undefined, but should be there for a successful deployment. + Applications map[string]Applications `json:"applications,omitempty"` + IsDefaultApp bool `json:"isDefaultApp"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` + // The group of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` +} + +func (o *Microfrontends2) GetApplications() map[string]Applications { + if o == nil { + return nil + } + return o.Applications +} + +func (o *Microfrontends2) GetIsDefaultApp() bool { + if o == nil { + return false + } + return o.IsDefaultApp +} + +func (o *Microfrontends2) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *Microfrontends2) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +type Microfrontends1 struct { + // Whether this project is the default application for the microfrontends group. The default application is the one that is used as the top level shell for the microfrontends group and hosts the other microfrontends. + IsDefaultApp *bool `json:"isDefaultApp,omitempty"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` + // The group of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` +} + +func (o *Microfrontends1) GetIsDefaultApp() *bool { + if o == nil { + return nil + } + return o.IsDefaultApp +} + +func (o *Microfrontends1) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *Microfrontends1) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +type CreateDeploymentMicrofrontendsType string + +const ( + CreateDeploymentMicrofrontendsTypeMicrofrontends1 CreateDeploymentMicrofrontendsType = "microfrontends_1" + CreateDeploymentMicrofrontendsTypeMicrofrontends2 CreateDeploymentMicrofrontendsType = "microfrontends_2" +) + +type CreateDeploymentMicrofrontends struct { + Microfrontends1 *Microfrontends1 + Microfrontends2 *Microfrontends2 + + Type CreateDeploymentMicrofrontendsType +} + +func CreateCreateDeploymentMicrofrontendsMicrofrontends1(microfrontends1 Microfrontends1) CreateDeploymentMicrofrontends { + typ := CreateDeploymentMicrofrontendsTypeMicrofrontends1 + + return CreateDeploymentMicrofrontends{ + Microfrontends1: µfrontends1, + Type: typ, + } +} + +func CreateCreateDeploymentMicrofrontendsMicrofrontends2(microfrontends2 Microfrontends2) CreateDeploymentMicrofrontends { + typ := CreateDeploymentMicrofrontendsTypeMicrofrontends2 + + return CreateDeploymentMicrofrontends{ + Microfrontends2: µfrontends2, + Type: typ, + } +} + +func (u *CreateDeploymentMicrofrontends) UnmarshalJSON(data []byte) error { + + var microfrontends1 Microfrontends1 = Microfrontends1{} + if err := utils.UnmarshalJSON(data, µfrontends1, "", true, true); err == nil { + u.Microfrontends1 = µfrontends1 + u.Type = CreateDeploymentMicrofrontendsTypeMicrofrontends1 + return nil + } + + var microfrontends2 Microfrontends2 = Microfrontends2{} + if err := utils.UnmarshalJSON(data, µfrontends2, "", true, true); err == nil { + u.Microfrontends2 = µfrontends2 + u.Type = CreateDeploymentMicrofrontendsTypeMicrofrontends2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateDeploymentMicrofrontends", string(data)) +} + +func (u CreateDeploymentMicrofrontends) MarshalJSON() ([]byte, error) { + if u.Microfrontends1 != nil { + return utils.MarshalJSON(u.Microfrontends1, "", true) + } + + if u.Microfrontends2 != nil { + return utils.MarshalJSON(u.Microfrontends2, "", true) + } + + return nil, errors.New("could not marshal union type CreateDeploymentMicrofrontends: all fields are null") +} + +type Functions struct { + Memory *float64 `json:"memory,omitempty"` + MaxDuration *float64 `json:"maxDuration,omitempty"` + Runtime *string `json:"runtime,omitempty"` + IncludeFiles *string `json:"includeFiles,omitempty"` + ExcludeFiles *string `json:"excludeFiles,omitempty"` +} + +func (o *Functions) GetMemory() *float64 { + if o == nil { + return nil + } + return o.Memory +} + +func (o *Functions) GetMaxDuration() *float64 { + if o == nil { + return nil + } + return o.MaxDuration +} + +func (o *Functions) GetRuntime() *string { + if o == nil { + return nil + } + return o.Runtime +} + +func (o *Functions) GetIncludeFiles() *string { + if o == nil { + return nil + } + return o.IncludeFiles +} + +func (o *Functions) GetExcludeFiles() *string { + if o == nil { + return nil + } + return o.ExcludeFiles +} + +type Routes3 struct { + Src string `json:"src"` + Continue bool `json:"continue"` + Middleware float64 `json:"middleware"` +} + +func (o *Routes3) GetSrc() string { + if o == nil { + return "" + } + return o.Src +} + +func (o *Routes3) GetContinue() bool { + if o == nil { + return false + } + return o.Continue +} + +func (o *Routes3) GetMiddleware() float64 { + if o == nil { + return 0.0 + } + return o.Middleware +} + +type RoutesHandle string + +const ( + RoutesHandleError RoutesHandle = "error" + RoutesHandleFilesystem RoutesHandle = "filesystem" + RoutesHandleHit RoutesHandle = "hit" + RoutesHandleMiss RoutesHandle = "miss" + RoutesHandleRewrite RoutesHandle = "rewrite" + RoutesHandleResource RoutesHandle = "resource" +) + +func (e RoutesHandle) ToPointer() *RoutesHandle { + return &e +} +func (e *RoutesHandle) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "error": + fallthrough + case "filesystem": + fallthrough + case "hit": + fallthrough + case "miss": + fallthrough + case "rewrite": + fallthrough + case "resource": + *e = RoutesHandle(v) + return nil + default: + return fmt.Errorf("invalid value for RoutesHandle: %v", v) + } +} + +type Routes2 struct { + Handle RoutesHandle `json:"handle"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` + Status *float64 `json:"status,omitempty"` +} + +func (o *Routes2) GetHandle() RoutesHandle { + if o == nil { + return RoutesHandle("") + } + return o.Handle +} + +func (o *Routes2) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *Routes2) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *Routes2) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +type CreateDeploymentHasType string + +const ( + CreateDeploymentHasTypeHeader CreateDeploymentHasType = "header" + CreateDeploymentHasTypeCookie CreateDeploymentHasType = "cookie" + CreateDeploymentHasTypeQuery CreateDeploymentHasType = "query" +) + +func (e CreateDeploymentHasType) ToPointer() *CreateDeploymentHasType { + return &e +} +func (e *CreateDeploymentHasType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + *e = CreateDeploymentHasType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentHasType: %v", v) + } +} + +type Has2 struct { + Type CreateDeploymentHasType `json:"type"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +func (o *Has2) GetType() CreateDeploymentHasType { + if o == nil { + return CreateDeploymentHasType("") + } + return o.Type +} + +func (o *Has2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *Has2) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type HasType string + +const ( + HasTypeHost HasType = "host" +) + +func (e HasType) ToPointer() *HasType { + return &e +} +func (e *HasType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + *e = HasType(v) + return nil + default: + return fmt.Errorf("invalid value for HasType: %v", v) + } +} + +type Has1 struct { + Type HasType `json:"type"` + Value string `json:"value"` +} + +func (o *Has1) GetType() HasType { + if o == nil { + return HasType("") + } + return o.Type +} + +func (o *Has1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type RoutesHasType string + +const ( + RoutesHasTypeHas1 RoutesHasType = "has_1" + RoutesHasTypeHas2 RoutesHasType = "has_2" +) + +type RoutesHas struct { + Has1 *Has1 + Has2 *Has2 + + Type RoutesHasType +} + +func CreateRoutesHasHas1(has1 Has1) RoutesHas { + typ := RoutesHasTypeHas1 + + return RoutesHas{ + Has1: &has1, + Type: typ, + } +} + +func CreateRoutesHasHas2(has2 Has2) RoutesHas { + typ := RoutesHasTypeHas2 + + return RoutesHas{ + Has2: &has2, + Type: typ, + } +} + +func (u *RoutesHas) UnmarshalJSON(data []byte) error { + + var has1 Has1 = Has1{} + if err := utils.UnmarshalJSON(data, &has1, "", true, true); err == nil { + u.Has1 = &has1 + u.Type = RoutesHasTypeHas1 + return nil + } + + var has2 Has2 = Has2{} + if err := utils.UnmarshalJSON(data, &has2, "", true, true); err == nil { + u.Has2 = &has2 + u.Type = RoutesHasTypeHas2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RoutesHas", string(data)) +} + +func (u RoutesHas) MarshalJSON() ([]byte, error) { + if u.Has1 != nil { + return utils.MarshalJSON(u.Has1, "", true) + } + + if u.Has2 != nil { + return utils.MarshalJSON(u.Has2, "", true) + } + + return nil, errors.New("could not marshal union type RoutesHas: all fields are null") +} + +type CreateDeploymentMissingType string + +const ( + CreateDeploymentMissingTypeHeader CreateDeploymentMissingType = "header" + CreateDeploymentMissingTypeCookie CreateDeploymentMissingType = "cookie" + CreateDeploymentMissingTypeQuery CreateDeploymentMissingType = "query" +) + +func (e CreateDeploymentMissingType) ToPointer() *CreateDeploymentMissingType { + return &e +} +func (e *CreateDeploymentMissingType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + *e = CreateDeploymentMissingType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentMissingType: %v", v) + } +} + +type Missing2 struct { + Type CreateDeploymentMissingType `json:"type"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +func (o *Missing2) GetType() CreateDeploymentMissingType { + if o == nil { + return CreateDeploymentMissingType("") + } + return o.Type +} + +func (o *Missing2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *Missing2) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type MissingType string + +const ( + MissingTypeHost MissingType = "host" +) + +func (e MissingType) ToPointer() *MissingType { + return &e +} +func (e *MissingType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + *e = MissingType(v) + return nil + default: + return fmt.Errorf("invalid value for MissingType: %v", v) + } +} + +type Missing1 struct { + Type MissingType `json:"type"` + Value string `json:"value"` +} + +func (o *Missing1) GetType() MissingType { + if o == nil { + return MissingType("") + } + return o.Type +} + +func (o *Missing1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type RoutesMissingType string + +const ( + RoutesMissingTypeMissing1 RoutesMissingType = "missing_1" + RoutesMissingTypeMissing2 RoutesMissingType = "missing_2" +) + +type RoutesMissing struct { + Missing1 *Missing1 + Missing2 *Missing2 + + Type RoutesMissingType +} + +func CreateRoutesMissingMissing1(missing1 Missing1) RoutesMissing { + typ := RoutesMissingTypeMissing1 + + return RoutesMissing{ + Missing1: &missing1, + Type: typ, + } +} + +func CreateRoutesMissingMissing2(missing2 Missing2) RoutesMissing { + typ := RoutesMissingTypeMissing2 + + return RoutesMissing{ + Missing2: &missing2, + Type: typ, + } +} + +func (u *RoutesMissing) UnmarshalJSON(data []byte) error { + + var missing1 Missing1 = Missing1{} + if err := utils.UnmarshalJSON(data, &missing1, "", true, true); err == nil { + u.Missing1 = &missing1 + u.Type = RoutesMissingTypeMissing1 + return nil + } + + var missing2 Missing2 = Missing2{} + if err := utils.UnmarshalJSON(data, &missing2, "", true, true); err == nil { + u.Missing2 = &missing2 + u.Type = RoutesMissingTypeMissing2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RoutesMissing", string(data)) +} + +func (u RoutesMissing) MarshalJSON() ([]byte, error) { + if u.Missing1 != nil { + return utils.MarshalJSON(u.Missing1, "", true) + } + + if u.Missing2 != nil { + return utils.MarshalJSON(u.Missing2, "", true) + } + + return nil, errors.New("could not marshal union type RoutesMissing: all fields are null") +} + +type Locale struct { + Redirect map[string]string `json:"redirect,omitempty"` + Cookie *string `json:"cookie,omitempty"` +} + +func (o *Locale) GetRedirect() map[string]string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *Locale) GetCookie() *string { + if o == nil { + return nil + } + return o.Cookie +} + +type Routes1 struct { + Src string `json:"src"` + Dest *string `json:"dest,omitempty"` + Headers map[string]string `json:"headers,omitempty"` + Methods []string `json:"methods,omitempty"` + Continue *bool `json:"continue,omitempty"` + Override *bool `json:"override,omitempty"` + CaseSensitive *bool `json:"caseSensitive,omitempty"` + Check *bool `json:"check,omitempty"` + Important *bool `json:"important,omitempty"` + Status *float64 `json:"status,omitempty"` + Has []RoutesHas `json:"has,omitempty"` + Missing []RoutesMissing `json:"missing,omitempty"` + Locale *Locale `json:"locale,omitempty"` + // A middleware key within the `output` key under the build result. Overrides a `middleware` definition. + MiddlewarePath *string `json:"middlewarePath,omitempty"` + // The original middleware matchers. + MiddlewareRawSrc []string `json:"middlewareRawSrc,omitempty"` + // A middleware index in the `middleware` key under the build result + Middleware *float64 `json:"middleware,omitempty"` +} + +func (o *Routes1) GetSrc() string { + if o == nil { + return "" + } + return o.Src +} + +func (o *Routes1) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *Routes1) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *Routes1) GetMethods() []string { + if o == nil { + return nil + } + return o.Methods +} + +func (o *Routes1) GetContinue() *bool { + if o == nil { + return nil + } + return o.Continue +} + +func (o *Routes1) GetOverride() *bool { + if o == nil { + return nil + } + return o.Override +} + +func (o *Routes1) GetCaseSensitive() *bool { + if o == nil { + return nil + } + return o.CaseSensitive +} + +func (o *Routes1) GetCheck() *bool { + if o == nil { + return nil + } + return o.Check +} + +func (o *Routes1) GetImportant() *bool { + if o == nil { + return nil + } + return o.Important +} + +func (o *Routes1) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +func (o *Routes1) GetHas() []RoutesHas { + if o == nil { + return nil + } + return o.Has +} + +func (o *Routes1) GetMissing() []RoutesMissing { + if o == nil { + return nil + } + return o.Missing +} + +func (o *Routes1) GetLocale() *Locale { + if o == nil { + return nil + } + return o.Locale +} + +func (o *Routes1) GetMiddlewarePath() *string { + if o == nil { + return nil + } + return o.MiddlewarePath +} + +func (o *Routes1) GetMiddlewareRawSrc() []string { + if o == nil { + return nil + } + return o.MiddlewareRawSrc +} + +func (o *Routes1) GetMiddleware() *float64 { + if o == nil { + return nil + } + return o.Middleware +} + +type RoutesType string + +const ( + RoutesTypeRoutes1 RoutesType = "routes_1" + RoutesTypeRoutes2 RoutesType = "routes_2" + RoutesTypeRoutes3 RoutesType = "routes_3" +) + +type Routes struct { + Routes1 *Routes1 + Routes2 *Routes2 + Routes3 *Routes3 + + Type RoutesType +} + +func CreateRoutesRoutes1(routes1 Routes1) Routes { + typ := RoutesTypeRoutes1 + + return Routes{ + Routes1: &routes1, + Type: typ, + } +} + +func CreateRoutesRoutes2(routes2 Routes2) Routes { + typ := RoutesTypeRoutes2 + + return Routes{ + Routes2: &routes2, + Type: typ, + } +} + +func CreateRoutesRoutes3(routes3 Routes3) Routes { + typ := RoutesTypeRoutes3 + + return Routes{ + Routes3: &routes3, + Type: typ, + } +} + +func (u *Routes) UnmarshalJSON(data []byte) error { + + var routes3 Routes3 = Routes3{} + if err := utils.UnmarshalJSON(data, &routes3, "", true, true); err == nil { + u.Routes3 = &routes3 + u.Type = RoutesTypeRoutes3 + return nil + } + + var routes2 Routes2 = Routes2{} + if err := utils.UnmarshalJSON(data, &routes2, "", true, true); err == nil { + u.Routes2 = &routes2 + u.Type = RoutesTypeRoutes2 + return nil + } + + var routes1 Routes1 = Routes1{} + if err := utils.UnmarshalJSON(data, &routes1, "", true, true); err == nil { + u.Routes1 = &routes1 + u.Type = RoutesTypeRoutes1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Routes", string(data)) +} + +func (u Routes) MarshalJSON() ([]byte, error) { + if u.Routes1 != nil { + return utils.MarshalJSON(u.Routes1, "", true) + } + + if u.Routes2 != nil { + return utils.MarshalJSON(u.Routes2, "", true) + } + + if u.Routes3 != nil { + return utils.MarshalJSON(u.Routes3, "", true) + } + + return nil, errors.New("could not marshal union type Routes: all fields are null") +} + +type CreateDeploymentCrons struct { + Schedule string `json:"schedule"` + Path string `json:"path"` +} + +func (o *CreateDeploymentCrons) GetSchedule() string { + if o == nil { + return "" + } + return o.Schedule +} + +func (o *CreateDeploymentCrons) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +type Plan string + +const ( + PlanPro Plan = "pro" + PlanEnterprise Plan = "enterprise" + PlanHobby Plan = "hobby" +) + +func (e Plan) ToPointer() *Plan { + return &e +} +func (e *Plan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = Plan(v) + return nil + default: + return fmt.Errorf("invalid value for Plan: %v", v) + } +} + +type CreateDeploymentGitRepoDeploymentsType string + +const ( + CreateDeploymentGitRepoDeploymentsTypeBitbucket CreateDeploymentGitRepoDeploymentsType = "bitbucket" +) + +func (e CreateDeploymentGitRepoDeploymentsType) ToPointer() *CreateDeploymentGitRepoDeploymentsType { + return &e +} +func (e *CreateDeploymentGitRepoDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CreateDeploymentGitRepoDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitRepoDeploymentsType: %v", v) + } +} + +type CreateDeploymentGitRepoOwnerType string + +const ( + CreateDeploymentGitRepoOwnerTypeTeam CreateDeploymentGitRepoOwnerType = "team" + CreateDeploymentGitRepoOwnerTypeUser CreateDeploymentGitRepoOwnerType = "user" +) + +func (e CreateDeploymentGitRepoOwnerType) ToPointer() *CreateDeploymentGitRepoOwnerType { + return &e +} +func (e *CreateDeploymentGitRepoOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = CreateDeploymentGitRepoOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitRepoOwnerType: %v", v) + } +} + +type GitRepo3 struct { + Owner string `json:"owner"` + RepoUUID string `json:"repoUuid"` + Slug string `json:"slug"` + Type CreateDeploymentGitRepoDeploymentsType `json:"type"` + WorkspaceUUID string `json:"workspaceUuid"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType CreateDeploymentGitRepoOwnerType `json:"ownerType"` +} + +func (o *GitRepo3) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *GitRepo3) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +func (o *GitRepo3) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GitRepo3) GetType() CreateDeploymentGitRepoDeploymentsType { + if o == nil { + return CreateDeploymentGitRepoDeploymentsType("") + } + return o.Type +} + +func (o *GitRepo3) GetWorkspaceUUID() string { + if o == nil { + return "" + } + return o.WorkspaceUUID +} + +func (o *GitRepo3) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *GitRepo3) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *GitRepo3) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GitRepo3) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *GitRepo3) GetOwnerType() CreateDeploymentGitRepoOwnerType { + if o == nil { + return CreateDeploymentGitRepoOwnerType("") + } + return o.OwnerType +} + +type CreateDeploymentGitRepoType string + +const ( + CreateDeploymentGitRepoTypeGithub CreateDeploymentGitRepoType = "github" +) + +func (e CreateDeploymentGitRepoType) ToPointer() *CreateDeploymentGitRepoType { + return &e +} +func (e *CreateDeploymentGitRepoType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CreateDeploymentGitRepoType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateDeploymentGitRepoType: %v", v) + } +} + +type GitRepoOwnerType string + +const ( + GitRepoOwnerTypeTeam GitRepoOwnerType = "team" + GitRepoOwnerTypeUser GitRepoOwnerType = "user" +) + +func (e GitRepoOwnerType) ToPointer() *GitRepoOwnerType { + return &e +} +func (e *GitRepoOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = GitRepoOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for GitRepoOwnerType: %v", v) + } +} + +type GitRepo2 struct { + Org string `json:"org"` + Repo string `json:"repo"` + RepoID float64 `json:"repoId"` + Type CreateDeploymentGitRepoType `json:"type"` + RepoOwnerID float64 `json:"repoOwnerId"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType GitRepoOwnerType `json:"ownerType"` +} + +func (o *GitRepo2) GetOrg() string { + if o == nil { + return "" + } + return o.Org +} + +func (o *GitRepo2) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *GitRepo2) GetRepoID() float64 { + if o == nil { + return 0.0 + } + return o.RepoID +} + +func (o *GitRepo2) GetType() CreateDeploymentGitRepoType { + if o == nil { + return CreateDeploymentGitRepoType("") + } + return o.Type +} + +func (o *GitRepo2) GetRepoOwnerID() float64 { + if o == nil { + return 0.0 + } + return o.RepoOwnerID +} + +func (o *GitRepo2) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *GitRepo2) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *GitRepo2) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GitRepo2) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *GitRepo2) GetOwnerType() GitRepoOwnerType { + if o == nil { + return GitRepoOwnerType("") + } + return o.OwnerType +} + +type GitRepoType string + +const ( + GitRepoTypeGitlab GitRepoType = "gitlab" +) + +func (e GitRepoType) ToPointer() *GitRepoType { + return &e +} +func (e *GitRepoType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = GitRepoType(v) + return nil + default: + return fmt.Errorf("invalid value for GitRepoType: %v", v) + } +} + +type OwnerType string + +const ( + OwnerTypeTeam OwnerType = "team" + OwnerTypeUser OwnerType = "user" +) + +func (e OwnerType) ToPointer() *OwnerType { + return &e +} +func (e *OwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = OwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for OwnerType: %v", v) + } +} + +type GitRepo1 struct { + Namespace string `json:"namespace"` + ProjectID float64 `json:"projectId"` + Type GitRepoType `json:"type"` + URL string `json:"url"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType OwnerType `json:"ownerType"` +} + +func (o *GitRepo1) GetNamespace() string { + if o == nil { + return "" + } + return o.Namespace +} + +func (o *GitRepo1) GetProjectID() float64 { + if o == nil { + return 0.0 + } + return o.ProjectID +} + +func (o *GitRepo1) GetType() GitRepoType { + if o == nil { + return GitRepoType("") + } + return o.Type +} + +func (o *GitRepo1) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GitRepo1) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *GitRepo1) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *GitRepo1) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GitRepo1) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *GitRepo1) GetOwnerType() OwnerType { + if o == nil { + return OwnerType("") + } + return o.OwnerType +} + +type GitRepoUnionType string + +const ( + GitRepoUnionTypeGitRepo1 GitRepoUnionType = "gitRepo_1" + GitRepoUnionTypeGitRepo2 GitRepoUnionType = "gitRepo_2" + GitRepoUnionTypeGitRepo3 GitRepoUnionType = "gitRepo_3" +) + +type GitRepo struct { + GitRepo1 *GitRepo1 + GitRepo2 *GitRepo2 + GitRepo3 *GitRepo3 + + Type GitRepoUnionType +} + +func CreateGitRepoGitRepo1(gitRepo1 GitRepo1) GitRepo { + typ := GitRepoUnionTypeGitRepo1 + + return GitRepo{ + GitRepo1: &gitRepo1, + Type: typ, + } +} + +func CreateGitRepoGitRepo2(gitRepo2 GitRepo2) GitRepo { + typ := GitRepoUnionTypeGitRepo2 + + return GitRepo{ + GitRepo2: &gitRepo2, + Type: typ, + } +} + +func CreateGitRepoGitRepo3(gitRepo3 GitRepo3) GitRepo { + typ := GitRepoUnionTypeGitRepo3 + + return GitRepo{ + GitRepo3: &gitRepo3, + Type: typ, + } +} + +func (u *GitRepo) UnmarshalJSON(data []byte) error { + + var gitRepo1 GitRepo1 = GitRepo1{} + if err := utils.UnmarshalJSON(data, &gitRepo1, "", true, true); err == nil { + u.GitRepo1 = &gitRepo1 + u.Type = GitRepoUnionTypeGitRepo1 + return nil + } + + var gitRepo2 GitRepo2 = GitRepo2{} + if err := utils.UnmarshalJSON(data, &gitRepo2, "", true, true); err == nil { + u.GitRepo2 = &gitRepo2 + u.Type = GitRepoUnionTypeGitRepo2 + return nil + } + + var gitRepo3 GitRepo3 = GitRepo3{} + if err := utils.UnmarshalJSON(data, &gitRepo3, "", true, true); err == nil { + u.GitRepo3 = &gitRepo3 + u.Type = GitRepoUnionTypeGitRepo3 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GitRepo", string(data)) +} + +func (u GitRepo) MarshalJSON() ([]byte, error) { + if u.GitRepo1 != nil { + return utils.MarshalJSON(u.GitRepo1, "", true) + } + + if u.GitRepo2 != nil { + return utils.MarshalJSON(u.GitRepo2, "", true) + } + + if u.GitRepo3 != nil { + return utils.MarshalJSON(u.GitRepo3, "", true) + } + + return nil, errors.New("could not marshal union type GitRepo: all fields are null") +} + +// Flags2 - Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags. +type Flags2 struct { +} + +type Options struct { + Value *components.FlagJSONValue `json:"value"` + Label *string `json:"label,omitempty"` +} + +func (o *Options) GetValue() *components.FlagJSONValue { + if o == nil { + return nil + } + return o.Value +} + +func (o *Options) GetLabel() *string { + if o == nil { + return nil + } + return o.Label +} + +type FlagsDefinitions struct { + Options []Options `json:"options,omitempty"` + URL *string `json:"url,omitempty"` + Description *string `json:"description,omitempty"` +} + +func (o *FlagsDefinitions) GetOptions() []Options { + if o == nil { + return nil + } + return o.Options +} + +func (o *FlagsDefinitions) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *FlagsDefinitions) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +// Flags1 - Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags. +type Flags1 struct { + Definitions map[string]FlagsDefinitions `json:"definitions"` +} + +func (o *Flags1) GetDefinitions() map[string]FlagsDefinitions { + if o == nil { + return map[string]FlagsDefinitions{} + } + return o.Definitions +} + +type FlagsType string + +const ( + FlagsTypeFlags1 FlagsType = "flags_1" + FlagsTypeArrayOfFlags2 FlagsType = "arrayOfFlags2" +) + +type Flags struct { + Flags1 *Flags1 + ArrayOfFlags2 []Flags2 + + Type FlagsType +} + +func CreateFlagsFlags1(flags1 Flags1) Flags { + typ := FlagsTypeFlags1 + + return Flags{ + Flags1: &flags1, + Type: typ, + } +} + +func CreateFlagsArrayOfFlags2(arrayOfFlags2 []Flags2) Flags { + typ := FlagsTypeArrayOfFlags2 + + return Flags{ + ArrayOfFlags2: arrayOfFlags2, + Type: typ, + } +} + +func (u *Flags) UnmarshalJSON(data []byte) error { + + var flags1 Flags1 = Flags1{} + if err := utils.UnmarshalJSON(data, &flags1, "", true, true); err == nil { + u.Flags1 = &flags1 + u.Type = FlagsTypeFlags1 + return nil + } + + var arrayOfFlags2 []Flags2 = []Flags2{} + if err := utils.UnmarshalJSON(data, &arrayOfFlags2, "", true, true); err == nil { + u.ArrayOfFlags2 = arrayOfFlags2 + u.Type = FlagsTypeArrayOfFlags2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Flags", string(data)) +} + +func (u Flags) MarshalJSON() ([]byte, error) { + if u.Flags1 != nil { + return utils.MarshalJSON(u.Flags1, "", true) + } + + if u.ArrayOfFlags2 != nil { + return utils.MarshalJSON(u.ArrayOfFlags2, "", true) + } + + return nil, errors.New("could not marshal union type Flags: all fields are null") +} + +// CreateDeploymentResponseBody - The successfully created deployment +type CreateDeploymentResponseBody struct { + AliasAssignedAt *AliasAssignedAt `json:"aliasAssignedAt,omitempty"` + AlwaysRefuseToBuild *bool `json:"alwaysRefuseToBuild,omitempty"` + Build Build `json:"build"` + BuildArtifactUrls []string `json:"buildArtifactUrls,omitempty"` + Builds []Builds `json:"builds,omitempty"` + Env []string `json:"env"` + InspectorURL *string `json:"inspectorUrl"` + IsInConcurrentBuildsQueue bool `json:"isInConcurrentBuildsQueue"` + IsInSystemBuildsQueue bool `json:"isInSystemBuildsQueue"` + ProjectSettings CreateDeploymentProjectSettings `json:"projectSettings"` + ReadyStateReason *string `json:"readyStateReason,omitempty"` + Integrations *Integrations `json:"integrations,omitempty"` + Images *Images `json:"images,omitempty"` + Alias []string `json:"alias,omitempty"` + AliasAssigned bool `json:"aliasAssigned"` + BootedAt float64 `json:"bootedAt"` + BuildingAt float64 `json:"buildingAt"` + BuildSkipped bool `json:"buildSkipped"` + Creator Creator `json:"creator"` + InitReadyAt *float64 `json:"initReadyAt,omitempty"` + IsFirstBranchDeployment *bool `json:"isFirstBranchDeployment,omitempty"` + Lambdas []Lambdas `json:"lambdas,omitempty"` + Public bool `json:"public"` + Ready *float64 `json:"ready,omitempty"` + Status CreateDeploymentStatus `json:"status"` + Team *Team `json:"team,omitempty"` + UserAliases []string `json:"userAliases,omitempty"` + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + TtyBuildLogs *bool `json:"ttyBuildLogs,omitempty"` + CustomEnvironment *CustomEnvironment `json:"customEnvironment,omitempty"` + Type CreateDeploymentType `json:"type"` + CreatedAt float64 `json:"createdAt"` + Name string `json:"name"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + ID string `json:"id"` + Version float64 `json:"version"` + // applies to custom domains only, defaults to `true` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + GitSource *CreateDeploymentGitSource `json:"gitSource,omitempty"` + Meta map[string]string `json:"meta"` + Project *Project `json:"project,omitempty"` + ReadyState ReadyState `json:"readyState"` + Source *CreateDeploymentSource `json:"source,omitempty"` + Target *CreateDeploymentTarget `json:"target,omitempty"` + // Since November 2023 this field defines a set of regions that we will deploy the lambda to passively Lambdas will be deployed to these regions but only invoked if all of the primary `regions` are marked as out of service + PassiveRegions []string `json:"passiveRegions,omitempty"` + Regions []string `json:"regions"` + ErrorMessage *string `json:"errorMessage,omitempty"` + AliasWarning *AliasWarning `json:"aliasWarning,omitempty"` + AliasError *AliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BuildErrorAt *float64 `json:"buildErrorAt,omitempty"` + ChecksState *ChecksState `json:"checksState,omitempty"` + ChecksConclusion *ChecksConclusion `json:"checksConclusion,omitempty"` + // Computed field that is only available for deployments with a microfrontend configuration. + DefaultRoute *string `json:"defaultRoute,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorLink *string `json:"errorLink,omitempty"` + ErrorStep *string `json:"errorStep,omitempty"` + OriginCacheRegion *string `json:"originCacheRegion,omitempty"` + // Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic + ReadySubstate *ReadySubstate `json:"readySubstate,omitempty"` + SoftDeletedByRetention *bool `json:"softDeletedByRetention,omitempty"` + UndeletedAt *float64 `json:"undeletedAt,omitempty"` + URL string `json:"url"` + OidcTokenClaims *OidcTokenClaims `json:"oidcTokenClaims,omitempty"` + ProjectID string `json:"projectId"` + OwnerID string `json:"ownerId"` + Microfrontends *CreateDeploymentMicrofrontends `json:"microfrontends,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + Functions map[string]Functions `json:"functions,omitempty"` + Routes []Routes `json:"routes"` + Crons []CreateDeploymentCrons `json:"crons,omitempty"` + Plan Plan `json:"plan"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedIn string `json:"createdIn"` + // Since November 2023 this field defines a Secure Compute network that will only be used to deploy passive lambdas to (as in passiveRegions) + PassiveConnectConfigurationID *string `json:"passiveConnectConfigurationId,omitempty"` + GitRepo *GitRepo `json:"gitRepo,omitempty"` + Flags *Flags `json:"flags,omitempty"` +} + +func (o *CreateDeploymentResponseBody) GetAliasAssignedAt() *AliasAssignedAt { + if o == nil { + return nil + } + return o.AliasAssignedAt +} + +func (o *CreateDeploymentResponseBody) GetAlwaysRefuseToBuild() *bool { + if o == nil { + return nil + } + return o.AlwaysRefuseToBuild +} + +func (o *CreateDeploymentResponseBody) GetBuild() Build { + if o == nil { + return Build{} + } + return o.Build +} + +func (o *CreateDeploymentResponseBody) GetBuildArtifactUrls() []string { + if o == nil { + return nil + } + return o.BuildArtifactUrls +} + +func (o *CreateDeploymentResponseBody) GetBuilds() []Builds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *CreateDeploymentResponseBody) GetEnv() []string { + if o == nil { + return []string{} + } + return o.Env +} + +func (o *CreateDeploymentResponseBody) GetInspectorURL() *string { + if o == nil { + return nil + } + return o.InspectorURL +} + +func (o *CreateDeploymentResponseBody) GetIsInConcurrentBuildsQueue() bool { + if o == nil { + return false + } + return o.IsInConcurrentBuildsQueue +} + +func (o *CreateDeploymentResponseBody) GetIsInSystemBuildsQueue() bool { + if o == nil { + return false + } + return o.IsInSystemBuildsQueue +} + +func (o *CreateDeploymentResponseBody) GetProjectSettings() CreateDeploymentProjectSettings { + if o == nil { + return CreateDeploymentProjectSettings{} + } + return o.ProjectSettings +} + +func (o *CreateDeploymentResponseBody) GetReadyStateReason() *string { + if o == nil { + return nil + } + return o.ReadyStateReason +} + +func (o *CreateDeploymentResponseBody) GetIntegrations() *Integrations { + if o == nil { + return nil + } + return o.Integrations +} + +func (o *CreateDeploymentResponseBody) GetImages() *Images { + if o == nil { + return nil + } + return o.Images +} + +func (o *CreateDeploymentResponseBody) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *CreateDeploymentResponseBody) GetAliasAssigned() bool { + if o == nil { + return false + } + return o.AliasAssigned +} + +func (o *CreateDeploymentResponseBody) GetBootedAt() float64 { + if o == nil { + return 0.0 + } + return o.BootedAt +} + +func (o *CreateDeploymentResponseBody) GetBuildingAt() float64 { + if o == nil { + return 0.0 + } + return o.BuildingAt +} + +func (o *CreateDeploymentResponseBody) GetBuildSkipped() bool { + if o == nil { + return false + } + return o.BuildSkipped +} + +func (o *CreateDeploymentResponseBody) GetCreator() Creator { + if o == nil { + return Creator{} + } + return o.Creator +} + +func (o *CreateDeploymentResponseBody) GetInitReadyAt() *float64 { + if o == nil { + return nil + } + return o.InitReadyAt +} + +func (o *CreateDeploymentResponseBody) GetIsFirstBranchDeployment() *bool { + if o == nil { + return nil + } + return o.IsFirstBranchDeployment +} + +func (o *CreateDeploymentResponseBody) GetLambdas() []Lambdas { + if o == nil { + return nil + } + return o.Lambdas +} + +func (o *CreateDeploymentResponseBody) GetPublic() bool { + if o == nil { + return false + } + return o.Public +} + +func (o *CreateDeploymentResponseBody) GetReady() *float64 { + if o == nil { + return nil + } + return o.Ready +} + +func (o *CreateDeploymentResponseBody) GetStatus() CreateDeploymentStatus { + if o == nil { + return CreateDeploymentStatus("") + } + return o.Status +} + +func (o *CreateDeploymentResponseBody) GetTeam() *Team { + if o == nil { + return nil + } + return o.Team +} + +func (o *CreateDeploymentResponseBody) GetUserAliases() []string { + if o == nil { + return nil + } + return o.UserAliases +} + +func (o *CreateDeploymentResponseBody) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *CreateDeploymentResponseBody) GetTtyBuildLogs() *bool { + if o == nil { + return nil + } + return o.TtyBuildLogs +} + +func (o *CreateDeploymentResponseBody) GetCustomEnvironment() *CustomEnvironment { + if o == nil { + return nil + } + return o.CustomEnvironment +} + +func (o *CreateDeploymentResponseBody) GetType() CreateDeploymentType { + if o == nil { + return CreateDeploymentType("") + } + return o.Type +} + +func (o *CreateDeploymentResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateDeploymentResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateDeploymentResponseBody) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *CreateDeploymentResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateDeploymentResponseBody) GetVersion() float64 { + if o == nil { + return 0.0 + } + return o.Version +} + +func (o *CreateDeploymentResponseBody) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *CreateDeploymentResponseBody) GetGitSource() *CreateDeploymentGitSource { + if o == nil { + return nil + } + return o.GitSource +} + +func (o *CreateDeploymentResponseBody) GetMeta() map[string]string { + if o == nil { + return map[string]string{} + } + return o.Meta +} + +func (o *CreateDeploymentResponseBody) GetProject() *Project { + if o == nil { + return nil + } + return o.Project +} + +func (o *CreateDeploymentResponseBody) GetReadyState() ReadyState { + if o == nil { + return ReadyState("") + } + return o.ReadyState +} + +func (o *CreateDeploymentResponseBody) GetSource() *CreateDeploymentSource { + if o == nil { + return nil + } + return o.Source +} + +func (o *CreateDeploymentResponseBody) GetTarget() *CreateDeploymentTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *CreateDeploymentResponseBody) GetPassiveRegions() []string { + if o == nil { + return nil + } + return o.PassiveRegions +} + +func (o *CreateDeploymentResponseBody) GetRegions() []string { + if o == nil { + return []string{} + } + return o.Regions +} + +func (o *CreateDeploymentResponseBody) GetErrorMessage() *string { + if o == nil { + return nil + } + return o.ErrorMessage +} + +func (o *CreateDeploymentResponseBody) GetAliasWarning() *AliasWarning { + if o == nil { + return nil + } + return o.AliasWarning +} + +func (o *CreateDeploymentResponseBody) GetAliasError() *AliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *CreateDeploymentResponseBody) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *CreateDeploymentResponseBody) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *CreateDeploymentResponseBody) GetBuildErrorAt() *float64 { + if o == nil { + return nil + } + return o.BuildErrorAt +} + +func (o *CreateDeploymentResponseBody) GetChecksState() *ChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *CreateDeploymentResponseBody) GetChecksConclusion() *ChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *CreateDeploymentResponseBody) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *CreateDeploymentResponseBody) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CreateDeploymentResponseBody) GetErrorCode() *string { + if o == nil { + return nil + } + return o.ErrorCode +} + +func (o *CreateDeploymentResponseBody) GetErrorLink() *string { + if o == nil { + return nil + } + return o.ErrorLink +} + +func (o *CreateDeploymentResponseBody) GetErrorStep() *string { + if o == nil { + return nil + } + return o.ErrorStep +} + +func (o *CreateDeploymentResponseBody) GetOriginCacheRegion() *string { + if o == nil { + return nil + } + return o.OriginCacheRegion +} + +func (o *CreateDeploymentResponseBody) GetReadySubstate() *ReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *CreateDeploymentResponseBody) GetSoftDeletedByRetention() *bool { + if o == nil { + return nil + } + return o.SoftDeletedByRetention +} + +func (o *CreateDeploymentResponseBody) GetUndeletedAt() *float64 { + if o == nil { + return nil + } + return o.UndeletedAt +} + +func (o *CreateDeploymentResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateDeploymentResponseBody) GetOidcTokenClaims() *OidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *CreateDeploymentResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *CreateDeploymentResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *CreateDeploymentResponseBody) GetMicrofrontends() *CreateDeploymentMicrofrontends { + if o == nil { + return nil + } + return o.Microfrontends +} + +func (o *CreateDeploymentResponseBody) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *CreateDeploymentResponseBody) GetFunctions() map[string]Functions { + if o == nil { + return nil + } + return o.Functions +} + +func (o *CreateDeploymentResponseBody) GetRoutes() []Routes { + if o == nil { + return nil + } + return o.Routes +} + +func (o *CreateDeploymentResponseBody) GetCrons() []CreateDeploymentCrons { + if o == nil { + return nil + } + return o.Crons +} + +func (o *CreateDeploymentResponseBody) GetPlan() Plan { + if o == nil { + return Plan("") + } + return o.Plan +} + +func (o *CreateDeploymentResponseBody) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *CreateDeploymentResponseBody) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *CreateDeploymentResponseBody) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *CreateDeploymentResponseBody) GetPassiveConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.PassiveConnectConfigurationID +} + +func (o *CreateDeploymentResponseBody) GetGitRepo() *GitRepo { + if o == nil { + return nil + } + return o.GitRepo +} + +func (o *CreateDeploymentResponseBody) GetFlags() *Flags { + if o == nil { + return nil + } + return o.Flags +} + +type CreateDeploymentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The successfully created deployment + Object *CreateDeploymentResponseBody +} + +func (o *CreateDeploymentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateDeploymentResponse) GetObject() *CreateDeploymentResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createedgeconfig.go b/src/__tests__/mockserver/internal/sdk/models/operations/createedgeconfig.go new file mode 100644 index 00000000..523c60bc --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createedgeconfig.go @@ -0,0 +1,572 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type Two5 struct { +} + +type Items2Type string + +const ( + Items2TypeStr Items2Type = "str" + Items2TypeNumber Items2Type = "number" + Items2TypeBoolean Items2Type = "boolean" + Items2TypeAny Items2Type = "any" + Items2TypeTwo5 Items2Type = "2_5" +) + +type Items2 struct { + Str *string + Number *float64 + Boolean *bool + Any any + Two5 *Two5 + + Type Items2Type +} + +func CreateItems2Str(str string) Items2 { + typ := Items2TypeStr + + return Items2{ + Str: &str, + Type: typ, + } +} + +func CreateItems2Number(number float64) Items2 { + typ := Items2TypeNumber + + return Items2{ + Number: &number, + Type: typ, + } +} + +func CreateItems2Boolean(boolean bool) Items2 { + typ := Items2TypeBoolean + + return Items2{ + Boolean: &boolean, + Type: typ, + } +} + +func CreateItems2Any(any any) Items2 { + typ := Items2TypeAny + + return Items2{ + Any: any, + Type: typ, + } +} + +func CreateItems2Two5(two5 Two5) Items2 { + typ := Items2TypeTwo5 + + return Items2{ + Two5: &two5, + Type: typ, + } +} + +func (u *Items2) UnmarshalJSON(data []byte) error { + + var two5 Two5 = Two5{} + if err := utils.UnmarshalJSON(data, &two5, "", true, true); err == nil { + u.Two5 = &two5 + u.Type = Items2TypeTwo5 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = Items2TypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = Items2TypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = Items2TypeBoolean + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = Items2TypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Items2", string(data)) +} + +func (u Items2) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + if u.Two5 != nil { + return utils.MarshalJSON(u.Two5, "", true) + } + + return nil, errors.New("could not marshal union type Items2: all fields are null") +} + +type One5 struct { +} + +type Items1Type string + +const ( + Items1TypeStr Items1Type = "str" + Items1TypeNumber Items1Type = "number" + Items1TypeBoolean Items1Type = "boolean" + Items1TypeAny Items1Type = "any" + Items1TypeOne5 Items1Type = "1_5" +) + +type Items1 struct { + Str *string + Number *float64 + Boolean *bool + Any any + One5 *One5 + + Type Items1Type +} + +func CreateItems1Str(str string) Items1 { + typ := Items1TypeStr + + return Items1{ + Str: &str, + Type: typ, + } +} + +func CreateItems1Number(number float64) Items1 { + typ := Items1TypeNumber + + return Items1{ + Number: &number, + Type: typ, + } +} + +func CreateItems1Boolean(boolean bool) Items1 { + typ := Items1TypeBoolean + + return Items1{ + Boolean: &boolean, + Type: typ, + } +} + +func CreateItems1Any(any any) Items1 { + typ := Items1TypeAny + + return Items1{ + Any: any, + Type: typ, + } +} + +func CreateItems1One5(one5 One5) Items1 { + typ := Items1TypeOne5 + + return Items1{ + One5: &one5, + Type: typ, + } +} + +func (u *Items1) UnmarshalJSON(data []byte) error { + + var one5 One5 = One5{} + if err := utils.UnmarshalJSON(data, &one5, "", true, true); err == nil { + u.One5 = &one5 + u.Type = Items1TypeOne5 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = Items1TypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = Items1TypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = Items1TypeBoolean + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = Items1TypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Items1", string(data)) +} + +func (u Items1) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + if u.One5 != nil { + return utils.MarshalJSON(u.One5, "", true) + } + + return nil, errors.New("could not marshal union type Items1: all fields are null") +} + +type ItemsType string + +const ( + ItemsTypeItems1 ItemsType = "items_1" + ItemsTypeArrayOfItems2 ItemsType = "arrayOfItems2" +) + +type Items struct { + Items1 *Items1 + ArrayOfItems2 []Items2 + + Type ItemsType +} + +func CreateItemsItems1(items1 Items1) Items { + typ := ItemsTypeItems1 + + return Items{ + Items1: &items1, + Type: typ, + } +} + +func CreateItemsArrayOfItems2(arrayOfItems2 []Items2) Items { + typ := ItemsTypeArrayOfItems2 + + return Items{ + ArrayOfItems2: arrayOfItems2, + Type: typ, + } +} + +func (u *Items) UnmarshalJSON(data []byte) error { + + var items1 Items1 = Items1{} + if err := utils.UnmarshalJSON(data, &items1, "", true, true); err == nil { + u.Items1 = &items1 + u.Type = ItemsTypeItems1 + return nil + } + + var arrayOfItems2 []Items2 = []Items2{} + if err := utils.UnmarshalJSON(data, &arrayOfItems2, "", true, true); err == nil { + u.ArrayOfItems2 = arrayOfItems2 + u.Type = ItemsTypeArrayOfItems2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Items", string(data)) +} + +func (u Items) MarshalJSON() ([]byte, error) { + if u.Items1 != nil { + return utils.MarshalJSON(u.Items1, "", true) + } + + if u.ArrayOfItems2 != nil { + return utils.MarshalJSON(u.ArrayOfItems2, "", true) + } + + return nil, errors.New("could not marshal union type Items: all fields are null") +} + +type CreateEdgeConfigRequestBody struct { + Slug string `json:"slug"` + Items map[string]Items `json:"items,omitempty"` +} + +func (o *CreateEdgeConfigRequestBody) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *CreateEdgeConfigRequestBody) GetItems() map[string]Items { + if o == nil { + return nil + } + return o.Items +} + +type CreateEdgeConfigRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateEdgeConfigRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateEdgeConfigRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateEdgeConfigRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateEdgeConfigRequest) GetRequestBody() CreateEdgeConfigRequestBody { + if o == nil { + return CreateEdgeConfigRequestBody{} + } + return o.RequestBody +} + +// CreateEdgeConfigTransfer - Keeps track of the current state of the Edge Config while it gets transferred. +type CreateEdgeConfigTransfer struct { + FromAccountID string `json:"fromAccountId"` + StartedAt float64 `json:"startedAt"` + DoneAt *float64 `json:"doneAt"` +} + +func (o *CreateEdgeConfigTransfer) GetFromAccountID() string { + if o == nil { + return "" + } + return o.FromAccountID +} + +func (o *CreateEdgeConfigTransfer) GetStartedAt() float64 { + if o == nil { + return 0.0 + } + return o.StartedAt +} + +func (o *CreateEdgeConfigTransfer) GetDoneAt() *float64 { + if o == nil { + return nil + } + return o.DoneAt +} + +type CreateEdgeConfigSchema struct { +} + +type CreateEdgeConfigType string + +const ( + CreateEdgeConfigTypeFlags CreateEdgeConfigType = "flags" +) + +func (e CreateEdgeConfigType) ToPointer() *CreateEdgeConfigType { + return &e +} +func (e *CreateEdgeConfigType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags": + *e = CreateEdgeConfigType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateEdgeConfigType: %v", v) + } +} + +type CreateEdgeConfigPurpose struct { + Type CreateEdgeConfigType `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *CreateEdgeConfigPurpose) GetType() CreateEdgeConfigType { + if o == nil { + return CreateEdgeConfigType("") + } + return o.Type +} + +func (o *CreateEdgeConfigPurpose) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +// CreateEdgeConfigResponseBody - An Edge Config +type CreateEdgeConfigResponseBody struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + ID *string `json:"id,omitempty"` + // Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). + Slug *string `json:"slug,omitempty"` + OwnerID *string `json:"ownerId,omitempty"` + Digest *string `json:"digest,omitempty"` + // Keeps track of the current state of the Edge Config while it gets transferred. + Transfer *CreateEdgeConfigTransfer `json:"transfer,omitempty"` + Schema *CreateEdgeConfigSchema `json:"schema,omitempty"` + Purpose *CreateEdgeConfigPurpose `json:"purpose,omitempty"` + SizeInBytes float64 `json:"sizeInBytes"` + ItemCount float64 `json:"itemCount"` +} + +func (o *CreateEdgeConfigResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateEdgeConfigResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *CreateEdgeConfigResponseBody) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *CreateEdgeConfigResponseBody) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateEdgeConfigResponseBody) GetOwnerID() *string { + if o == nil { + return nil + } + return o.OwnerID +} + +func (o *CreateEdgeConfigResponseBody) GetDigest() *string { + if o == nil { + return nil + } + return o.Digest +} + +func (o *CreateEdgeConfigResponseBody) GetTransfer() *CreateEdgeConfigTransfer { + if o == nil { + return nil + } + return o.Transfer +} + +func (o *CreateEdgeConfigResponseBody) GetSchema() *CreateEdgeConfigSchema { + if o == nil { + return nil + } + return o.Schema +} + +func (o *CreateEdgeConfigResponseBody) GetPurpose() *CreateEdgeConfigPurpose { + if o == nil { + return nil + } + return o.Purpose +} + +func (o *CreateEdgeConfigResponseBody) GetSizeInBytes() float64 { + if o == nil { + return 0.0 + } + return o.SizeInBytes +} + +func (o *CreateEdgeConfigResponseBody) GetItemCount() float64 { + if o == nil { + return 0.0 + } + return o.ItemCount +} + +type CreateEdgeConfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CreateEdgeConfigResponseBody +} + +func (o *CreateEdgeConfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateEdgeConfigResponse) GetObject() *CreateEdgeConfigResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createedgeconfigtoken.go b/src/__tests__/mockserver/internal/sdk/models/operations/createedgeconfigtoken.go new file mode 100644 index 00000000..5eaee0ac --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createedgeconfigtoken.go @@ -0,0 +1,93 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateEdgeConfigTokenRequestBody struct { + Label string `json:"label"` +} + +func (o *CreateEdgeConfigTokenRequestBody) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +type CreateEdgeConfigTokenRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateEdgeConfigTokenRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateEdgeConfigTokenRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *CreateEdgeConfigTokenRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateEdgeConfigTokenRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateEdgeConfigTokenRequest) GetRequestBody() CreateEdgeConfigTokenRequestBody { + if o == nil { + return CreateEdgeConfigTokenRequestBody{} + } + return o.RequestBody +} + +type CreateEdgeConfigTokenResponseBody struct { + Token string `json:"token"` + ID string `json:"id"` +} + +func (o *CreateEdgeConfigTokenResponseBody) GetToken() string { + if o == nil { + return "" + } + return o.Token +} + +func (o *CreateEdgeConfigTokenResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type CreateEdgeConfigTokenResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CreateEdgeConfigTokenResponseBody +} + +func (o *CreateEdgeConfigTokenResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateEdgeConfigTokenResponse) GetObject() *CreateEdgeConfigTokenResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createevent.go b/src/__tests__/mockserver/internal/sdk/models/operations/createevent.go new file mode 100644 index 00000000..2fa1a9a2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createevent.go @@ -0,0 +1,210 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type CreateEventEventType string + +const ( + CreateEventEventTypeResourceUpdated CreateEventEventType = "resource.updated" +) + +func (e CreateEventEventType) ToPointer() *CreateEventEventType { + return &e +} +func (e *CreateEventEventType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "resource.updated": + *e = CreateEventEventType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateEventEventType: %v", v) + } +} + +type Event2 struct { + Type CreateEventEventType `json:"type"` + // Partner-provided product slug or id + ProductID string `json:"productId"` + // Partner provided resource ID + ResourceID string `json:"resourceId"` +} + +func (o *Event2) GetType() CreateEventEventType { + if o == nil { + return CreateEventEventType("") + } + return o.Type +} + +func (o *Event2) GetProductID() string { + if o == nil { + return "" + } + return o.ProductID +} + +func (o *Event2) GetResourceID() string { + if o == nil { + return "" + } + return o.ResourceID +} + +type EventType string + +const ( + EventTypeInstallationUpdated EventType = "installation.updated" +) + +func (e EventType) ToPointer() *EventType { + return &e +} +func (e *EventType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "installation.updated": + *e = EventType(v) + return nil + default: + return fmt.Errorf("invalid value for EventType: %v", v) + } +} + +type Event1 struct { + Type EventType `json:"type"` + // The installation-level billing plan ID + BillingPlanID *string `json:"billingPlanId,omitempty"` +} + +func (o *Event1) GetType() EventType { + if o == nil { + return EventType("") + } + return o.Type +} + +func (o *Event1) GetBillingPlanID() *string { + if o == nil { + return nil + } + return o.BillingPlanID +} + +type CreateEventEventUnionType string + +const ( + CreateEventEventUnionTypeEvent1 CreateEventEventUnionType = "event_1" + CreateEventEventUnionTypeEvent2 CreateEventEventUnionType = "event_2" +) + +type CreateEventEvent struct { + Event1 *Event1 + Event2 *Event2 + + Type CreateEventEventUnionType +} + +func CreateCreateEventEventEvent1(event1 Event1) CreateEventEvent { + typ := CreateEventEventUnionTypeEvent1 + + return CreateEventEvent{ + Event1: &event1, + Type: typ, + } +} + +func CreateCreateEventEventEvent2(event2 Event2) CreateEventEvent { + typ := CreateEventEventUnionTypeEvent2 + + return CreateEventEvent{ + Event2: &event2, + Type: typ, + } +} + +func (u *CreateEventEvent) UnmarshalJSON(data []byte) error { + + var event1 Event1 = Event1{} + if err := utils.UnmarshalJSON(data, &event1, "", true, true); err == nil { + u.Event1 = &event1 + u.Type = CreateEventEventUnionTypeEvent1 + return nil + } + + var event2 Event2 = Event2{} + if err := utils.UnmarshalJSON(data, &event2, "", true, true); err == nil { + u.Event2 = &event2 + u.Type = CreateEventEventUnionTypeEvent2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateEventEvent", string(data)) +} + +func (u CreateEventEvent) MarshalJSON() ([]byte, error) { + if u.Event1 != nil { + return utils.MarshalJSON(u.Event1, "", true) + } + + if u.Event2 != nil { + return utils.MarshalJSON(u.Event2, "", true) + } + + return nil, errors.New("could not marshal union type CreateEventEvent: all fields are null") +} + +type CreateEventRequestBody struct { + Event CreateEventEvent `json:"event"` +} + +func (o *CreateEventRequestBody) GetEvent() CreateEventEvent { + if o == nil { + return CreateEventEvent{} + } + return o.Event +} + +type CreateEventRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` + RequestBody CreateEventRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateEventRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +func (o *CreateEventRequest) GetRequestBody() CreateEventRequestBody { + if o == nil { + return CreateEventRequestBody{} + } + return o.RequestBody +} + +type CreateEventResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *CreateEventResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createlogdrain.go b/src/__tests__/mockserver/internal/sdk/models/operations/createlogdrain.go new file mode 100644 index 00000000..0187e996 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createlogdrain.go @@ -0,0 +1,494 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// DeliveryFormat - The delivery log format +type DeliveryFormat string + +const ( + DeliveryFormatJSON DeliveryFormat = "json" + DeliveryFormatNdjson DeliveryFormat = "ndjson" + DeliveryFormatSyslog DeliveryFormat = "syslog" +) + +func (e DeliveryFormat) ToPointer() *DeliveryFormat { + return &e +} +func (e *DeliveryFormat) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "json": + fallthrough + case "ndjson": + fallthrough + case "syslog": + *e = DeliveryFormat(v) + return nil + default: + return fmt.Errorf("invalid value for DeliveryFormat: %v", v) + } +} + +type Sources string + +const ( + SourcesStatic Sources = "static" + SourcesLambda Sources = "lambda" + SourcesBuild Sources = "build" + SourcesEdge Sources = "edge" + SourcesExternal Sources = "external" + SourcesFirewall Sources = "firewall" +) + +func (e Sources) ToPointer() *Sources { + return &e +} +func (e *Sources) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "static": + fallthrough + case "lambda": + fallthrough + case "build": + fallthrough + case "edge": + fallthrough + case "external": + fallthrough + case "firewall": + *e = Sources(v) + return nil + default: + return fmt.Errorf("invalid value for Sources: %v", v) + } +} + +type Environments string + +const ( + EnvironmentsPreview Environments = "preview" + EnvironmentsProduction Environments = "production" +) + +func (e Environments) ToPointer() *Environments { + return &e +} +func (e *Environments) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "preview": + fallthrough + case "production": + *e = Environments(v) + return nil + default: + return fmt.Errorf("invalid value for Environments: %v", v) + } +} + +type CreateLogDrainRequestBody struct { + // The name of the log drain + Name string `json:"name"` + ProjectIds []string `json:"projectIds,omitempty"` + // A secret to sign log drain notification headers so a consumer can verify their authenticity + Secret *string `json:"secret,omitempty"` + // The delivery log format + DeliveryFormat *DeliveryFormat `json:"deliveryFormat,omitempty"` + // The url where you will receive logs. The protocol must be `https://` or `http://` when type is `json` and `ndjson`, and `syslog+tls:` or `syslog:` when the type is `syslog`. + URL string `json:"url"` + Sources []Sources `json:"sources,omitempty"` + // Headers to be sent together with the request + Headers map[string]string `json:"headers,omitempty"` + Environments []Environments `json:"environments,omitempty"` +} + +func (o *CreateLogDrainRequestBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateLogDrainRequestBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +func (o *CreateLogDrainRequestBody) GetSecret() *string { + if o == nil { + return nil + } + return o.Secret +} + +func (o *CreateLogDrainRequestBody) GetDeliveryFormat() *DeliveryFormat { + if o == nil { + return nil + } + return o.DeliveryFormat +} + +func (o *CreateLogDrainRequestBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateLogDrainRequestBody) GetSources() []Sources { + if o == nil { + return nil + } + return o.Sources +} + +func (o *CreateLogDrainRequestBody) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *CreateLogDrainRequestBody) GetEnvironments() []Environments { + if o == nil { + return nil + } + return o.Environments +} + +type CreateLogDrainRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateLogDrainRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateLogDrainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateLogDrainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateLogDrainRequest) GetRequestBody() CreateLogDrainRequestBody { + if o == nil { + return CreateLogDrainRequestBody{} + } + return o.RequestBody +} + +// CreateLogDrainDeliveryFormat - The delivery log format +type CreateLogDrainDeliveryFormat string + +const ( + CreateLogDrainDeliveryFormatJSON CreateLogDrainDeliveryFormat = "json" + CreateLogDrainDeliveryFormatNdjson CreateLogDrainDeliveryFormat = "ndjson" + CreateLogDrainDeliveryFormatSyslog CreateLogDrainDeliveryFormat = "syslog" +) + +func (e CreateLogDrainDeliveryFormat) ToPointer() *CreateLogDrainDeliveryFormat { + return &e +} +func (e *CreateLogDrainDeliveryFormat) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "json": + fallthrough + case "ndjson": + fallthrough + case "syslog": + *e = CreateLogDrainDeliveryFormat(v) + return nil + default: + return fmt.Errorf("invalid value for CreateLogDrainDeliveryFormat: %v", v) + } +} + +// CreateLogDrainSources - The sources from which logs are currently being delivered to this log drain. +type CreateLogDrainSources string + +const ( + CreateLogDrainSourcesBuild CreateLogDrainSources = "build" + CreateLogDrainSourcesEdge CreateLogDrainSources = "edge" + CreateLogDrainSourcesLambda CreateLogDrainSources = "lambda" + CreateLogDrainSourcesStatic CreateLogDrainSources = "static" + CreateLogDrainSourcesExternal CreateLogDrainSources = "external" + CreateLogDrainSourcesFirewall CreateLogDrainSources = "firewall" +) + +func (e CreateLogDrainSources) ToPointer() *CreateLogDrainSources { + return &e +} +func (e *CreateLogDrainSources) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "build": + fallthrough + case "edge": + fallthrough + case "lambda": + fallthrough + case "static": + fallthrough + case "external": + fallthrough + case "firewall": + *e = CreateLogDrainSources(v) + return nil + default: + return fmt.Errorf("invalid value for CreateLogDrainSources: %v", v) + } +} + +// CreateLogDrainCreatedFrom - Whether the log drain was created by an integration or by a user +type CreateLogDrainCreatedFrom string + +const ( + CreateLogDrainCreatedFromSelfServed CreateLogDrainCreatedFrom = "self-served" + CreateLogDrainCreatedFromIntegration CreateLogDrainCreatedFrom = "integration" +) + +func (e CreateLogDrainCreatedFrom) ToPointer() *CreateLogDrainCreatedFrom { + return &e +} +func (e *CreateLogDrainCreatedFrom) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "self-served": + fallthrough + case "integration": + *e = CreateLogDrainCreatedFrom(v) + return nil + default: + return fmt.Errorf("invalid value for CreateLogDrainCreatedFrom: %v", v) + } +} + +// CreateLogDrainEnvironments - The environment of log drain +type CreateLogDrainEnvironments string + +const ( + CreateLogDrainEnvironmentsProduction CreateLogDrainEnvironments = "production" + CreateLogDrainEnvironmentsPreview CreateLogDrainEnvironments = "preview" +) + +func (e CreateLogDrainEnvironments) ToPointer() *CreateLogDrainEnvironments { + return &e +} +func (e *CreateLogDrainEnvironments) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + *e = CreateLogDrainEnvironments(v) + return nil + default: + return fmt.Errorf("invalid value for CreateLogDrainEnvironments: %v", v) + } +} + +// CreateLogDrainResponseBody - The log drain was successfully created +type CreateLogDrainResponseBody struct { + // The oauth2 client application id that created this log drain + ClientID *string `json:"clientId,omitempty"` + // The client configuration this log drain was created with + ConfigurationID *string `json:"configurationId,omitempty"` + // A timestamp that tells you when the log drain was created + CreatedAt float64 `json:"createdAt"` + // The unique identifier of the log drain. Always prefixed with `ld_` + ID string `json:"id"` + // The delivery log format + DeliveryFormat *CreateLogDrainDeliveryFormat `json:"deliveryFormat,omitempty"` + // The name of the log drain + Name string `json:"name"` + // The identifier of the team or user whose events will trigger the log drain + OwnerID string `json:"ownerId"` + ProjectID *string `json:"projectId,omitempty"` + // The identifier of the projects this log drain is associated with + ProjectIds []string `json:"projectIds,omitempty"` + // The URL to call when logs are generated + URL string `json:"url"` + // The sources from which logs are currently being delivered to this log drain. + Sources []CreateLogDrainSources `json:"sources,omitempty"` + // Whether the log drain was created by an integration or by a user + CreatedFrom *CreateLogDrainCreatedFrom `json:"createdFrom,omitempty"` + // The headers to send with the request + Headers map[string]string `json:"headers,omitempty"` + // The environment of log drain + Environments []CreateLogDrainEnvironments `json:"environments"` + // The branch regexp of log drain + Branch *string `json:"branch,omitempty"` + // The sampling rate of log drain + SamplingRate *float64 `json:"samplingRate,omitempty"` +} + +func (o *CreateLogDrainResponseBody) GetClientID() *string { + if o == nil { + return nil + } + return o.ClientID +} + +func (o *CreateLogDrainResponseBody) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *CreateLogDrainResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateLogDrainResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateLogDrainResponseBody) GetDeliveryFormat() *CreateLogDrainDeliveryFormat { + if o == nil { + return nil + } + return o.DeliveryFormat +} + +func (o *CreateLogDrainResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateLogDrainResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *CreateLogDrainResponseBody) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *CreateLogDrainResponseBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +func (o *CreateLogDrainResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateLogDrainResponseBody) GetSources() []CreateLogDrainSources { + if o == nil { + return nil + } + return o.Sources +} + +func (o *CreateLogDrainResponseBody) GetCreatedFrom() *CreateLogDrainCreatedFrom { + if o == nil { + return nil + } + return o.CreatedFrom +} + +func (o *CreateLogDrainResponseBody) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *CreateLogDrainResponseBody) GetEnvironments() []CreateLogDrainEnvironments { + if o == nil { + return []CreateLogDrainEnvironments{} + } + return o.Environments +} + +func (o *CreateLogDrainResponseBody) GetBranch() *string { + if o == nil { + return nil + } + return o.Branch +} + +func (o *CreateLogDrainResponseBody) GetSamplingRate() *float64 { + if o == nil { + return nil + } + return o.SamplingRate +} + +type CreateLogDrainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The log drain was successfully created + Object *CreateLogDrainResponseBody +} + +func (o *CreateLogDrainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateLogDrainResponse) GetObject() *CreateLogDrainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createortransferdomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/createortransferdomain.go new file mode 100644 index 00000000..4bc675f2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createortransferdomain.go @@ -0,0 +1,493 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// CreateOrTransferDomainRequestBody3 - transfer-in +type CreateOrTransferDomainRequestBody3 struct { + // The domain name you want to add. + Name string `json:"name"` + // The domain operation to perform. It can be either `add` or `transfer-in`. + Method string `json:"method"` + // The authorization code assigned to the domain. + AuthCode *string `json:"authCode,omitempty"` + // The price you expect to be charged for the required 1 year renewal. + ExpectedPrice *float64 `json:"expectedPrice,omitempty"` +} + +func (o *CreateOrTransferDomainRequestBody3) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateOrTransferDomainRequestBody3) GetMethod() string { + if o == nil { + return "" + } + return o.Method +} + +func (o *CreateOrTransferDomainRequestBody3) GetAuthCode() *string { + if o == nil { + return nil + } + return o.AuthCode +} + +func (o *CreateOrTransferDomainRequestBody3) GetExpectedPrice() *float64 { + if o == nil { + return nil + } + return o.ExpectedPrice +} + +// CreateOrTransferDomainRequestBody2 - move-in +type CreateOrTransferDomainRequestBody2 struct { + // The domain name you want to add. + Name string `json:"name"` + // The domain operation to perform. It can be either `add` or `transfer-in`. + Method string `json:"method"` + // The move-in token from Move Requested email. + Token *string `json:"token,omitempty"` +} + +func (o *CreateOrTransferDomainRequestBody2) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateOrTransferDomainRequestBody2) GetMethod() string { + if o == nil { + return "" + } + return o.Method +} + +func (o *CreateOrTransferDomainRequestBody2) GetToken() *string { + if o == nil { + return nil + } + return o.Token +} + +// CreateOrTransferDomainRequestBody1 - add +type CreateOrTransferDomainRequestBody1 struct { + // The domain name you want to add. + Name string `json:"name"` + // Whether the domain has the Vercel Edge Network enabled or not. + CdnEnabled *bool `json:"cdnEnabled,omitempty"` + Zone *bool `json:"zone,omitempty"` + // The domain operation to perform. It can be either `add` or `transfer-in`. + Method *string `json:"method,omitempty"` +} + +func (o *CreateOrTransferDomainRequestBody1) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateOrTransferDomainRequestBody1) GetCdnEnabled() *bool { + if o == nil { + return nil + } + return o.CdnEnabled +} + +func (o *CreateOrTransferDomainRequestBody1) GetZone() *bool { + if o == nil { + return nil + } + return o.Zone +} + +func (o *CreateOrTransferDomainRequestBody1) GetMethod() *string { + if o == nil { + return nil + } + return o.Method +} + +type CreateOrTransferDomainRequestBodyType string + +const ( + CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody1 CreateOrTransferDomainRequestBodyType = "createOrTransferDomain_requestBody_1" + CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody2 CreateOrTransferDomainRequestBodyType = "createOrTransferDomain_requestBody_2" + CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody3 CreateOrTransferDomainRequestBodyType = "createOrTransferDomain_requestBody_3" +) + +type CreateOrTransferDomainRequestBody struct { + CreateOrTransferDomainRequestBody1 *CreateOrTransferDomainRequestBody1 + CreateOrTransferDomainRequestBody2 *CreateOrTransferDomainRequestBody2 + CreateOrTransferDomainRequestBody3 *CreateOrTransferDomainRequestBody3 + + Type CreateOrTransferDomainRequestBodyType +} + +func CreateCreateOrTransferDomainRequestBodyCreateOrTransferDomainRequestBody1(createOrTransferDomainRequestBody1 CreateOrTransferDomainRequestBody1) CreateOrTransferDomainRequestBody { + typ := CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody1 + + return CreateOrTransferDomainRequestBody{ + CreateOrTransferDomainRequestBody1: &createOrTransferDomainRequestBody1, + Type: typ, + } +} + +func CreateCreateOrTransferDomainRequestBodyCreateOrTransferDomainRequestBody2(createOrTransferDomainRequestBody2 CreateOrTransferDomainRequestBody2) CreateOrTransferDomainRequestBody { + typ := CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody2 + + return CreateOrTransferDomainRequestBody{ + CreateOrTransferDomainRequestBody2: &createOrTransferDomainRequestBody2, + Type: typ, + } +} + +func CreateCreateOrTransferDomainRequestBodyCreateOrTransferDomainRequestBody3(createOrTransferDomainRequestBody3 CreateOrTransferDomainRequestBody3) CreateOrTransferDomainRequestBody { + typ := CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody3 + + return CreateOrTransferDomainRequestBody{ + CreateOrTransferDomainRequestBody3: &createOrTransferDomainRequestBody3, + Type: typ, + } +} + +func (u *CreateOrTransferDomainRequestBody) UnmarshalJSON(data []byte) error { + + var createOrTransferDomainRequestBody2 CreateOrTransferDomainRequestBody2 = CreateOrTransferDomainRequestBody2{} + if err := utils.UnmarshalJSON(data, &createOrTransferDomainRequestBody2, "", true, true); err == nil { + u.CreateOrTransferDomainRequestBody2 = &createOrTransferDomainRequestBody2 + u.Type = CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody2 + return nil + } + + var createOrTransferDomainRequestBody1 CreateOrTransferDomainRequestBody1 = CreateOrTransferDomainRequestBody1{} + if err := utils.UnmarshalJSON(data, &createOrTransferDomainRequestBody1, "", true, true); err == nil { + u.CreateOrTransferDomainRequestBody1 = &createOrTransferDomainRequestBody1 + u.Type = CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody1 + return nil + } + + var createOrTransferDomainRequestBody3 CreateOrTransferDomainRequestBody3 = CreateOrTransferDomainRequestBody3{} + if err := utils.UnmarshalJSON(data, &createOrTransferDomainRequestBody3, "", true, true); err == nil { + u.CreateOrTransferDomainRequestBody3 = &createOrTransferDomainRequestBody3 + u.Type = CreateOrTransferDomainRequestBodyTypeCreateOrTransferDomainRequestBody3 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateOrTransferDomainRequestBody", string(data)) +} + +func (u CreateOrTransferDomainRequestBody) MarshalJSON() ([]byte, error) { + if u.CreateOrTransferDomainRequestBody1 != nil { + return utils.MarshalJSON(u.CreateOrTransferDomainRequestBody1, "", true) + } + + if u.CreateOrTransferDomainRequestBody2 != nil { + return utils.MarshalJSON(u.CreateOrTransferDomainRequestBody2, "", true) + } + + if u.CreateOrTransferDomainRequestBody3 != nil { + return utils.MarshalJSON(u.CreateOrTransferDomainRequestBody3, "", true) + } + + return nil, errors.New("could not marshal union type CreateOrTransferDomainRequestBody: all fields are null") +} + +type CreateOrTransferDomainRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateOrTransferDomainRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateOrTransferDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateOrTransferDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateOrTransferDomainRequest) GetRequestBody() CreateOrTransferDomainRequestBody { + if o == nil { + return CreateOrTransferDomainRequestBody{} + } + return o.RequestBody +} + +// CreateOrTransferDomainCreator - An object containing information of the domain creator, including the user's id, username, and email. +type CreateOrTransferDomainCreator struct { + Username string `json:"username"` + Email string `json:"email"` + CustomerID *string `json:"customerId,omitempty"` + IsDomainReseller *bool `json:"isDomainReseller,omitempty"` + ID string `json:"id"` +} + +func (o *CreateOrTransferDomainCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *CreateOrTransferDomainCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *CreateOrTransferDomainCreator) GetCustomerID() *string { + if o == nil { + return nil + } + return o.CustomerID +} + +func (o *CreateOrTransferDomainCreator) GetIsDomainReseller() *bool { + if o == nil { + return nil + } + return o.IsDomainReseller +} + +func (o *CreateOrTransferDomainCreator) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +// CreateOrTransferDomainServiceType - The type of service the domain is handled by. `external` if the DNS is externally handled, `zeit.world` if handled with Vercel, or `na` if the service is not available. +type CreateOrTransferDomainServiceType string + +const ( + CreateOrTransferDomainServiceTypeZeitWorld CreateOrTransferDomainServiceType = "zeit.world" + CreateOrTransferDomainServiceTypeExternal CreateOrTransferDomainServiceType = "external" + CreateOrTransferDomainServiceTypeNa CreateOrTransferDomainServiceType = "na" +) + +func (e CreateOrTransferDomainServiceType) ToPointer() *CreateOrTransferDomainServiceType { + return &e +} +func (e *CreateOrTransferDomainServiceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "zeit.world": + fallthrough + case "external": + fallthrough + case "na": + *e = CreateOrTransferDomainServiceType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateOrTransferDomainServiceType: %v", v) + } +} + +type CreateOrTransferDomainDomain struct { + // If the domain has the ownership verified. + Verified bool `json:"verified"` + // A list of the current nameservers of the domain. + Nameservers []string `json:"nameservers"` + // A list of the intended nameservers for the domain to point to Vercel DNS. + IntendedNameservers []string `json:"intendedNameservers"` + // A list of custom nameservers for the domain to point to. Only applies to domains purchased with Vercel. + CustomNameservers []string `json:"customNameservers,omitempty"` + // An object containing information of the domain creator, including the user's id, username, and email. + Creator CreateOrTransferDomainCreator `json:"creator"` + // The domain name. + Name string `json:"name"` + // If it was purchased through Vercel, the timestamp in milliseconds when it was purchased. + BoughtAt *float64 `json:"boughtAt"` + // Timestamp in milliseconds when the domain was created in the registry. + CreatedAt float64 `json:"createdAt"` + // Timestamp in milliseconds at which the domain is set to expire. `null` if not bought with Vercel. + ExpiresAt *float64 `json:"expiresAt"` + // The unique identifier of the domain. + ID string `json:"id"` + // Timestamp in milliseconds at which the domain was ordered. + OrderedAt *float64 `json:"orderedAt,omitempty"` + // Indicates whether the domain is set to automatically renew. + Renew *bool `json:"renew,omitempty"` + // The type of service the domain is handled by. `external` if the DNS is externally handled, `zeit.world` if handled with Vercel, or `na` if the service is not available. + ServiceType CreateOrTransferDomainServiceType `json:"serviceType"` + // Timestamp in milliseconds at which the domain was successfully transferred into Vercel. `null` if the transfer is still processing or was never transferred in. + TransferredAt *float64 `json:"transferredAt,omitempty"` + // If transferred into Vercel, timestamp in milliseconds when the domain transfer was initiated. + TransferStartedAt *float64 `json:"transferStartedAt,omitempty"` + UserID string `json:"userId"` + TeamID *string `json:"teamId"` +} + +func (o *CreateOrTransferDomainDomain) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *CreateOrTransferDomainDomain) GetNameservers() []string { + if o == nil { + return []string{} + } + return o.Nameservers +} + +func (o *CreateOrTransferDomainDomain) GetIntendedNameservers() []string { + if o == nil { + return []string{} + } + return o.IntendedNameservers +} + +func (o *CreateOrTransferDomainDomain) GetCustomNameservers() []string { + if o == nil { + return nil + } + return o.CustomNameservers +} + +func (o *CreateOrTransferDomainDomain) GetCreator() CreateOrTransferDomainCreator { + if o == nil { + return CreateOrTransferDomainCreator{} + } + return o.Creator +} + +func (o *CreateOrTransferDomainDomain) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateOrTransferDomainDomain) GetBoughtAt() *float64 { + if o == nil { + return nil + } + return o.BoughtAt +} + +func (o *CreateOrTransferDomainDomain) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateOrTransferDomainDomain) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +func (o *CreateOrTransferDomainDomain) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateOrTransferDomainDomain) GetOrderedAt() *float64 { + if o == nil { + return nil + } + return o.OrderedAt +} + +func (o *CreateOrTransferDomainDomain) GetRenew() *bool { + if o == nil { + return nil + } + return o.Renew +} + +func (o *CreateOrTransferDomainDomain) GetServiceType() CreateOrTransferDomainServiceType { + if o == nil { + return CreateOrTransferDomainServiceType("") + } + return o.ServiceType +} + +func (o *CreateOrTransferDomainDomain) GetTransferredAt() *float64 { + if o == nil { + return nil + } + return o.TransferredAt +} + +func (o *CreateOrTransferDomainDomain) GetTransferStartedAt() *float64 { + if o == nil { + return nil + } + return o.TransferStartedAt +} + +func (o *CreateOrTransferDomainDomain) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *CreateOrTransferDomainDomain) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +type CreateOrTransferDomainResponseBody struct { + Domain CreateOrTransferDomainDomain `json:"domain"` +} + +func (o *CreateOrTransferDomainResponseBody) GetDomain() CreateOrTransferDomainDomain { + if o == nil { + return CreateOrTransferDomainDomain{} + } + return o.Domain +} + +type CreateOrTransferDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CreateOrTransferDomainResponseBody +} + +func (o *CreateOrTransferDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateOrTransferDomainResponse) GetObject() *CreateOrTransferDomainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createproject.go b/src/__tests__/mockserver/internal/sdk/models/operations/createproject.go new file mode 100644 index 00000000..711b2da6 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createproject.go @@ -0,0 +1,8222 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type Target2 string + +const ( + Target2Production Target2 = "production" + Target2Preview Target2 = "preview" + Target2Development Target2 = "development" +) + +func (e Target2) ToPointer() *Target2 { + return &e +} +func (e *Target2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = Target2(v) + return nil + default: + return fmt.Errorf("invalid value for Target2: %v", v) + } +} + +type Target1 string + +const ( + Target1Production Target1 = "production" + Target1Preview Target1 = "preview" + Target1Development Target1 = "development" +) + +func (e Target1) ToPointer() *Target1 { + return &e +} +func (e *Target1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = Target1(v) + return nil + default: + return fmt.Errorf("invalid value for Target1: %v", v) + } +} + +type CreateProjectTargetType string + +const ( + CreateProjectTargetTypeTarget1 CreateProjectTargetType = "target_1" + CreateProjectTargetTypeArrayOfTarget2 CreateProjectTargetType = "arrayOfTarget2" +) + +// CreateProjectTarget - Deployment Target or Targets in which the ENV variable will be used +type CreateProjectTarget struct { + Target1 *Target1 + ArrayOfTarget2 []Target2 + + Type CreateProjectTargetType +} + +func CreateCreateProjectTargetTarget1(target1 Target1) CreateProjectTarget { + typ := CreateProjectTargetTypeTarget1 + + return CreateProjectTarget{ + Target1: &target1, + Type: typ, + } +} + +func CreateCreateProjectTargetArrayOfTarget2(arrayOfTarget2 []Target2) CreateProjectTarget { + typ := CreateProjectTargetTypeArrayOfTarget2 + + return CreateProjectTarget{ + ArrayOfTarget2: arrayOfTarget2, + Type: typ, + } +} + +func (u *CreateProjectTarget) UnmarshalJSON(data []byte) error { + + var target1 Target1 = Target1("") + if err := utils.UnmarshalJSON(data, &target1, "", true, true); err == nil { + u.Target1 = &target1 + u.Type = CreateProjectTargetTypeTarget1 + return nil + } + + var arrayOfTarget2 []Target2 = []Target2{} + if err := utils.UnmarshalJSON(data, &arrayOfTarget2, "", true, true); err == nil { + u.ArrayOfTarget2 = arrayOfTarget2 + u.Type = CreateProjectTargetTypeArrayOfTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectTarget", string(data)) +} + +func (u CreateProjectTarget) MarshalJSON() ([]byte, error) { + if u.Target1 != nil { + return utils.MarshalJSON(u.Target1, "", true) + } + + if u.ArrayOfTarget2 != nil { + return utils.MarshalJSON(u.ArrayOfTarget2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectTarget: all fields are null") +} + +// CreateProjectType - Type of the ENV variable +type CreateProjectType string + +const ( + CreateProjectTypeSystem CreateProjectType = "system" + CreateProjectTypeSecret CreateProjectType = "secret" + CreateProjectTypeEncrypted CreateProjectType = "encrypted" + CreateProjectTypePlain CreateProjectType = "plain" + CreateProjectTypeSensitive CreateProjectType = "sensitive" +) + +func (e CreateProjectType) ToPointer() *CreateProjectType { + return &e +} +func (e *CreateProjectType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "secret": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + *e = CreateProjectType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectType: %v", v) + } +} + +type EnvironmentVariables struct { + // Name of the ENV variable + Key string `json:"key"` + // Deployment Target or Targets in which the ENV variable will be used + Target CreateProjectTarget `json:"target"` + // If defined, the git branch of the environment variable (must have target=preview) + GitBranch *string `json:"gitBranch,omitempty"` + // Type of the ENV variable + Type *CreateProjectType `json:"type,omitempty"` + // Value for the ENV variable + Value string `json:"value"` +} + +func (o *EnvironmentVariables) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *EnvironmentVariables) GetTarget() CreateProjectTarget { + if o == nil { + return CreateProjectTarget{} + } + return o.Target +} + +func (o *EnvironmentVariables) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *EnvironmentVariables) GetType() *CreateProjectType { + if o == nil { + return nil + } + return o.Type +} + +func (o *EnvironmentVariables) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +// CreateProjectFramework - The framework that is being used for this project. When `null` is used no framework is selected +type CreateProjectFramework string + +const ( + CreateProjectFrameworkBlitzjs CreateProjectFramework = "blitzjs" + CreateProjectFrameworkNextjs CreateProjectFramework = "nextjs" + CreateProjectFrameworkGatsby CreateProjectFramework = "gatsby" + CreateProjectFrameworkRemix CreateProjectFramework = "remix" + CreateProjectFrameworkAstro CreateProjectFramework = "astro" + CreateProjectFrameworkHexo CreateProjectFramework = "hexo" + CreateProjectFrameworkEleventy CreateProjectFramework = "eleventy" + CreateProjectFrameworkDocusaurus2 CreateProjectFramework = "docusaurus-2" + CreateProjectFrameworkDocusaurus CreateProjectFramework = "docusaurus" + CreateProjectFrameworkPreact CreateProjectFramework = "preact" + CreateProjectFrameworkSolidstart1 CreateProjectFramework = "solidstart-1" + CreateProjectFrameworkSolidstart CreateProjectFramework = "solidstart" + CreateProjectFrameworkDojo CreateProjectFramework = "dojo" + CreateProjectFrameworkEmber CreateProjectFramework = "ember" + CreateProjectFrameworkVue CreateProjectFramework = "vue" + CreateProjectFrameworkScully CreateProjectFramework = "scully" + CreateProjectFrameworkIonicAngular CreateProjectFramework = "ionic-angular" + CreateProjectFrameworkAngular CreateProjectFramework = "angular" + CreateProjectFrameworkPolymer CreateProjectFramework = "polymer" + CreateProjectFrameworkSvelte CreateProjectFramework = "svelte" + CreateProjectFrameworkSveltekit CreateProjectFramework = "sveltekit" + CreateProjectFrameworkSveltekit1 CreateProjectFramework = "sveltekit-1" + CreateProjectFrameworkIonicReact CreateProjectFramework = "ionic-react" + CreateProjectFrameworkCreateReactApp CreateProjectFramework = "create-react-app" + CreateProjectFrameworkGridsome CreateProjectFramework = "gridsome" + CreateProjectFrameworkUmijs CreateProjectFramework = "umijs" + CreateProjectFrameworkSapper CreateProjectFramework = "sapper" + CreateProjectFrameworkSaber CreateProjectFramework = "saber" + CreateProjectFrameworkStencil CreateProjectFramework = "stencil" + CreateProjectFrameworkNuxtjs CreateProjectFramework = "nuxtjs" + CreateProjectFrameworkRedwoodjs CreateProjectFramework = "redwoodjs" + CreateProjectFrameworkHugo CreateProjectFramework = "hugo" + CreateProjectFrameworkJekyll CreateProjectFramework = "jekyll" + CreateProjectFrameworkBrunch CreateProjectFramework = "brunch" + CreateProjectFrameworkMiddleman CreateProjectFramework = "middleman" + CreateProjectFrameworkZola CreateProjectFramework = "zola" + CreateProjectFrameworkHydrogen CreateProjectFramework = "hydrogen" + CreateProjectFrameworkVite CreateProjectFramework = "vite" + CreateProjectFrameworkVitepress CreateProjectFramework = "vitepress" + CreateProjectFrameworkVuepress CreateProjectFramework = "vuepress" + CreateProjectFrameworkParcel CreateProjectFramework = "parcel" + CreateProjectFrameworkFasthtml CreateProjectFramework = "fasthtml" + CreateProjectFrameworkSanityV3 CreateProjectFramework = "sanity-v3" + CreateProjectFrameworkSanity CreateProjectFramework = "sanity" + CreateProjectFrameworkStorybook CreateProjectFramework = "storybook" +) + +func (e CreateProjectFramework) ToPointer() *CreateProjectFramework { + return &e +} +func (e *CreateProjectFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = CreateProjectFramework(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectFramework: %v", v) + } +} + +// CreateProjectProjectsType - The Git Provider of the repository +type CreateProjectProjectsType string + +const ( + CreateProjectProjectsTypeGithub CreateProjectProjectsType = "github" + CreateProjectProjectsTypeGitlab CreateProjectProjectsType = "gitlab" + CreateProjectProjectsTypeBitbucket CreateProjectProjectsType = "bitbucket" +) + +func (e CreateProjectProjectsType) ToPointer() *CreateProjectProjectsType { + return &e +} +func (e *CreateProjectProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + *e = CreateProjectProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsType: %v", v) + } +} + +// GitRepository - The Git Repository that will be connected to the project. When this is defined, any pushes to the specified connected Git Repository will be automatically deployed +type GitRepository struct { + // The name of the git repository. For example: \"vercel/next.js\" + Repo string `json:"repo"` + // The Git Provider of the repository + Type CreateProjectProjectsType `json:"type"` +} + +func (o *GitRepository) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *GitRepository) GetType() CreateProjectProjectsType { + if o == nil { + return CreateProjectProjectsType("") + } + return o.Type +} + +// IssuerMode - team: `https://oidc.vercel.com/[team_slug]` global: `https://oidc.vercel.com` +type IssuerMode string + +const ( + IssuerModeTeam IssuerMode = "team" + IssuerModeGlobal IssuerMode = "global" +) + +func (e IssuerMode) ToPointer() *IssuerMode { + return &e +} +func (e *IssuerMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "global": + *e = IssuerMode(v) + return nil + default: + return fmt.Errorf("invalid value for IssuerMode: %v", v) + } +} + +// OidcTokenConfig - OpenID Connect JSON Web Token generation configuration. +type OidcTokenConfig struct { + // Whether or not to generate OpenID Connect JSON Web Tokens. + Enabled bool `json:"enabled"` + // team: `https://oidc.vercel.com/[team_slug]` global: `https://oidc.vercel.com` + IssuerMode *IssuerMode `default:"global" json:"issuerMode"` +} + +func (o OidcTokenConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(o, "", false) +} + +func (o *OidcTokenConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &o, "", false, false); err != nil { + return err + } + return nil +} + +func (o *OidcTokenConfig) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *OidcTokenConfig) GetIssuerMode() *IssuerMode { + if o == nil { + return nil + } + return o.IssuerMode +} + +type CreateProjectRequestBody struct { + // The build command for this project. When `null` is used this value will be automatically detected + BuildCommand *string `json:"buildCommand,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + // The dev command for this project. When `null` is used this value will be automatically detected + DevCommand *string `json:"devCommand,omitempty"` + // Collection of ENV Variables the Project will use + EnvironmentVariables []EnvironmentVariables `json:"environmentVariables,omitempty"` + // The framework that is being used for this project. When `null` is used no framework is selected + Framework *CreateProjectFramework `json:"framework,omitempty"` + // The Git Repository that will be connected to the project. When this is defined, any pushes to the specified connected Git Repository will be automatically deployed + GitRepository *GitRepository `json:"gitRepository,omitempty"` + // The install command for this project. When `null` is used this value will be automatically detected + InstallCommand *string `json:"installCommand,omitempty"` + // The desired name for the project + Name string `json:"name"` + // Opts-out of the message prompting a CLI user to connect a Git repository in `vercel link`. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + SkipGitConnectDuringLink *bool `json:"skipGitConnectDuringLink,omitempty"` + // The output directory of the project. When `null` is used this value will be automatically detected + OutputDirectory *string `json:"outputDirectory,omitempty"` + // Specifies whether the source code and logs of the deployments for this project should be public or not + PublicSource *bool `json:"publicSource,omitempty"` + // The name of a directory or relative path to the source code of your project. When `null` is used it will default to the project root + RootDirectory *string `json:"rootDirectory,omitempty"` + // The region to deploy Serverless Functions in this project + ServerlessFunctionRegion *string `json:"serverlessFunctionRegion,omitempty"` + // Specifies whether Zero Config Failover is enabled for this project. + ServerlessFunctionZeroConfigFailover *bool `json:"serverlessFunctionZeroConfigFailover,omitempty"` + // OpenID Connect JSON Web Token generation configuration. + OidcTokenConfig *OidcTokenConfig `json:"oidcTokenConfig,omitempty"` + // Opt-in to skip deployments when there are no changes to the root directory and its dependencies + EnableAffectedProjectsDeployments *bool `json:"enableAffectedProjectsDeployments,omitempty"` +} + +func (o *CreateProjectRequestBody) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *CreateProjectRequestBody) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *CreateProjectRequestBody) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *CreateProjectRequestBody) GetEnvironmentVariables() []EnvironmentVariables { + if o == nil { + return nil + } + return o.EnvironmentVariables +} + +func (o *CreateProjectRequestBody) GetFramework() *CreateProjectFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *CreateProjectRequestBody) GetGitRepository() *GitRepository { + if o == nil { + return nil + } + return o.GitRepository +} + +func (o *CreateProjectRequestBody) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *CreateProjectRequestBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateProjectRequestBody) GetSkipGitConnectDuringLink() *bool { + if o == nil { + return nil + } + return o.SkipGitConnectDuringLink +} + +func (o *CreateProjectRequestBody) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *CreateProjectRequestBody) GetPublicSource() *bool { + if o == nil { + return nil + } + return o.PublicSource +} + +func (o *CreateProjectRequestBody) GetRootDirectory() *string { + if o == nil { + return nil + } + return o.RootDirectory +} + +func (o *CreateProjectRequestBody) GetServerlessFunctionRegion() *string { + if o == nil { + return nil + } + return o.ServerlessFunctionRegion +} + +func (o *CreateProjectRequestBody) GetServerlessFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.ServerlessFunctionZeroConfigFailover +} + +func (o *CreateProjectRequestBody) GetOidcTokenConfig() *OidcTokenConfig { + if o == nil { + return nil + } + return o.OidcTokenConfig +} + +func (o *CreateProjectRequestBody) GetEnableAffectedProjectsDeployments() *bool { + if o == nil { + return nil + } + return o.EnableAffectedProjectsDeployments +} + +type CreateProjectRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateProjectRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateProjectRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateProjectRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateProjectRequest) GetRequestBody() CreateProjectRequestBody { + if o == nil { + return CreateProjectRequestBody{} + } + return o.RequestBody +} + +type CreateProjectAnalytics struct { + ID string `json:"id"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + DisabledAt float64 `json:"disabledAt"` + EnabledAt float64 `json:"enabledAt"` + PaidAt *float64 `json:"paidAt,omitempty"` + SampleRatePercent *float64 `json:"sampleRatePercent,omitempty"` + SpendLimitInDollars *float64 `json:"spendLimitInDollars,omitempty"` +} + +func (o *CreateProjectAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CreateProjectAnalytics) GetDisabledAt() float64 { + if o == nil { + return 0.0 + } + return o.DisabledAt +} + +func (o *CreateProjectAnalytics) GetEnabledAt() float64 { + if o == nil { + return 0.0 + } + return o.EnabledAt +} + +func (o *CreateProjectAnalytics) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +func (o *CreateProjectAnalytics) GetSampleRatePercent() *float64 { + if o == nil { + return nil + } + return o.SampleRatePercent +} + +func (o *CreateProjectAnalytics) GetSpendLimitInDollars() *float64 { + if o == nil { + return nil + } + return o.SpendLimitInDollars +} + +type CreateProjectSpeedInsights struct { + ID string `json:"id"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` + PaidAt *float64 `json:"paidAt,omitempty"` +} + +func (o *CreateProjectSpeedInsights) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectSpeedInsights) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *CreateProjectSpeedInsights) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *CreateProjectSpeedInsights) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CreateProjectSpeedInsights) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +func (o *CreateProjectSpeedInsights) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +type CreateProjectDefinitions struct { + // The hostname that should be used. + Host string `json:"host"` + // The path that should be called for the cronjob. + Path string `json:"path"` + // The cron expression. + Schedule string `json:"schedule"` +} + +func (o *CreateProjectDefinitions) GetHost() string { + if o == nil { + return "" + } + return o.Host +} + +func (o *CreateProjectDefinitions) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *CreateProjectDefinitions) GetSchedule() string { + if o == nil { + return "" + } + return o.Schedule +} + +type CreateProjectCrons struct { + // The time the feature was enabled for this project. Note: It enables automatically with the first Deployment that outputs cronjobs. + EnabledAt float64 `json:"enabledAt"` + // The time the feature was disabled for this project. + DisabledAt *float64 `json:"disabledAt"` + UpdatedAt float64 `json:"updatedAt"` + // The ID of the Deployment from which the definitions originated. + DeploymentID *string `json:"deploymentId"` + Definitions []CreateProjectDefinitions `json:"definitions"` +} + +func (o *CreateProjectCrons) GetEnabledAt() float64 { + if o == nil { + return 0.0 + } + return o.EnabledAt +} + +func (o *CreateProjectCrons) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *CreateProjectCrons) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *CreateProjectCrons) GetDeploymentID() *string { + if o == nil { + return nil + } + return o.DeploymentID +} + +func (o *CreateProjectCrons) GetDefinitions() []CreateProjectDefinitions { + if o == nil { + return []CreateProjectDefinitions{} + } + return o.Definitions +} + +type CreateProjectDataCache struct { + UserDisabled bool `json:"userDisabled"` + StorageSizeBytes *float64 `json:"storageSizeBytes,omitempty"` + Unlimited *bool `json:"unlimited,omitempty"` +} + +func (o *CreateProjectDataCache) GetUserDisabled() bool { + if o == nil { + return false + } + return o.UserDisabled +} + +func (o *CreateProjectDataCache) GetStorageSizeBytes() *float64 { + if o == nil { + return nil + } + return o.StorageSizeBytes +} + +func (o *CreateProjectDataCache) GetUnlimited() *bool { + if o == nil { + return nil + } + return o.Unlimited +} + +type CreateProjectDeploymentExpiration struct { + ExpirationDays *float64 `json:"expirationDays,omitempty"` + ExpirationDaysProduction *float64 `json:"expirationDaysProduction,omitempty"` + ExpirationDaysCanceled *float64 `json:"expirationDaysCanceled,omitempty"` + ExpirationDaysErrored *float64 `json:"expirationDaysErrored,omitempty"` + DeploymentsToKeep *float64 `json:"deploymentsToKeep,omitempty"` +} + +func (o *CreateProjectDeploymentExpiration) GetExpirationDays() *float64 { + if o == nil { + return nil + } + return o.ExpirationDays +} + +func (o *CreateProjectDeploymentExpiration) GetExpirationDaysProduction() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysProduction +} + +func (o *CreateProjectDeploymentExpiration) GetExpirationDaysCanceled() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysCanceled +} + +func (o *CreateProjectDeploymentExpiration) GetExpirationDaysErrored() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysErrored +} + +func (o *CreateProjectDeploymentExpiration) GetDeploymentsToKeep() *float64 { + if o == nil { + return nil + } + return o.DeploymentsToKeep +} + +type CreateProjectTarget2 string + +const ( + CreateProjectTarget2Production CreateProjectTarget2 = "production" + CreateProjectTarget2Preview CreateProjectTarget2 = "preview" + CreateProjectTarget2Development CreateProjectTarget2 = "development" +) + +func (e CreateProjectTarget2) ToPointer() *CreateProjectTarget2 { + return &e +} +func (e *CreateProjectTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectTarget2: %v", v) + } +} + +type CreateProjectProjectsTargetType string + +const ( + CreateProjectProjectsTargetTypeArrayOfStr CreateProjectProjectsTargetType = "arrayOfStr" + CreateProjectProjectsTargetTypeCreateProjectTarget2 CreateProjectProjectsTargetType = "createProject_target_2" +) + +type CreateProjectProjectsTarget struct { + ArrayOfStr []string + CreateProjectTarget2 *CreateProjectTarget2 + + Type CreateProjectProjectsTargetType +} + +func CreateCreateProjectProjectsTargetArrayOfStr(arrayOfStr []string) CreateProjectProjectsTarget { + typ := CreateProjectProjectsTargetTypeArrayOfStr + + return CreateProjectProjectsTarget{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateCreateProjectProjectsTargetCreateProjectTarget2(createProjectTarget2 CreateProjectTarget2) CreateProjectProjectsTarget { + typ := CreateProjectProjectsTargetTypeCreateProjectTarget2 + + return CreateProjectProjectsTarget{ + CreateProjectTarget2: &createProjectTarget2, + Type: typ, + } +} + +func (u *CreateProjectProjectsTarget) UnmarshalJSON(data []byte) error { + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = CreateProjectProjectsTargetTypeArrayOfStr + return nil + } + + var createProjectTarget2 CreateProjectTarget2 = CreateProjectTarget2("") + if err := utils.UnmarshalJSON(data, &createProjectTarget2, "", true, true); err == nil { + u.CreateProjectTarget2 = &createProjectTarget2 + u.Type = CreateProjectProjectsTargetTypeCreateProjectTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectProjectsTarget", string(data)) +} + +func (u CreateProjectProjectsTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.CreateProjectTarget2 != nil { + return utils.MarshalJSON(u.CreateProjectTarget2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectProjectsTarget: all fields are null") +} + +type CreateProjectProjectsResponseType string + +const ( + CreateProjectProjectsResponseTypeSystem CreateProjectProjectsResponseType = "system" + CreateProjectProjectsResponseTypeEncrypted CreateProjectProjectsResponseType = "encrypted" + CreateProjectProjectsResponseTypePlain CreateProjectProjectsResponseType = "plain" + CreateProjectProjectsResponseTypeSensitive CreateProjectProjectsResponseType = "sensitive" + CreateProjectProjectsResponseTypeSecret CreateProjectProjectsResponseType = "secret" +) + +func (e CreateProjectProjectsResponseType) ToPointer() *CreateProjectProjectsResponseType { + return &e +} +func (e *CreateProjectProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = CreateProjectProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponseType: %v", v) + } +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15TypeFlagsConnectionString CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type = "flags-connection-string" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type: %v", v) + } +} + +type ContentHint15 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *ContentHint15) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type("") + } + return o.Type +} + +func (o *ContentHint15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14TypeIntegrationStoreSecret CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type = "integration-store-secret" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type: %v", v) + } +} + +type ContentHint14 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *ContentHint14) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type("") + } + return o.Type +} + +func (o *ContentHint14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *ContentHint14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *ContentHint14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *ContentHint14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13TypePostgresURLNoSsl CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type = "postgres-url-no-ssl" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type: %v", v) + } +} + +type ContentHint13 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint13) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type("") + } + return o.Type +} + +func (o *ContentHint13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12TypePostgresDatabase CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type = "postgres-database" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type: %v", v) + } +} + +type ContentHint12 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint12) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type("") + } + return o.Type +} + +func (o *ContentHint12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11TypePostgresPassword CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type = "postgres-password" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type: %v", v) + } +} + +type ContentHint11 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint11) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type("") + } + return o.Type +} + +func (o *ContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10TypePostgresHost CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type = "postgres-host" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type: %v", v) + } +} + +type CreateProjectContentHint10 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint10) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type("") + } + return o.Type +} + +func (o *CreateProjectContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9TypePostgresUser CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type = "postgres-user" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type: %v", v) + } +} + +type CreateProjectContentHint9 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint9) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type("") + } + return o.Type +} + +func (o *CreateProjectContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8TypePostgresPrismaURL CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type = "postgres-prisma-url" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type: %v", v) + } +} + +type CreateProjectContentHint8 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint8) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type("") + } + return o.Type +} + +func (o *CreateProjectContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvTypePostgresURLNonPooling CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType = "postgres-url-non-pooling" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType: %v", v) + } +} + +type CreateProjectContentHint7 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint7) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType("") + } + return o.Type +} + +func (o *CreateProjectContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyTypePostgresURL CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType = "postgres-url" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type CreateProjectContentHint6 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint6) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *CreateProjectContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200ApplicationJSONType string + +const ( + CreateProjectContentHintProjectsResponse200ApplicationJSONTypeBlobReadWriteToken CreateProjectContentHintProjectsResponse200ApplicationJSONType = "blob-read-write-token" +) + +func (e CreateProjectContentHintProjectsResponse200ApplicationJSONType) ToPointer() *CreateProjectContentHintProjectsResponse200ApplicationJSONType { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = CreateProjectContentHintProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type CreateProjectContentHint5 struct { + Type CreateProjectContentHintProjectsResponse200ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint5) GetType() CreateProjectContentHintProjectsResponse200ApplicationJSONType { + if o == nil { + return CreateProjectContentHintProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *CreateProjectContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponse200Type string + +const ( + CreateProjectContentHintProjectsResponse200TypeRedisRestAPIReadOnlyToken CreateProjectContentHintProjectsResponse200Type = "redis-rest-api-read-only-token" +) + +func (e CreateProjectContentHintProjectsResponse200Type) ToPointer() *CreateProjectContentHintProjectsResponse200Type { + return &e +} +func (e *CreateProjectContentHintProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = CreateProjectContentHintProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponse200Type: %v", v) + } +} + +type CreateProjectContentHint4 struct { + Type CreateProjectContentHintProjectsResponse200Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint4) GetType() CreateProjectContentHintProjectsResponse200Type { + if o == nil { + return CreateProjectContentHintProjectsResponse200Type("") + } + return o.Type +} + +func (o *CreateProjectContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsResponseType string + +const ( + CreateProjectContentHintProjectsResponseTypeRedisRestAPIToken CreateProjectContentHintProjectsResponseType = "redis-rest-api-token" +) + +func (e CreateProjectContentHintProjectsResponseType) ToPointer() *CreateProjectContentHintProjectsResponseType { + return &e +} +func (e *CreateProjectContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = CreateProjectContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsResponseType: %v", v) + } +} + +type CreateProjectContentHint3 struct { + Type CreateProjectContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint3) GetType() CreateProjectContentHintProjectsResponseType { + if o == nil { + return CreateProjectContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *CreateProjectContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintProjectsType string + +const ( + CreateProjectContentHintProjectsTypeRedisRestAPIURL CreateProjectContentHintProjectsType = "redis-rest-api-url" +) + +func (e CreateProjectContentHintProjectsType) ToPointer() *CreateProjectContentHintProjectsType { + return &e +} +func (e *CreateProjectContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = CreateProjectContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintProjectsType: %v", v) + } +} + +type CreateProjectContentHint2 struct { + Type CreateProjectContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint2) GetType() CreateProjectContentHintProjectsType { + if o == nil { + return CreateProjectContentHintProjectsType("") + } + return o.Type +} + +func (o *CreateProjectContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintType string + +const ( + CreateProjectContentHintTypeRedisURL CreateProjectContentHintType = "redis-url" +) + +func (e CreateProjectContentHintType) ToPointer() *CreateProjectContentHintType { + return &e +} +func (e *CreateProjectContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = CreateProjectContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectContentHintType: %v", v) + } +} + +type CreateProjectContentHint1 struct { + Type CreateProjectContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectContentHint1) GetType() CreateProjectContentHintType { + if o == nil { + return CreateProjectContentHintType("") + } + return o.Type +} + +func (o *CreateProjectContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectContentHintUnionType string + +const ( + CreateProjectContentHintUnionTypeCreateProjectContentHint1 CreateProjectContentHintUnionType = "createProject_contentHint_1" + CreateProjectContentHintUnionTypeCreateProjectContentHint2 CreateProjectContentHintUnionType = "createProject_contentHint_2" + CreateProjectContentHintUnionTypeCreateProjectContentHint3 CreateProjectContentHintUnionType = "createProject_contentHint_3" + CreateProjectContentHintUnionTypeCreateProjectContentHint4 CreateProjectContentHintUnionType = "createProject_contentHint_4" + CreateProjectContentHintUnionTypeCreateProjectContentHint5 CreateProjectContentHintUnionType = "createProject_contentHint_5" + CreateProjectContentHintUnionTypeCreateProjectContentHint6 CreateProjectContentHintUnionType = "createProject_contentHint_6" + CreateProjectContentHintUnionTypeCreateProjectContentHint7 CreateProjectContentHintUnionType = "createProject_contentHint_7" + CreateProjectContentHintUnionTypeCreateProjectContentHint8 CreateProjectContentHintUnionType = "createProject_contentHint_8" + CreateProjectContentHintUnionTypeCreateProjectContentHint9 CreateProjectContentHintUnionType = "createProject_contentHint_9" + CreateProjectContentHintUnionTypeCreateProjectContentHint10 CreateProjectContentHintUnionType = "createProject_contentHint_10" + CreateProjectContentHintUnionTypeContentHint11 CreateProjectContentHintUnionType = "contentHint_11" + CreateProjectContentHintUnionTypeContentHint12 CreateProjectContentHintUnionType = "contentHint_12" + CreateProjectContentHintUnionTypeContentHint13 CreateProjectContentHintUnionType = "contentHint_13" + CreateProjectContentHintUnionTypeContentHint14 CreateProjectContentHintUnionType = "contentHint_14" + CreateProjectContentHintUnionTypeContentHint15 CreateProjectContentHintUnionType = "contentHint_15" +) + +type CreateProjectContentHint struct { + CreateProjectContentHint1 *CreateProjectContentHint1 + CreateProjectContentHint2 *CreateProjectContentHint2 + CreateProjectContentHint3 *CreateProjectContentHint3 + CreateProjectContentHint4 *CreateProjectContentHint4 + CreateProjectContentHint5 *CreateProjectContentHint5 + CreateProjectContentHint6 *CreateProjectContentHint6 + CreateProjectContentHint7 *CreateProjectContentHint7 + CreateProjectContentHint8 *CreateProjectContentHint8 + CreateProjectContentHint9 *CreateProjectContentHint9 + CreateProjectContentHint10 *CreateProjectContentHint10 + ContentHint11 *ContentHint11 + ContentHint12 *ContentHint12 + ContentHint13 *ContentHint13 + ContentHint14 *ContentHint14 + ContentHint15 *ContentHint15 + + Type CreateProjectContentHintUnionType +} + +func CreateCreateProjectContentHintCreateProjectContentHint1(createProjectContentHint1 CreateProjectContentHint1) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint1 + + return CreateProjectContentHint{ + CreateProjectContentHint1: &createProjectContentHint1, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint2(createProjectContentHint2 CreateProjectContentHint2) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint2 + + return CreateProjectContentHint{ + CreateProjectContentHint2: &createProjectContentHint2, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint3(createProjectContentHint3 CreateProjectContentHint3) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint3 + + return CreateProjectContentHint{ + CreateProjectContentHint3: &createProjectContentHint3, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint4(createProjectContentHint4 CreateProjectContentHint4) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint4 + + return CreateProjectContentHint{ + CreateProjectContentHint4: &createProjectContentHint4, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint5(createProjectContentHint5 CreateProjectContentHint5) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint5 + + return CreateProjectContentHint{ + CreateProjectContentHint5: &createProjectContentHint5, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint6(createProjectContentHint6 CreateProjectContentHint6) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint6 + + return CreateProjectContentHint{ + CreateProjectContentHint6: &createProjectContentHint6, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint7(createProjectContentHint7 CreateProjectContentHint7) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint7 + + return CreateProjectContentHint{ + CreateProjectContentHint7: &createProjectContentHint7, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint8(createProjectContentHint8 CreateProjectContentHint8) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint8 + + return CreateProjectContentHint{ + CreateProjectContentHint8: &createProjectContentHint8, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint9(createProjectContentHint9 CreateProjectContentHint9) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint9 + + return CreateProjectContentHint{ + CreateProjectContentHint9: &createProjectContentHint9, + Type: typ, + } +} + +func CreateCreateProjectContentHintCreateProjectContentHint10(createProjectContentHint10 CreateProjectContentHint10) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeCreateProjectContentHint10 + + return CreateProjectContentHint{ + CreateProjectContentHint10: &createProjectContentHint10, + Type: typ, + } +} + +func CreateCreateProjectContentHintContentHint11(contentHint11 ContentHint11) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeContentHint11 + + return CreateProjectContentHint{ + ContentHint11: &contentHint11, + Type: typ, + } +} + +func CreateCreateProjectContentHintContentHint12(contentHint12 ContentHint12) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeContentHint12 + + return CreateProjectContentHint{ + ContentHint12: &contentHint12, + Type: typ, + } +} + +func CreateCreateProjectContentHintContentHint13(contentHint13 ContentHint13) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeContentHint13 + + return CreateProjectContentHint{ + ContentHint13: &contentHint13, + Type: typ, + } +} + +func CreateCreateProjectContentHintContentHint14(contentHint14 ContentHint14) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeContentHint14 + + return CreateProjectContentHint{ + ContentHint14: &contentHint14, + Type: typ, + } +} + +func CreateCreateProjectContentHintContentHint15(contentHint15 ContentHint15) CreateProjectContentHint { + typ := CreateProjectContentHintUnionTypeContentHint15 + + return CreateProjectContentHint{ + ContentHint15: &contentHint15, + Type: typ, + } +} + +func (u *CreateProjectContentHint) UnmarshalJSON(data []byte) error { + + var createProjectContentHint7 CreateProjectContentHint7 = CreateProjectContentHint7{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint7, "", true, true); err == nil { + u.CreateProjectContentHint7 = &createProjectContentHint7 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint7 + return nil + } + + var createProjectContentHint9 CreateProjectContentHint9 = CreateProjectContentHint9{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint9, "", true, true); err == nil { + u.CreateProjectContentHint9 = &createProjectContentHint9 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint9 + return nil + } + + var createProjectContentHint3 CreateProjectContentHint3 = CreateProjectContentHint3{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint3, "", true, true); err == nil { + u.CreateProjectContentHint3 = &createProjectContentHint3 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint3 + return nil + } + + var createProjectContentHint4 CreateProjectContentHint4 = CreateProjectContentHint4{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint4, "", true, true); err == nil { + u.CreateProjectContentHint4 = &createProjectContentHint4 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint4 + return nil + } + + var createProjectContentHint5 CreateProjectContentHint5 = CreateProjectContentHint5{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint5, "", true, true); err == nil { + u.CreateProjectContentHint5 = &createProjectContentHint5 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint5 + return nil + } + + var createProjectContentHint6 CreateProjectContentHint6 = CreateProjectContentHint6{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint6, "", true, true); err == nil { + u.CreateProjectContentHint6 = &createProjectContentHint6 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint6 + return nil + } + + var createProjectContentHint2 CreateProjectContentHint2 = CreateProjectContentHint2{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint2, "", true, true); err == nil { + u.CreateProjectContentHint2 = &createProjectContentHint2 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint2 + return nil + } + + var createProjectContentHint8 CreateProjectContentHint8 = CreateProjectContentHint8{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint8, "", true, true); err == nil { + u.CreateProjectContentHint8 = &createProjectContentHint8 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint8 + return nil + } + + var createProjectContentHint1 CreateProjectContentHint1 = CreateProjectContentHint1{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint1, "", true, true); err == nil { + u.CreateProjectContentHint1 = &createProjectContentHint1 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint1 + return nil + } + + var createProjectContentHint10 CreateProjectContentHint10 = CreateProjectContentHint10{} + if err := utils.UnmarshalJSON(data, &createProjectContentHint10, "", true, true); err == nil { + u.CreateProjectContentHint10 = &createProjectContentHint10 + u.Type = CreateProjectContentHintUnionTypeCreateProjectContentHint10 + return nil + } + + var contentHint11 ContentHint11 = ContentHint11{} + if err := utils.UnmarshalJSON(data, &contentHint11, "", true, true); err == nil { + u.ContentHint11 = &contentHint11 + u.Type = CreateProjectContentHintUnionTypeContentHint11 + return nil + } + + var contentHint12 ContentHint12 = ContentHint12{} + if err := utils.UnmarshalJSON(data, &contentHint12, "", true, true); err == nil { + u.ContentHint12 = &contentHint12 + u.Type = CreateProjectContentHintUnionTypeContentHint12 + return nil + } + + var contentHint13 ContentHint13 = ContentHint13{} + if err := utils.UnmarshalJSON(data, &contentHint13, "", true, true); err == nil { + u.ContentHint13 = &contentHint13 + u.Type = CreateProjectContentHintUnionTypeContentHint13 + return nil + } + + var contentHint15 ContentHint15 = ContentHint15{} + if err := utils.UnmarshalJSON(data, &contentHint15, "", true, true); err == nil { + u.ContentHint15 = &contentHint15 + u.Type = CreateProjectContentHintUnionTypeContentHint15 + return nil + } + + var contentHint14 ContentHint14 = ContentHint14{} + if err := utils.UnmarshalJSON(data, &contentHint14, "", true, true); err == nil { + u.ContentHint14 = &contentHint14 + u.Type = CreateProjectContentHintUnionTypeContentHint14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectContentHint", string(data)) +} + +func (u CreateProjectContentHint) MarshalJSON() ([]byte, error) { + if u.CreateProjectContentHint1 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint1, "", true) + } + + if u.CreateProjectContentHint2 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint2, "", true) + } + + if u.CreateProjectContentHint3 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint3, "", true) + } + + if u.CreateProjectContentHint4 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint4, "", true) + } + + if u.CreateProjectContentHint5 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint5, "", true) + } + + if u.CreateProjectContentHint6 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint6, "", true) + } + + if u.CreateProjectContentHint7 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint7, "", true) + } + + if u.CreateProjectContentHint8 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint8, "", true) + } + + if u.CreateProjectContentHint9 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint9, "", true) + } + + if u.CreateProjectContentHint10 != nil { + return utils.MarshalJSON(u.CreateProjectContentHint10, "", true) + } + + if u.ContentHint11 != nil { + return utils.MarshalJSON(u.ContentHint11, "", true) + } + + if u.ContentHint12 != nil { + return utils.MarshalJSON(u.ContentHint12, "", true) + } + + if u.ContentHint13 != nil { + return utils.MarshalJSON(u.ContentHint13, "", true) + } + + if u.ContentHint14 != nil { + return utils.MarshalJSON(u.ContentHint14, "", true) + } + + if u.ContentHint15 != nil { + return utils.MarshalJSON(u.ContentHint15, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectContentHint: all fields are null") +} + +type CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType string + +const ( + CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvTypeFlagsSecret CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType = "flags-secret" +) + +func (e CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType) ToPointer() *CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType { + return &e +} +func (e *CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType: %v", v) + } +} + +// CreateProjectInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type CreateProjectInternalContentHint struct { + Type CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *CreateProjectInternalContentHint) GetType() CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType { + if o == nil { + return CreateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType("") + } + return o.Type +} + +func (o *CreateProjectInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type CreateProjectEnv struct { + Target *CreateProjectProjectsTarget `json:"target,omitempty"` + Type CreateProjectProjectsResponseType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *CreateProjectContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *CreateProjectInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *CreateProjectEnv) GetTarget() *CreateProjectProjectsTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *CreateProjectEnv) GetType() CreateProjectProjectsResponseType { + if o == nil { + return CreateProjectProjectsResponseType("") + } + return o.Type +} + +func (o *CreateProjectEnv) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *CreateProjectEnv) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *CreateProjectEnv) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *CreateProjectEnv) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *CreateProjectEnv) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *CreateProjectEnv) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateProjectEnv) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *CreateProjectEnv) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *CreateProjectEnv) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *CreateProjectEnv) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *CreateProjectEnv) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *CreateProjectEnv) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *CreateProjectEnv) GetContentHint() *CreateProjectContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *CreateProjectEnv) GetInternalContentHint() *CreateProjectInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *CreateProjectEnv) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *CreateProjectEnv) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *CreateProjectEnv) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *CreateProjectEnv) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type CreateProjectCustomEnvironments struct { +} + +type CreateProjectProjectsFramework string + +const ( + CreateProjectProjectsFrameworkBlitzjs CreateProjectProjectsFramework = "blitzjs" + CreateProjectProjectsFrameworkNextjs CreateProjectProjectsFramework = "nextjs" + CreateProjectProjectsFrameworkGatsby CreateProjectProjectsFramework = "gatsby" + CreateProjectProjectsFrameworkRemix CreateProjectProjectsFramework = "remix" + CreateProjectProjectsFrameworkAstro CreateProjectProjectsFramework = "astro" + CreateProjectProjectsFrameworkHexo CreateProjectProjectsFramework = "hexo" + CreateProjectProjectsFrameworkEleventy CreateProjectProjectsFramework = "eleventy" + CreateProjectProjectsFrameworkDocusaurus2 CreateProjectProjectsFramework = "docusaurus-2" + CreateProjectProjectsFrameworkDocusaurus CreateProjectProjectsFramework = "docusaurus" + CreateProjectProjectsFrameworkPreact CreateProjectProjectsFramework = "preact" + CreateProjectProjectsFrameworkSolidstart1 CreateProjectProjectsFramework = "solidstart-1" + CreateProjectProjectsFrameworkSolidstart CreateProjectProjectsFramework = "solidstart" + CreateProjectProjectsFrameworkDojo CreateProjectProjectsFramework = "dojo" + CreateProjectProjectsFrameworkEmber CreateProjectProjectsFramework = "ember" + CreateProjectProjectsFrameworkVue CreateProjectProjectsFramework = "vue" + CreateProjectProjectsFrameworkScully CreateProjectProjectsFramework = "scully" + CreateProjectProjectsFrameworkIonicAngular CreateProjectProjectsFramework = "ionic-angular" + CreateProjectProjectsFrameworkAngular CreateProjectProjectsFramework = "angular" + CreateProjectProjectsFrameworkPolymer CreateProjectProjectsFramework = "polymer" + CreateProjectProjectsFrameworkSvelte CreateProjectProjectsFramework = "svelte" + CreateProjectProjectsFrameworkSveltekit CreateProjectProjectsFramework = "sveltekit" + CreateProjectProjectsFrameworkSveltekit1 CreateProjectProjectsFramework = "sveltekit-1" + CreateProjectProjectsFrameworkIonicReact CreateProjectProjectsFramework = "ionic-react" + CreateProjectProjectsFrameworkCreateReactApp CreateProjectProjectsFramework = "create-react-app" + CreateProjectProjectsFrameworkGridsome CreateProjectProjectsFramework = "gridsome" + CreateProjectProjectsFrameworkUmijs CreateProjectProjectsFramework = "umijs" + CreateProjectProjectsFrameworkSapper CreateProjectProjectsFramework = "sapper" + CreateProjectProjectsFrameworkSaber CreateProjectProjectsFramework = "saber" + CreateProjectProjectsFrameworkStencil CreateProjectProjectsFramework = "stencil" + CreateProjectProjectsFrameworkNuxtjs CreateProjectProjectsFramework = "nuxtjs" + CreateProjectProjectsFrameworkRedwoodjs CreateProjectProjectsFramework = "redwoodjs" + CreateProjectProjectsFrameworkHugo CreateProjectProjectsFramework = "hugo" + CreateProjectProjectsFrameworkJekyll CreateProjectProjectsFramework = "jekyll" + CreateProjectProjectsFrameworkBrunch CreateProjectProjectsFramework = "brunch" + CreateProjectProjectsFrameworkMiddleman CreateProjectProjectsFramework = "middleman" + CreateProjectProjectsFrameworkZola CreateProjectProjectsFramework = "zola" + CreateProjectProjectsFrameworkHydrogen CreateProjectProjectsFramework = "hydrogen" + CreateProjectProjectsFrameworkVite CreateProjectProjectsFramework = "vite" + CreateProjectProjectsFrameworkVitepress CreateProjectProjectsFramework = "vitepress" + CreateProjectProjectsFrameworkVuepress CreateProjectProjectsFramework = "vuepress" + CreateProjectProjectsFrameworkParcel CreateProjectProjectsFramework = "parcel" + CreateProjectProjectsFrameworkFasthtml CreateProjectProjectsFramework = "fasthtml" + CreateProjectProjectsFrameworkSanityV3 CreateProjectProjectsFramework = "sanity-v3" + CreateProjectProjectsFrameworkSanity CreateProjectProjectsFramework = "sanity" + CreateProjectProjectsFrameworkStorybook CreateProjectProjectsFramework = "storybook" +) + +func (e CreateProjectProjectsFramework) ToPointer() *CreateProjectProjectsFramework { + return &e +} +func (e *CreateProjectProjectsFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = CreateProjectProjectsFramework(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsFramework: %v", v) + } +} + +type CreateProjectIPBuckets struct { + Bucket string `json:"bucket"` + SupportUntil *float64 `json:"supportUntil,omitempty"` +} + +func (o *CreateProjectIPBuckets) GetBucket() string { + if o == nil { + return "" + } + return o.Bucket +} + +func (o *CreateProjectIPBuckets) GetSupportUntil() *float64 { + if o == nil { + return nil + } + return o.SupportUntil +} + +type CreateProjectAliasAssignedType string + +const ( + CreateProjectAliasAssignedTypeNumber CreateProjectAliasAssignedType = "number" + CreateProjectAliasAssignedTypeBoolean CreateProjectAliasAssignedType = "boolean" +) + +type CreateProjectAliasAssigned struct { + Number *float64 + Boolean *bool + + Type CreateProjectAliasAssignedType +} + +func CreateCreateProjectAliasAssignedNumber(number float64) CreateProjectAliasAssigned { + typ := CreateProjectAliasAssignedTypeNumber + + return CreateProjectAliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateCreateProjectAliasAssignedBoolean(boolean bool) CreateProjectAliasAssigned { + typ := CreateProjectAliasAssignedTypeBoolean + + return CreateProjectAliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *CreateProjectAliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = CreateProjectAliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = CreateProjectAliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectAliasAssigned", string(data)) +} + +func (u CreateProjectAliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectAliasAssigned: all fields are null") +} + +type CreateProjectAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *CreateProjectAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *CreateProjectAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType string + +const ( + CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsTypeEndsWith CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType = "endsWith" + CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsTypeStartsWith CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType = "startsWith" + CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsTypeEquals CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType = "equals" +) + +func (e CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType) ToPointer() *CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType { + return &e +} +func (e *CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "endsWith": + fallthrough + case "startsWith": + fallthrough + case "equals": + *e = CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType: %v", v) + } +} + +type CreateProjectBranchMatcher struct { + Type CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType `json:"type"` + Pattern string `json:"pattern"` +} + +func (o *CreateProjectBranchMatcher) GetType() CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType { + if o == nil { + return CreateProjectProjectsResponse200ApplicationJSONResponseBodyLatestDeploymentsType("") + } + return o.Type +} + +func (o *CreateProjectBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type CreateProjectBuilds struct { + Use string `json:"use"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` +} + +func (o *CreateProjectBuilds) GetUse() string { + if o == nil { + return "" + } + return o.Use +} + +func (o *CreateProjectBuilds) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *CreateProjectBuilds) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +type CreateProjectChecksConclusion string + +const ( + CreateProjectChecksConclusionSucceeded CreateProjectChecksConclusion = "succeeded" + CreateProjectChecksConclusionFailed CreateProjectChecksConclusion = "failed" + CreateProjectChecksConclusionSkipped CreateProjectChecksConclusion = "skipped" + CreateProjectChecksConclusionCanceled CreateProjectChecksConclusion = "canceled" +) + +func (e CreateProjectChecksConclusion) ToPointer() *CreateProjectChecksConclusion { + return &e +} +func (e *CreateProjectChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = CreateProjectChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectChecksConclusion: %v", v) + } +} + +type CreateProjectChecksState string + +const ( + CreateProjectChecksStateRegistered CreateProjectChecksState = "registered" + CreateProjectChecksStateRunning CreateProjectChecksState = "running" + CreateProjectChecksStateCompleted CreateProjectChecksState = "completed" +) + +func (e CreateProjectChecksState) ToPointer() *CreateProjectChecksState { + return &e +} +func (e *CreateProjectChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = CreateProjectChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectChecksState: %v", v) + } +} + +type CreateProjectCreator struct { + Email string `json:"email"` + GithubLogin *string `json:"githubLogin,omitempty"` + GitlabLogin *string `json:"gitlabLogin,omitempty"` + UID string `json:"uid"` + Username string `json:"username"` +} + +func (o *CreateProjectCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *CreateProjectCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *CreateProjectCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +func (o *CreateProjectCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *CreateProjectCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +type CreateProjectOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *CreateProjectOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *CreateProjectOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *CreateProjectOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *CreateProjectOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *CreateProjectOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *CreateProjectOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *CreateProjectOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *CreateProjectOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *CreateProjectOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type CreateProjectPlan string + +const ( + CreateProjectPlanPro CreateProjectPlan = "pro" + CreateProjectPlanEnterprise CreateProjectPlan = "enterprise" + CreateProjectPlanHobby CreateProjectPlan = "hobby" +) + +func (e CreateProjectPlan) ToPointer() *CreateProjectPlan { + return &e +} +func (e *CreateProjectPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = CreateProjectPlan(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectPlan: %v", v) + } +} + +type CreateProjectReadyState string + +const ( + CreateProjectReadyStateBuilding CreateProjectReadyState = "BUILDING" + CreateProjectReadyStateError CreateProjectReadyState = "ERROR" + CreateProjectReadyStateInitializing CreateProjectReadyState = "INITIALIZING" + CreateProjectReadyStateQueued CreateProjectReadyState = "QUEUED" + CreateProjectReadyStateReady CreateProjectReadyState = "READY" + CreateProjectReadyStateCanceled CreateProjectReadyState = "CANCELED" +) + +func (e CreateProjectReadyState) ToPointer() *CreateProjectReadyState { + return &e +} +func (e *CreateProjectReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = CreateProjectReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectReadyState: %v", v) + } +} + +type CreateProjectReadySubstate string + +const ( + CreateProjectReadySubstateStaged CreateProjectReadySubstate = "STAGED" + CreateProjectReadySubstatePromoted CreateProjectReadySubstate = "PROMOTED" +) + +func (e CreateProjectReadySubstate) ToPointer() *CreateProjectReadySubstate { + return &e +} +func (e *CreateProjectReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = CreateProjectReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectReadySubstate: %v", v) + } +} + +type CreateProjectProjectsResponse200Type string + +const ( + CreateProjectProjectsResponse200TypeLambdas CreateProjectProjectsResponse200Type = "LAMBDAS" +) + +func (e CreateProjectProjectsResponse200Type) ToPointer() *CreateProjectProjectsResponse200Type { + return &e +} +func (e *CreateProjectProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = CreateProjectProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponse200Type: %v", v) + } +} + +type CreateProjectLatestDeployments struct { + ID string `json:"id"` + Alias []string `json:"alias,omitempty"` + AliasAssigned *CreateProjectAliasAssigned `json:"aliasAssigned,omitempty"` + AliasError *CreateProjectAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BranchMatcher *CreateProjectBranchMatcher `json:"branchMatcher,omitempty"` + BuildingAt *float64 `json:"buildingAt,omitempty"` + Builds []CreateProjectBuilds `json:"builds,omitempty"` + ChecksConclusion *CreateProjectChecksConclusion `json:"checksConclusion,omitempty"` + ChecksState *CreateProjectChecksState `json:"checksState,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedAt float64 `json:"createdAt"` + CreatedIn string `json:"createdIn"` + Creator *CreateProjectCreator `json:"creator"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + DeploymentHostname string `json:"deploymentHostname"` + Forced *bool `json:"forced,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OidcTokenClaims *CreateProjectOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + Plan CreateProjectPlan `json:"plan"` + // Whether or not preview comments are enabled for the deployment + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + Private bool `json:"private"` + ReadyAt *float64 `json:"readyAt,omitempty"` + ReadyState CreateProjectReadyState `json:"readyState"` + ReadySubstate *CreateProjectReadySubstate `json:"readySubstate,omitempty"` + RequestedAt *float64 `json:"requestedAt,omitempty"` + Target *string `json:"target,omitempty"` + TeamID *string `json:"teamId,omitempty"` + Type CreateProjectProjectsResponse200Type `json:"type"` + URL string `json:"url"` + UserID string `json:"userId"` + WithCache *bool `json:"withCache,omitempty"` +} + +func (o *CreateProjectLatestDeployments) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectLatestDeployments) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *CreateProjectLatestDeployments) GetAliasAssigned() *CreateProjectAliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *CreateProjectLatestDeployments) GetAliasError() *CreateProjectAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *CreateProjectLatestDeployments) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *CreateProjectLatestDeployments) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *CreateProjectLatestDeployments) GetBranchMatcher() *CreateProjectBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *CreateProjectLatestDeployments) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *CreateProjectLatestDeployments) GetBuilds() []CreateProjectBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *CreateProjectLatestDeployments) GetChecksConclusion() *CreateProjectChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *CreateProjectLatestDeployments) GetChecksState() *CreateProjectChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *CreateProjectLatestDeployments) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *CreateProjectLatestDeployments) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *CreateProjectLatestDeployments) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateProjectLatestDeployments) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *CreateProjectLatestDeployments) GetCreator() *CreateProjectCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *CreateProjectLatestDeployments) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *CreateProjectLatestDeployments) GetDeploymentHostname() string { + if o == nil { + return "" + } + return o.DeploymentHostname +} + +func (o *CreateProjectLatestDeployments) GetForced() *bool { + if o == nil { + return nil + } + return o.Forced +} + +func (o *CreateProjectLatestDeployments) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateProjectLatestDeployments) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *CreateProjectLatestDeployments) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *CreateProjectLatestDeployments) GetOidcTokenClaims() *CreateProjectOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *CreateProjectLatestDeployments) GetPlan() CreateProjectPlan { + if o == nil { + return CreateProjectPlan("") + } + return o.Plan +} + +func (o *CreateProjectLatestDeployments) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *CreateProjectLatestDeployments) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *CreateProjectLatestDeployments) GetReadyAt() *float64 { + if o == nil { + return nil + } + return o.ReadyAt +} + +func (o *CreateProjectLatestDeployments) GetReadyState() CreateProjectReadyState { + if o == nil { + return CreateProjectReadyState("") + } + return o.ReadyState +} + +func (o *CreateProjectLatestDeployments) GetReadySubstate() *CreateProjectReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *CreateProjectLatestDeployments) GetRequestedAt() *float64 { + if o == nil { + return nil + } + return o.RequestedAt +} + +func (o *CreateProjectLatestDeployments) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *CreateProjectLatestDeployments) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateProjectLatestDeployments) GetType() CreateProjectProjectsResponse200Type { + if o == nil { + return CreateProjectProjectsResponse200Type("") + } + return o.Type +} + +func (o *CreateProjectLatestDeployments) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateProjectLatestDeployments) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *CreateProjectLatestDeployments) GetWithCache() *bool { + if o == nil { + return nil + } + return o.WithCache +} + +type CreateProjectLinkProjectsResponseType string + +const ( + CreateProjectLinkProjectsResponseTypeBitbucket CreateProjectLinkProjectsResponseType = "bitbucket" +) + +func (e CreateProjectLinkProjectsResponseType) ToPointer() *CreateProjectLinkProjectsResponseType { + return &e +} +func (e *CreateProjectLinkProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = CreateProjectLinkProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectLinkProjectsResponseType: %v", v) + } +} + +type CreateProjectLinkProjectsResponseDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *CreateProjectLinkProjectsResponseDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateProjectLinkProjectsResponseDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectLinkProjectsResponseDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateProjectLinkProjectsResponseDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *CreateProjectLinkProjectsResponseDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type CreateProjectLink3 struct { + Name *string `json:"name,omitempty"` + Slug *string `json:"slug,omitempty"` + Owner *string `json:"owner,omitempty"` + Type *CreateProjectLinkProjectsResponseType `json:"type,omitempty"` + UUID *string `json:"uuid,omitempty"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []CreateProjectLinkProjectsResponseDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *CreateProjectLink3) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *CreateProjectLink3) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateProjectLink3) GetOwner() *string { + if o == nil { + return nil + } + return o.Owner +} + +func (o *CreateProjectLink3) GetType() *CreateProjectLinkProjectsResponseType { + if o == nil { + return nil + } + return o.Type +} + +func (o *CreateProjectLink3) GetUUID() *string { + if o == nil { + return nil + } + return o.UUID +} + +func (o *CreateProjectLink3) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +func (o *CreateProjectLink3) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateProjectLink3) GetDeployHooks() []CreateProjectLinkProjectsResponseDeployHooks { + if o == nil { + return []CreateProjectLinkProjectsResponseDeployHooks{} + } + return o.DeployHooks +} + +func (o *CreateProjectLink3) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *CreateProjectLink3) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *CreateProjectLink3) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *CreateProjectLink3) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type CreateProjectLinkProjectsType string + +const ( + CreateProjectLinkProjectsTypeGitlab CreateProjectLinkProjectsType = "gitlab" +) + +func (e CreateProjectLinkProjectsType) ToPointer() *CreateProjectLinkProjectsType { + return &e +} +func (e *CreateProjectLinkProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = CreateProjectLinkProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectLinkProjectsType: %v", v) + } +} + +type CreateProjectLinkProjectsDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *CreateProjectLinkProjectsDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateProjectLinkProjectsDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectLinkProjectsDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateProjectLinkProjectsDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *CreateProjectLinkProjectsDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type CreateProjectLink2 struct { + ProjectID *string `json:"projectId,omitempty"` + ProjectName *string `json:"projectName,omitempty"` + ProjectNameWithNamespace *string `json:"projectNameWithNamespace,omitempty"` + ProjectNamespace *string `json:"projectNamespace,omitempty"` + // A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. This is the id of the top level group that a namespace belongs to. Gitlab supports group nesting (up to 20 levels). + ProjectOwnerID *float64 `json:"projectOwnerId,omitempty"` + ProjectURL *string `json:"projectUrl,omitempty"` + Type *CreateProjectLinkProjectsType `json:"type,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []CreateProjectLinkProjectsDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *CreateProjectLink2) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *CreateProjectLink2) GetProjectName() *string { + if o == nil { + return nil + } + return o.ProjectName +} + +func (o *CreateProjectLink2) GetProjectNameWithNamespace() *string { + if o == nil { + return nil + } + return o.ProjectNameWithNamespace +} + +func (o *CreateProjectLink2) GetProjectNamespace() *string { + if o == nil { + return nil + } + return o.ProjectNamespace +} + +func (o *CreateProjectLink2) GetProjectOwnerID() *float64 { + if o == nil { + return nil + } + return o.ProjectOwnerID +} + +func (o *CreateProjectLink2) GetProjectURL() *string { + if o == nil { + return nil + } + return o.ProjectURL +} + +func (o *CreateProjectLink2) GetType() *CreateProjectLinkProjectsType { + if o == nil { + return nil + } + return o.Type +} + +func (o *CreateProjectLink2) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateProjectLink2) GetDeployHooks() []CreateProjectLinkProjectsDeployHooks { + if o == nil { + return []CreateProjectLinkProjectsDeployHooks{} + } + return o.DeployHooks +} + +func (o *CreateProjectLink2) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *CreateProjectLink2) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *CreateProjectLink2) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *CreateProjectLink2) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type CreateProjectLinkType string + +const ( + CreateProjectLinkTypeGithub CreateProjectLinkType = "github" +) + +func (e CreateProjectLinkType) ToPointer() *CreateProjectLinkType { + return &e +} +func (e *CreateProjectLinkType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = CreateProjectLinkType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectLinkType: %v", v) + } +} + +type CreateProjectLinkDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *CreateProjectLinkDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateProjectLinkDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectLinkDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateProjectLinkDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *CreateProjectLinkDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type CreateProjectLink1 struct { + Org *string `json:"org,omitempty"` + // A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. + RepoOwnerID *float64 `json:"repoOwnerId,omitempty"` + Repo *string `json:"repo,omitempty"` + RepoID *float64 `json:"repoId,omitempty"` + Type *CreateProjectLinkType `json:"type,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []CreateProjectLinkDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *CreateProjectLink1) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} + +func (o *CreateProjectLink1) GetRepoOwnerID() *float64 { + if o == nil { + return nil + } + return o.RepoOwnerID +} + +func (o *CreateProjectLink1) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +func (o *CreateProjectLink1) GetRepoID() *float64 { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *CreateProjectLink1) GetType() *CreateProjectLinkType { + if o == nil { + return nil + } + return o.Type +} + +func (o *CreateProjectLink1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateProjectLink1) GetDeployHooks() []CreateProjectLinkDeployHooks { + if o == nil { + return []CreateProjectLinkDeployHooks{} + } + return o.DeployHooks +} + +func (o *CreateProjectLink1) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *CreateProjectLink1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *CreateProjectLink1) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *CreateProjectLink1) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type CreateProjectLinkUnionType string + +const ( + CreateProjectLinkUnionTypeCreateProjectLink1 CreateProjectLinkUnionType = "createProject_link_1" + CreateProjectLinkUnionTypeCreateProjectLink2 CreateProjectLinkUnionType = "createProject_link_2" + CreateProjectLinkUnionTypeCreateProjectLink3 CreateProjectLinkUnionType = "createProject_link_3" +) + +type CreateProjectLink struct { + CreateProjectLink1 *CreateProjectLink1 + CreateProjectLink2 *CreateProjectLink2 + CreateProjectLink3 *CreateProjectLink3 + + Type CreateProjectLinkUnionType +} + +func CreateCreateProjectLinkCreateProjectLink1(createProjectLink1 CreateProjectLink1) CreateProjectLink { + typ := CreateProjectLinkUnionTypeCreateProjectLink1 + + return CreateProjectLink{ + CreateProjectLink1: &createProjectLink1, + Type: typ, + } +} + +func CreateCreateProjectLinkCreateProjectLink2(createProjectLink2 CreateProjectLink2) CreateProjectLink { + typ := CreateProjectLinkUnionTypeCreateProjectLink2 + + return CreateProjectLink{ + CreateProjectLink2: &createProjectLink2, + Type: typ, + } +} + +func CreateCreateProjectLinkCreateProjectLink3(createProjectLink3 CreateProjectLink3) CreateProjectLink { + typ := CreateProjectLinkUnionTypeCreateProjectLink3 + + return CreateProjectLink{ + CreateProjectLink3: &createProjectLink3, + Type: typ, + } +} + +func (u *CreateProjectLink) UnmarshalJSON(data []byte) error { + + var createProjectLink1 CreateProjectLink1 = CreateProjectLink1{} + if err := utils.UnmarshalJSON(data, &createProjectLink1, "", true, true); err == nil { + u.CreateProjectLink1 = &createProjectLink1 + u.Type = CreateProjectLinkUnionTypeCreateProjectLink1 + return nil + } + + var createProjectLink3 CreateProjectLink3 = CreateProjectLink3{} + if err := utils.UnmarshalJSON(data, &createProjectLink3, "", true, true); err == nil { + u.CreateProjectLink3 = &createProjectLink3 + u.Type = CreateProjectLinkUnionTypeCreateProjectLink3 + return nil + } + + var createProjectLink2 CreateProjectLink2 = CreateProjectLink2{} + if err := utils.UnmarshalJSON(data, &createProjectLink2, "", true, true); err == nil { + u.CreateProjectLink2 = &createProjectLink2 + u.Type = CreateProjectLinkUnionTypeCreateProjectLink2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectLink", string(data)) +} + +func (u CreateProjectLink) MarshalJSON() ([]byte, error) { + if u.CreateProjectLink1 != nil { + return utils.MarshalJSON(u.CreateProjectLink1, "", true) + } + + if u.CreateProjectLink2 != nil { + return utils.MarshalJSON(u.CreateProjectLink2, "", true) + } + + if u.CreateProjectLink3 != nil { + return utils.MarshalJSON(u.CreateProjectLink3, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectLink: all fields are null") +} + +type CreateProjectMicrofrontends struct { + // Timestamp when the microfrontends settings were last updated. + UpdatedAt float64 `json:"updatedAt"` + // The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` + // Whether microfrontends are enabled for this project. + Enabled bool `json:"enabled"` + // Whether this project is the default application for the microfrontends group. The default application is the one that is used as the top level shell for the microfrontends group and hosts the other microfrontends. + IsDefaultApp *bool `json:"isDefaultApp,omitempty"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` +} + +func (o *CreateProjectMicrofrontends) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *CreateProjectMicrofrontends) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +func (o *CreateProjectMicrofrontends) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *CreateProjectMicrofrontends) GetIsDefaultApp() *bool { + if o == nil { + return nil + } + return o.IsDefaultApp +} + +func (o *CreateProjectMicrofrontends) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +type CreateProjectNodeVersion string + +const ( + CreateProjectNodeVersionTwentyTwoX CreateProjectNodeVersion = "22.x" + CreateProjectNodeVersionTwentyX CreateProjectNodeVersion = "20.x" + CreateProjectNodeVersionEighteenX CreateProjectNodeVersion = "18.x" + CreateProjectNodeVersionSixteenX CreateProjectNodeVersion = "16.x" + CreateProjectNodeVersionFourteenX CreateProjectNodeVersion = "14.x" + CreateProjectNodeVersionTwelveX CreateProjectNodeVersion = "12.x" + CreateProjectNodeVersionTenX CreateProjectNodeVersion = "10.x" + CreateProjectNodeVersionEight10X CreateProjectNodeVersion = "8.10.x" +) + +func (e CreateProjectNodeVersion) ToPointer() *CreateProjectNodeVersion { + return &e +} +func (e *CreateProjectNodeVersion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "22.x": + fallthrough + case "20.x": + fallthrough + case "18.x": + fallthrough + case "16.x": + fallthrough + case "14.x": + fallthrough + case "12.x": + fallthrough + case "10.x": + fallthrough + case "8.10.x": + *e = CreateProjectNodeVersion(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectNodeVersion: %v", v) + } +} + +type CreateProjectPaths struct { + Value string `json:"value"` +} + +func (o *CreateProjectPaths) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type CreateProjectOptionsAllowlist struct { + Paths []CreateProjectPaths `json:"paths"` +} + +func (o *CreateProjectOptionsAllowlist) GetPaths() []CreateProjectPaths { + if o == nil { + return []CreateProjectPaths{} + } + return o.Paths +} + +type CreateProjectPasswordProtection struct { +} + +type CreateProjectFunctionDefaultMemoryType string + +const ( + CreateProjectFunctionDefaultMemoryTypeStandardLegacy CreateProjectFunctionDefaultMemoryType = "standard_legacy" + CreateProjectFunctionDefaultMemoryTypeStandard CreateProjectFunctionDefaultMemoryType = "standard" + CreateProjectFunctionDefaultMemoryTypePerformance CreateProjectFunctionDefaultMemoryType = "performance" +) + +func (e CreateProjectFunctionDefaultMemoryType) ToPointer() *CreateProjectFunctionDefaultMemoryType { + return &e +} +func (e *CreateProjectFunctionDefaultMemoryType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "standard_legacy": + fallthrough + case "standard": + fallthrough + case "performance": + *e = CreateProjectFunctionDefaultMemoryType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectFunctionDefaultMemoryType: %v", v) + } +} + +type CreateProjectResourceConfig struct { + FunctionDefaultRegion *string `json:"functionDefaultRegion,omitempty"` + FunctionDefaultTimeout *float64 `json:"functionDefaultTimeout,omitempty"` + FunctionDefaultMemoryType *CreateProjectFunctionDefaultMemoryType `json:"functionDefaultMemoryType,omitempty"` + FunctionZeroConfigFailover *bool `json:"functionZeroConfigFailover,omitempty"` + AllowServerlessConcurrency *bool `json:"allowServerlessConcurrency,omitempty"` + ElasticConcurrencyEnabled *bool `json:"elasticConcurrencyEnabled,omitempty"` +} + +func (o *CreateProjectResourceConfig) GetFunctionDefaultRegion() *string { + if o == nil { + return nil + } + return o.FunctionDefaultRegion +} + +func (o *CreateProjectResourceConfig) GetFunctionDefaultTimeout() *float64 { + if o == nil { + return nil + } + return o.FunctionDefaultTimeout +} + +func (o *CreateProjectResourceConfig) GetFunctionDefaultMemoryType() *CreateProjectFunctionDefaultMemoryType { + if o == nil { + return nil + } + return o.FunctionDefaultMemoryType +} + +func (o *CreateProjectResourceConfig) GetFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.FunctionZeroConfigFailover +} + +func (o *CreateProjectResourceConfig) GetAllowServerlessConcurrency() *bool { + if o == nil { + return nil + } + return o.AllowServerlessConcurrency +} + +func (o *CreateProjectResourceConfig) GetElasticConcurrencyEnabled() *bool { + if o == nil { + return nil + } + return o.ElasticConcurrencyEnabled +} + +type CreateProjectDeploymentType string + +const ( + CreateProjectDeploymentTypePreview CreateProjectDeploymentType = "preview" + CreateProjectDeploymentTypeAll CreateProjectDeploymentType = "all" + CreateProjectDeploymentTypeProdDeploymentUrlsAndAllPreviews CreateProjectDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e CreateProjectDeploymentType) ToPointer() *CreateProjectDeploymentType { + return &e +} +func (e *CreateProjectDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = CreateProjectDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectDeploymentType: %v", v) + } +} + +type CreateProjectSsoProtection struct { + DeploymentType CreateProjectDeploymentType `json:"deploymentType"` +} + +func (o *CreateProjectSsoProtection) GetDeploymentType() CreateProjectDeploymentType { + if o == nil { + return CreateProjectDeploymentType("") + } + return o.DeploymentType +} + +type CreateProjectProjectsAliasAssignedType string + +const ( + CreateProjectProjectsAliasAssignedTypeNumber CreateProjectProjectsAliasAssignedType = "number" + CreateProjectProjectsAliasAssignedTypeBoolean CreateProjectProjectsAliasAssignedType = "boolean" +) + +type CreateProjectProjectsAliasAssigned struct { + Number *float64 + Boolean *bool + + Type CreateProjectProjectsAliasAssignedType +} + +func CreateCreateProjectProjectsAliasAssignedNumber(number float64) CreateProjectProjectsAliasAssigned { + typ := CreateProjectProjectsAliasAssignedTypeNumber + + return CreateProjectProjectsAliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateCreateProjectProjectsAliasAssignedBoolean(boolean bool) CreateProjectProjectsAliasAssigned { + typ := CreateProjectProjectsAliasAssignedTypeBoolean + + return CreateProjectProjectsAliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *CreateProjectProjectsAliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = CreateProjectProjectsAliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = CreateProjectProjectsAliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectProjectsAliasAssigned", string(data)) +} + +func (u CreateProjectProjectsAliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectProjectsAliasAssigned: all fields are null") +} + +type CreateProjectProjectsAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *CreateProjectProjectsAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *CreateProjectProjectsAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType string + +const ( + CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsTypeEndsWith CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType = "endsWith" + CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsTypeStartsWith CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType = "startsWith" + CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsTypeEquals CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType = "equals" +) + +func (e CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType) ToPointer() *CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType { + return &e +} +func (e *CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "endsWith": + fallthrough + case "startsWith": + fallthrough + case "equals": + *e = CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType: %v", v) + } +} + +type CreateProjectProjectsBranchMatcher struct { + Type CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType `json:"type"` + Pattern string `json:"pattern"` +} + +func (o *CreateProjectProjectsBranchMatcher) GetType() CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType { + if o == nil { + return CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType("") + } + return o.Type +} + +func (o *CreateProjectProjectsBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type CreateProjectProjectsBuilds struct { + Use string `json:"use"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` +} + +func (o *CreateProjectProjectsBuilds) GetUse() string { + if o == nil { + return "" + } + return o.Use +} + +func (o *CreateProjectProjectsBuilds) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *CreateProjectProjectsBuilds) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +type CreateProjectProjectsChecksConclusion string + +const ( + CreateProjectProjectsChecksConclusionSucceeded CreateProjectProjectsChecksConclusion = "succeeded" + CreateProjectProjectsChecksConclusionFailed CreateProjectProjectsChecksConclusion = "failed" + CreateProjectProjectsChecksConclusionSkipped CreateProjectProjectsChecksConclusion = "skipped" + CreateProjectProjectsChecksConclusionCanceled CreateProjectProjectsChecksConclusion = "canceled" +) + +func (e CreateProjectProjectsChecksConclusion) ToPointer() *CreateProjectProjectsChecksConclusion { + return &e +} +func (e *CreateProjectProjectsChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = CreateProjectProjectsChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsChecksConclusion: %v", v) + } +} + +type CreateProjectProjectsChecksState string + +const ( + CreateProjectProjectsChecksStateRegistered CreateProjectProjectsChecksState = "registered" + CreateProjectProjectsChecksStateRunning CreateProjectProjectsChecksState = "running" + CreateProjectProjectsChecksStateCompleted CreateProjectProjectsChecksState = "completed" +) + +func (e CreateProjectProjectsChecksState) ToPointer() *CreateProjectProjectsChecksState { + return &e +} +func (e *CreateProjectProjectsChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = CreateProjectProjectsChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsChecksState: %v", v) + } +} + +type CreateProjectProjectsCreator struct { + Email string `json:"email"` + GithubLogin *string `json:"githubLogin,omitempty"` + GitlabLogin *string `json:"gitlabLogin,omitempty"` + UID string `json:"uid"` + Username string `json:"username"` +} + +func (o *CreateProjectProjectsCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *CreateProjectProjectsCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *CreateProjectProjectsCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +func (o *CreateProjectProjectsCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *CreateProjectProjectsCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +type CreateProjectProjectsOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *CreateProjectProjectsOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type CreateProjectProjectsPlan string + +const ( + CreateProjectProjectsPlanPro CreateProjectProjectsPlan = "pro" + CreateProjectProjectsPlanEnterprise CreateProjectProjectsPlan = "enterprise" + CreateProjectProjectsPlanHobby CreateProjectProjectsPlan = "hobby" +) + +func (e CreateProjectProjectsPlan) ToPointer() *CreateProjectProjectsPlan { + return &e +} +func (e *CreateProjectProjectsPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = CreateProjectProjectsPlan(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsPlan: %v", v) + } +} + +type CreateProjectProjectsReadyState string + +const ( + CreateProjectProjectsReadyStateBuilding CreateProjectProjectsReadyState = "BUILDING" + CreateProjectProjectsReadyStateError CreateProjectProjectsReadyState = "ERROR" + CreateProjectProjectsReadyStateInitializing CreateProjectProjectsReadyState = "INITIALIZING" + CreateProjectProjectsReadyStateQueued CreateProjectProjectsReadyState = "QUEUED" + CreateProjectProjectsReadyStateReady CreateProjectProjectsReadyState = "READY" + CreateProjectProjectsReadyStateCanceled CreateProjectProjectsReadyState = "CANCELED" +) + +func (e CreateProjectProjectsReadyState) ToPointer() *CreateProjectProjectsReadyState { + return &e +} +func (e *CreateProjectProjectsReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = CreateProjectProjectsReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsReadyState: %v", v) + } +} + +type CreateProjectProjectsReadySubstate string + +const ( + CreateProjectProjectsReadySubstateStaged CreateProjectProjectsReadySubstate = "STAGED" + CreateProjectProjectsReadySubstatePromoted CreateProjectProjectsReadySubstate = "PROMOTED" +) + +func (e CreateProjectProjectsReadySubstate) ToPointer() *CreateProjectProjectsReadySubstate { + return &e +} +func (e *CreateProjectProjectsReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = CreateProjectProjectsReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsReadySubstate: %v", v) + } +} + +type CreateProjectProjectsResponse200ApplicationJSONType string + +const ( + CreateProjectProjectsResponse200ApplicationJSONTypeLambdas CreateProjectProjectsResponse200ApplicationJSONType = "LAMBDAS" +) + +func (e CreateProjectProjectsResponse200ApplicationJSONType) ToPointer() *CreateProjectProjectsResponse200ApplicationJSONType { + return &e +} +func (e *CreateProjectProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = CreateProjectProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type CreateProjectTargets struct { + ID string `json:"id"` + Alias []string `json:"alias,omitempty"` + AliasAssigned *CreateProjectProjectsAliasAssigned `json:"aliasAssigned,omitempty"` + AliasError *CreateProjectProjectsAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BranchMatcher *CreateProjectProjectsBranchMatcher `json:"branchMatcher,omitempty"` + BuildingAt *float64 `json:"buildingAt,omitempty"` + Builds []CreateProjectProjectsBuilds `json:"builds,omitempty"` + ChecksConclusion *CreateProjectProjectsChecksConclusion `json:"checksConclusion,omitempty"` + ChecksState *CreateProjectProjectsChecksState `json:"checksState,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedAt float64 `json:"createdAt"` + CreatedIn string `json:"createdIn"` + Creator *CreateProjectProjectsCreator `json:"creator"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + DeploymentHostname string `json:"deploymentHostname"` + Forced *bool `json:"forced,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OidcTokenClaims *CreateProjectProjectsOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + Plan CreateProjectProjectsPlan `json:"plan"` + // Whether or not preview comments are enabled for the deployment + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + Private bool `json:"private"` + ReadyAt *float64 `json:"readyAt,omitempty"` + ReadyState CreateProjectProjectsReadyState `json:"readyState"` + ReadySubstate *CreateProjectProjectsReadySubstate `json:"readySubstate,omitempty"` + RequestedAt *float64 `json:"requestedAt,omitempty"` + Target *string `json:"target,omitempty"` + TeamID *string `json:"teamId,omitempty"` + Type CreateProjectProjectsResponse200ApplicationJSONType `json:"type"` + URL string `json:"url"` + UserID string `json:"userId"` + WithCache *bool `json:"withCache,omitempty"` +} + +func (o *CreateProjectTargets) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectTargets) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *CreateProjectTargets) GetAliasAssigned() *CreateProjectProjectsAliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *CreateProjectTargets) GetAliasError() *CreateProjectProjectsAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *CreateProjectTargets) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *CreateProjectTargets) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *CreateProjectTargets) GetBranchMatcher() *CreateProjectProjectsBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *CreateProjectTargets) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *CreateProjectTargets) GetBuilds() []CreateProjectProjectsBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *CreateProjectTargets) GetChecksConclusion() *CreateProjectProjectsChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *CreateProjectTargets) GetChecksState() *CreateProjectProjectsChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *CreateProjectTargets) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *CreateProjectTargets) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *CreateProjectTargets) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateProjectTargets) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *CreateProjectTargets) GetCreator() *CreateProjectProjectsCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *CreateProjectTargets) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *CreateProjectTargets) GetDeploymentHostname() string { + if o == nil { + return "" + } + return o.DeploymentHostname +} + +func (o *CreateProjectTargets) GetForced() *bool { + if o == nil { + return nil + } + return o.Forced +} + +func (o *CreateProjectTargets) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateProjectTargets) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *CreateProjectTargets) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *CreateProjectTargets) GetOidcTokenClaims() *CreateProjectProjectsOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *CreateProjectTargets) GetPlan() CreateProjectProjectsPlan { + if o == nil { + return CreateProjectProjectsPlan("") + } + return o.Plan +} + +func (o *CreateProjectTargets) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *CreateProjectTargets) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *CreateProjectTargets) GetReadyAt() *float64 { + if o == nil { + return nil + } + return o.ReadyAt +} + +func (o *CreateProjectTargets) GetReadyState() CreateProjectProjectsReadyState { + if o == nil { + return CreateProjectProjectsReadyState("") + } + return o.ReadyState +} + +func (o *CreateProjectTargets) GetReadySubstate() *CreateProjectProjectsReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *CreateProjectTargets) GetRequestedAt() *float64 { + if o == nil { + return nil + } + return o.RequestedAt +} + +func (o *CreateProjectTargets) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *CreateProjectTargets) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateProjectTargets) GetType() CreateProjectProjectsResponse200ApplicationJSONType { + if o == nil { + return CreateProjectProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *CreateProjectTargets) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateProjectTargets) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *CreateProjectTargets) GetWithCache() *bool { + if o == nil { + return nil + } + return o.WithCache +} + +type CreateProjectPermissions struct { + AccessGroup []components.ACLAction `json:"accessGroup,omitempty"` + AliasGlobal []components.ACLAction `json:"aliasGlobal,omitempty"` + AnalyticsSampling []components.ACLAction `json:"analyticsSampling,omitempty"` + AnalyticsUsage []components.ACLAction `json:"analyticsUsage,omitempty"` + AuditLog []components.ACLAction `json:"auditLog,omitempty"` + BillingAddress []components.ACLAction `json:"billingAddress,omitempty"` + BillingInformation []components.ACLAction `json:"billingInformation,omitempty"` + BillingInvoice []components.ACLAction `json:"billingInvoice,omitempty"` + BillingInvoiceEmailRecipient []components.ACLAction `json:"billingInvoiceEmailRecipient,omitempty"` + BillingInvoiceLanguage []components.ACLAction `json:"billingInvoiceLanguage,omitempty"` + BillingPlan []components.ACLAction `json:"billingPlan,omitempty"` + BillingPurchaseOrder []components.ACLAction `json:"billingPurchaseOrder,omitempty"` + BillingTaxID []components.ACLAction `json:"billingTaxId,omitempty"` + Blob []components.ACLAction `json:"blob,omitempty"` + Budget []components.ACLAction `json:"budget,omitempty"` + CacheArtifact []components.ACLAction `json:"cacheArtifact,omitempty"` + CacheArtifactUsageEvent []components.ACLAction `json:"cacheArtifactUsageEvent,omitempty"` + CodeChecks []components.ACLAction `json:"codeChecks,omitempty"` + ConcurrentBuilds []components.ACLAction `json:"concurrentBuilds,omitempty"` + Connect []components.ACLAction `json:"connect,omitempty"` + ConnectConfiguration []components.ACLAction `json:"connectConfiguration,omitempty"` + Domain []components.ACLAction `json:"domain,omitempty"` + DomainAcceptDelegation []components.ACLAction `json:"domainAcceptDelegation,omitempty"` + DomainAuthCodes []components.ACLAction `json:"domainAuthCodes,omitempty"` + DomainCertificate []components.ACLAction `json:"domainCertificate,omitempty"` + DomainCheckConfig []components.ACLAction `json:"domainCheckConfig,omitempty"` + DomainMove []components.ACLAction `json:"domainMove,omitempty"` + DomainPurchase []components.ACLAction `json:"domainPurchase,omitempty"` + DomainRecord []components.ACLAction `json:"domainRecord,omitempty"` + DomainTransferIn []components.ACLAction `json:"domainTransferIn,omitempty"` + Event []components.ACLAction `json:"event,omitempty"` + OwnEvent []components.ACLAction `json:"ownEvent,omitempty"` + SensitiveEnvironmentVariablePolicy []components.ACLAction `json:"sensitiveEnvironmentVariablePolicy,omitempty"` + FileUpload []components.ACLAction `json:"fileUpload,omitempty"` + GitRepository []components.ACLAction `json:"gitRepository,omitempty"` + IPBlocking []components.ACLAction `json:"ipBlocking,omitempty"` + Integration []components.ACLAction `json:"integration,omitempty"` + IntegrationAccount []components.ACLAction `json:"integrationAccount,omitempty"` + IntegrationConfiguration []components.ACLAction `json:"integrationConfiguration,omitempty"` + IntegrationConfigurationTransfer []components.ACLAction `json:"integrationConfigurationTransfer,omitempty"` + IntegrationConfigurationProjects []components.ACLAction `json:"integrationConfigurationProjects,omitempty"` + IntegrationVercelConfigurationOverride []components.ACLAction `json:"integrationVercelConfigurationOverride,omitempty"` + IntegrationConfigurationRole []components.ACLAction `json:"integrationConfigurationRole,omitempty"` + IntegrationResource []components.ACLAction `json:"integrationResource,omitempty"` + IntegrationEvent []components.ACLAction `json:"integrationEvent,omitempty"` + IntegrationResourceSecrets []components.ACLAction `json:"integrationResourceSecrets,omitempty"` + IntegrationDeploymentAction []components.ACLAction `json:"integrationDeploymentAction,omitempty"` + MarketplaceInstallationMember []components.ACLAction `json:"marketplaceInstallationMember,omitempty"` + MarketplaceBillingData []components.ACLAction `json:"marketplaceBillingData,omitempty"` + MarketplaceInvoice []components.ACLAction `json:"marketplaceInvoice,omitempty"` + JobGlobal []components.ACLAction `json:"jobGlobal,omitempty"` + LogDrain []components.ACLAction `json:"logDrain,omitempty"` + Monitoring []components.ACLAction `json:"Monitoring,omitempty"` + MonitoringSettings []components.ACLAction `json:"monitoringSettings,omitempty"` + MonitoringQuery []components.ACLAction `json:"monitoringQuery,omitempty"` + MonitoringChart []components.ACLAction `json:"monitoringChart,omitempty"` + MonitoringAlert []components.ACLAction `json:"monitoringAlert,omitempty"` + NotificationDeploymentFailed []components.ACLAction `json:"notificationDeploymentFailed,omitempty"` + NotificationDomainConfiguration []components.ACLAction `json:"notificationDomainConfiguration,omitempty"` + NotificationDomainExpire []components.ACLAction `json:"notificationDomainExpire,omitempty"` + NotificationDomainMoved []components.ACLAction `json:"notificationDomainMoved,omitempty"` + NotificationDomainPurchase []components.ACLAction `json:"notificationDomainPurchase,omitempty"` + NotificationDomainRenewal []components.ACLAction `json:"notificationDomainRenewal,omitempty"` + NotificationDomainTransfer []components.ACLAction `json:"notificationDomainTransfer,omitempty"` + NotificationDomainUnverified []components.ACLAction `json:"notificationDomainUnverified,omitempty"` + NotificationMonitoringAlert []components.ACLAction `json:"NotificationMonitoringAlert,omitempty"` + NotificationPaymentFailed []components.ACLAction `json:"notificationPaymentFailed,omitempty"` + NotificationUsageAlert []components.ACLAction `json:"notificationUsageAlert,omitempty"` + NotificationCustomerBudget []components.ACLAction `json:"notificationCustomerBudget,omitempty"` + NotificationStatementOfReasons []components.ACLAction `json:"notificationStatementOfReasons,omitempty"` + Oauth2Connection []components.ACLAction `json:"oauth2Connection,omitempty"` + ObservabilityConfiguration []components.ACLAction `json:"observabilityConfiguration,omitempty"` + OpenTelemetryEndpoint []components.ACLAction `json:"openTelemetryEndpoint,omitempty"` + PaymentMethod []components.ACLAction `json:"paymentMethod,omitempty"` + Permissions []components.ACLAction `json:"permissions,omitempty"` + Postgres []components.ACLAction `json:"postgres,omitempty"` + PreviewDeploymentSuffix []components.ACLAction `json:"previewDeploymentSuffix,omitempty"` + ProTrialOnboarding []components.ACLAction `json:"proTrialOnboarding,omitempty"` + SharedEnvVars []components.ACLAction `json:"sharedEnvVars,omitempty"` + SharedEnvVarsProduction []components.ACLAction `json:"sharedEnvVarsProduction,omitempty"` + Space []components.ACLAction `json:"space,omitempty"` + SpaceRun []components.ACLAction `json:"spaceRun,omitempty"` + PasswordProtectionInvoiceItem []components.ACLAction `json:"passwordProtectionInvoiceItem,omitempty"` + RateLimit []components.ACLAction `json:"rateLimit,omitempty"` + Redis []components.ACLAction `json:"redis,omitempty"` + Repository []components.ACLAction `json:"repository,omitempty"` + RemoteCaching []components.ACLAction `json:"remoteCaching,omitempty"` + SamlConfig []components.ACLAction `json:"samlConfig,omitempty"` + Secret []components.ACLAction `json:"secret,omitempty"` + RedisStoreTokenSet []components.ACLAction `json:"redisStoreTokenSet,omitempty"` + BlobStoreTokenSet []components.ACLAction `json:"blobStoreTokenSet,omitempty"` + PostgresStoreTokenSet []components.ACLAction `json:"postgresStoreTokenSet,omitempty"` + IntegrationStoreTokenSet []components.ACLAction `json:"integrationStoreTokenSet,omitempty"` + IntegrationResourceReplCommand []components.ACLAction `json:"integrationResourceReplCommand,omitempty"` + StoreTransfer []components.ACLAction `json:"storeTransfer,omitempty"` + SupportCase []components.ACLAction `json:"supportCase,omitempty"` + SupportCaseComment []components.ACLAction `json:"supportCaseComment,omitempty"` + DataCacheBillingSettings []components.ACLAction `json:"dataCacheBillingSettings,omitempty"` + Team []components.ACLAction `json:"team,omitempty"` + TeamAccessRequest []components.ACLAction `json:"teamAccessRequest,omitempty"` + TeamFellowMembership []components.ACLAction `json:"teamFellowMembership,omitempty"` + TeamGitExclusivity []components.ACLAction `json:"teamGitExclusivity,omitempty"` + TeamInvite []components.ACLAction `json:"teamInvite,omitempty"` + TeamInviteCode []components.ACLAction `json:"teamInviteCode,omitempty"` + TeamJoin []components.ACLAction `json:"teamJoin,omitempty"` + TeamMicrofrontends []components.ACLAction `json:"teamMicrofrontends,omitempty"` + TeamOwnMembership []components.ACLAction `json:"teamOwnMembership,omitempty"` + TeamOwnMembershipDisconnectSAML []components.ACLAction `json:"teamOwnMembershipDisconnectSAML,omitempty"` + Token []components.ACLAction `json:"token,omitempty"` + Usage []components.ACLAction `json:"usage,omitempty"` + UsageCycle []components.ACLAction `json:"usageCycle,omitempty"` + User []components.ACLAction `json:"user,omitempty"` + UserConnection []components.ACLAction `json:"userConnection,omitempty"` + VpcPeeringConnection []components.ACLAction `json:"vpcPeeringConnection,omitempty"` + WebAnalyticsPlan []components.ACLAction `json:"webAnalyticsPlan,omitempty"` + WebAuthn []components.ACLAction `json:"webAuthn,omitempty"` + EdgeConfig []components.ACLAction `json:"edgeConfig,omitempty"` + EdgeConfigItem []components.ACLAction `json:"edgeConfigItem,omitempty"` + EdgeConfigSchema []components.ACLAction `json:"edgeConfigSchema,omitempty"` + EdgeConfigToken []components.ACLAction `json:"edgeConfigToken,omitempty"` + Webhook []components.ACLAction `json:"webhook,omitempty"` + WebhookEvent []components.ACLAction `json:"webhook-event,omitempty"` + EndpointVerification []components.ACLAction `json:"endpointVerification,omitempty"` + ProjectTransferIn []components.ACLAction `json:"projectTransferIn,omitempty"` + Oauth2Application []components.ACLAction `json:"oauth2Application,omitempty"` + AliasProject []components.ACLAction `json:"aliasProject,omitempty"` + AliasProtectionBypass []components.ACLAction `json:"aliasProtectionBypass,omitempty"` + ProductionAliasProtectionBypass []components.ACLAction `json:"productionAliasProtectionBypass,omitempty"` + ConnectConfigurationLink []components.ACLAction `json:"connectConfigurationLink,omitempty"` + DataCacheNamespace []components.ACLAction `json:"dataCacheNamespace,omitempty"` + Deployment []components.ACLAction `json:"deployment,omitempty"` + DeploymentCheck []components.ACLAction `json:"deploymentCheck,omitempty"` + DeploymentCheckPreview []components.ACLAction `json:"deploymentCheckPreview,omitempty"` + DeploymentCheckReRunFromProductionBranch []components.ACLAction `json:"deploymentCheckReRunFromProductionBranch,omitempty"` + DeploymentProductionGit []components.ACLAction `json:"deploymentProductionGit,omitempty"` + DeploymentV0 []components.ACLAction `json:"deploymentV0,omitempty"` + DeploymentPreview []components.ACLAction `json:"deploymentPreview,omitempty"` + DeploymentPrivate []components.ACLAction `json:"deploymentPrivate,omitempty"` + DeploymentPromote []components.ACLAction `json:"deploymentPromote,omitempty"` + DeploymentRollback []components.ACLAction `json:"deploymentRollback,omitempty"` + Environments []components.ACLAction `json:"environments,omitempty"` + Logs []components.ACLAction `json:"logs,omitempty"` + LogsPreset []components.ACLAction `json:"logsPreset,omitempty"` + PasswordProtection []components.ACLAction `json:"passwordProtection,omitempty"` + OptionsAllowlist []components.ACLAction `json:"optionsAllowlist,omitempty"` + Job []components.ACLAction `json:"job,omitempty"` + ObservabilityData []components.ACLAction `json:"observabilityData,omitempty"` + Project []components.ACLAction `json:"project,omitempty"` + ProjectFromV0 []components.ACLAction `json:"projectFromV0,omitempty"` + ProjectAccessGroup []components.ACLAction `json:"projectAccessGroup,omitempty"` + ProjectAnalyticsSampling []components.ACLAction `json:"projectAnalyticsSampling,omitempty"` + ProjectDeploymentHook []components.ACLAction `json:"projectDeploymentHook,omitempty"` + ProjectDomain []components.ACLAction `json:"projectDomain,omitempty"` + ProjectDomainMove []components.ACLAction `json:"projectDomainMove,omitempty"` + ProjectDomainCheckConfig []components.ACLAction `json:"projectDomainCheckConfig,omitempty"` + ProjectEnvVars []components.ACLAction `json:"projectEnvVars,omitempty"` + ProjectEnvVarsProduction []components.ACLAction `json:"projectEnvVarsProduction,omitempty"` + ProjectEnvVarsUnownedByIntegration []components.ACLAction `json:"projectEnvVarsUnownedByIntegration,omitempty"` + ProjectFlags []components.ACLAction `json:"projectFlags,omitempty"` + ProjectID []components.ACLAction `json:"projectId,omitempty"` + ProjectIntegrationConfiguration []components.ACLAction `json:"projectIntegrationConfiguration,omitempty"` + ProjectLink []components.ACLAction `json:"projectLink,omitempty"` + ProjectMember []components.ACLAction `json:"projectMember,omitempty"` + ProjectMonitoring []components.ACLAction `json:"projectMonitoring,omitempty"` + ProjectPermissions []components.ACLAction `json:"projectPermissions,omitempty"` + ProjectProductionBranch []components.ACLAction `json:"projectProductionBranch,omitempty"` + ProjectTransfer []components.ACLAction `json:"projectTransfer,omitempty"` + ProjectTransferOut []components.ACLAction `json:"projectTransferOut,omitempty"` + ProjectProtectionBypass []components.ACLAction `json:"projectProtectionBypass,omitempty"` + ProjectUsage []components.ACLAction `json:"projectUsage,omitempty"` + ProjectAnalyticsUsage []components.ACLAction `json:"projectAnalyticsUsage,omitempty"` + ProjectSupportCase []components.ACLAction `json:"projectSupportCase,omitempty"` + ProjectSupportCaseComment []components.ACLAction `json:"projectSupportCaseComment,omitempty"` + ProjectDeploymentExpiration []components.ACLAction `json:"projectDeploymentExpiration,omitempty"` + ProjectTier []components.ACLAction `json:"projectTier,omitempty"` + SeawallConfig []components.ACLAction `json:"seawallConfig,omitempty"` + SkewProtection []components.ACLAction `json:"skewProtection,omitempty"` + Analytics []components.ACLAction `json:"analytics,omitempty"` + TrustedIps []components.ACLAction `json:"trustedIps,omitempty"` + WebAnalytics []components.ACLAction `json:"webAnalytics,omitempty"` + SharedEnvVarConnection []components.ACLAction `json:"sharedEnvVarConnection,omitempty"` + Sonar []components.ACLAction `json:"sonar,omitempty"` +} + +func (o *CreateProjectPermissions) GetAccessGroup() []components.ACLAction { + if o == nil { + return nil + } + return o.AccessGroup +} + +func (o *CreateProjectPermissions) GetAliasGlobal() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasGlobal +} + +func (o *CreateProjectPermissions) GetAnalyticsSampling() []components.ACLAction { + if o == nil { + return nil + } + return o.AnalyticsSampling +} + +func (o *CreateProjectPermissions) GetAnalyticsUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.AnalyticsUsage +} + +func (o *CreateProjectPermissions) GetAuditLog() []components.ACLAction { + if o == nil { + return nil + } + return o.AuditLog +} + +func (o *CreateProjectPermissions) GetBillingAddress() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingAddress +} + +func (o *CreateProjectPermissions) GetBillingInformation() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInformation +} + +func (o *CreateProjectPermissions) GetBillingInvoice() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoice +} + +func (o *CreateProjectPermissions) GetBillingInvoiceEmailRecipient() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoiceEmailRecipient +} + +func (o *CreateProjectPermissions) GetBillingInvoiceLanguage() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoiceLanguage +} + +func (o *CreateProjectPermissions) GetBillingPlan() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingPlan +} + +func (o *CreateProjectPermissions) GetBillingPurchaseOrder() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingPurchaseOrder +} + +func (o *CreateProjectPermissions) GetBillingTaxID() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingTaxID +} + +func (o *CreateProjectPermissions) GetBlob() []components.ACLAction { + if o == nil { + return nil + } + return o.Blob +} + +func (o *CreateProjectPermissions) GetBudget() []components.ACLAction { + if o == nil { + return nil + } + return o.Budget +} + +func (o *CreateProjectPermissions) GetCacheArtifact() []components.ACLAction { + if o == nil { + return nil + } + return o.CacheArtifact +} + +func (o *CreateProjectPermissions) GetCacheArtifactUsageEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.CacheArtifactUsageEvent +} + +func (o *CreateProjectPermissions) GetCodeChecks() []components.ACLAction { + if o == nil { + return nil + } + return o.CodeChecks +} + +func (o *CreateProjectPermissions) GetConcurrentBuilds() []components.ACLAction { + if o == nil { + return nil + } + return o.ConcurrentBuilds +} + +func (o *CreateProjectPermissions) GetConnect() []components.ACLAction { + if o == nil { + return nil + } + return o.Connect +} + +func (o *CreateProjectPermissions) GetConnectConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ConnectConfiguration +} + +func (o *CreateProjectPermissions) GetDomain() []components.ACLAction { + if o == nil { + return nil + } + return o.Domain +} + +func (o *CreateProjectPermissions) GetDomainAcceptDelegation() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainAcceptDelegation +} + +func (o *CreateProjectPermissions) GetDomainAuthCodes() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainAuthCodes +} + +func (o *CreateProjectPermissions) GetDomainCertificate() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainCertificate +} + +func (o *CreateProjectPermissions) GetDomainCheckConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainCheckConfig +} + +func (o *CreateProjectPermissions) GetDomainMove() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainMove +} + +func (o *CreateProjectPermissions) GetDomainPurchase() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainPurchase +} + +func (o *CreateProjectPermissions) GetDomainRecord() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainRecord +} + +func (o *CreateProjectPermissions) GetDomainTransferIn() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainTransferIn +} + +func (o *CreateProjectPermissions) GetEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.Event +} + +func (o *CreateProjectPermissions) GetOwnEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.OwnEvent +} + +func (o *CreateProjectPermissions) GetSensitiveEnvironmentVariablePolicy() []components.ACLAction { + if o == nil { + return nil + } + return o.SensitiveEnvironmentVariablePolicy +} + +func (o *CreateProjectPermissions) GetFileUpload() []components.ACLAction { + if o == nil { + return nil + } + return o.FileUpload +} + +func (o *CreateProjectPermissions) GetGitRepository() []components.ACLAction { + if o == nil { + return nil + } + return o.GitRepository +} + +func (o *CreateProjectPermissions) GetIPBlocking() []components.ACLAction { + if o == nil { + return nil + } + return o.IPBlocking +} + +func (o *CreateProjectPermissions) GetIntegration() []components.ACLAction { + if o == nil { + return nil + } + return o.Integration +} + +func (o *CreateProjectPermissions) GetIntegrationAccount() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationAccount +} + +func (o *CreateProjectPermissions) GetIntegrationConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfiguration +} + +func (o *CreateProjectPermissions) GetIntegrationConfigurationTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationTransfer +} + +func (o *CreateProjectPermissions) GetIntegrationConfigurationProjects() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationProjects +} + +func (o *CreateProjectPermissions) GetIntegrationVercelConfigurationOverride() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationVercelConfigurationOverride +} + +func (o *CreateProjectPermissions) GetIntegrationConfigurationRole() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationRole +} + +func (o *CreateProjectPermissions) GetIntegrationResource() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResource +} + +func (o *CreateProjectPermissions) GetIntegrationEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationEvent +} + +func (o *CreateProjectPermissions) GetIntegrationResourceSecrets() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResourceSecrets +} + +func (o *CreateProjectPermissions) GetIntegrationDeploymentAction() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationDeploymentAction +} + +func (o *CreateProjectPermissions) GetMarketplaceInstallationMember() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceInstallationMember +} + +func (o *CreateProjectPermissions) GetMarketplaceBillingData() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceBillingData +} + +func (o *CreateProjectPermissions) GetMarketplaceInvoice() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceInvoice +} + +func (o *CreateProjectPermissions) GetJobGlobal() []components.ACLAction { + if o == nil { + return nil + } + return o.JobGlobal +} + +func (o *CreateProjectPermissions) GetLogDrain() []components.ACLAction { + if o == nil { + return nil + } + return o.LogDrain +} + +func (o *CreateProjectPermissions) GetMonitoring() []components.ACLAction { + if o == nil { + return nil + } + return o.Monitoring +} + +func (o *CreateProjectPermissions) GetMonitoringSettings() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringSettings +} + +func (o *CreateProjectPermissions) GetMonitoringQuery() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringQuery +} + +func (o *CreateProjectPermissions) GetMonitoringChart() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringChart +} + +func (o *CreateProjectPermissions) GetMonitoringAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringAlert +} + +func (o *CreateProjectPermissions) GetNotificationDeploymentFailed() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDeploymentFailed +} + +func (o *CreateProjectPermissions) GetNotificationDomainConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainConfiguration +} + +func (o *CreateProjectPermissions) GetNotificationDomainExpire() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainExpire +} + +func (o *CreateProjectPermissions) GetNotificationDomainMoved() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainMoved +} + +func (o *CreateProjectPermissions) GetNotificationDomainPurchase() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainPurchase +} + +func (o *CreateProjectPermissions) GetNotificationDomainRenewal() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainRenewal +} + +func (o *CreateProjectPermissions) GetNotificationDomainTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainTransfer +} + +func (o *CreateProjectPermissions) GetNotificationDomainUnverified() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainUnverified +} + +func (o *CreateProjectPermissions) GetNotificationMonitoringAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationMonitoringAlert +} + +func (o *CreateProjectPermissions) GetNotificationPaymentFailed() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationPaymentFailed +} + +func (o *CreateProjectPermissions) GetNotificationUsageAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationUsageAlert +} + +func (o *CreateProjectPermissions) GetNotificationCustomerBudget() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationCustomerBudget +} + +func (o *CreateProjectPermissions) GetNotificationStatementOfReasons() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationStatementOfReasons +} + +func (o *CreateProjectPermissions) GetOauth2Connection() []components.ACLAction { + if o == nil { + return nil + } + return o.Oauth2Connection +} + +func (o *CreateProjectPermissions) GetObservabilityConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ObservabilityConfiguration +} + +func (o *CreateProjectPermissions) GetOpenTelemetryEndpoint() []components.ACLAction { + if o == nil { + return nil + } + return o.OpenTelemetryEndpoint +} + +func (o *CreateProjectPermissions) GetPaymentMethod() []components.ACLAction { + if o == nil { + return nil + } + return o.PaymentMethod +} + +func (o *CreateProjectPermissions) GetPermissions() []components.ACLAction { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *CreateProjectPermissions) GetPostgres() []components.ACLAction { + if o == nil { + return nil + } + return o.Postgres +} + +func (o *CreateProjectPermissions) GetPreviewDeploymentSuffix() []components.ACLAction { + if o == nil { + return nil + } + return o.PreviewDeploymentSuffix +} + +func (o *CreateProjectPermissions) GetProTrialOnboarding() []components.ACLAction { + if o == nil { + return nil + } + return o.ProTrialOnboarding +} + +func (o *CreateProjectPermissions) GetSharedEnvVars() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVars +} + +func (o *CreateProjectPermissions) GetSharedEnvVarsProduction() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVarsProduction +} + +func (o *CreateProjectPermissions) GetSpace() []components.ACLAction { + if o == nil { + return nil + } + return o.Space +} + +func (o *CreateProjectPermissions) GetSpaceRun() []components.ACLAction { + if o == nil { + return nil + } + return o.SpaceRun +} + +func (o *CreateProjectPermissions) GetPasswordProtectionInvoiceItem() []components.ACLAction { + if o == nil { + return nil + } + return o.PasswordProtectionInvoiceItem +} + +func (o *CreateProjectPermissions) GetRateLimit() []components.ACLAction { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *CreateProjectPermissions) GetRedis() []components.ACLAction { + if o == nil { + return nil + } + return o.Redis +} + +func (o *CreateProjectPermissions) GetRepository() []components.ACLAction { + if o == nil { + return nil + } + return o.Repository +} + +func (o *CreateProjectPermissions) GetRemoteCaching() []components.ACLAction { + if o == nil { + return nil + } + return o.RemoteCaching +} + +func (o *CreateProjectPermissions) GetSamlConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.SamlConfig +} + +func (o *CreateProjectPermissions) GetSecret() []components.ACLAction { + if o == nil { + return nil + } + return o.Secret +} + +func (o *CreateProjectPermissions) GetRedisStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.RedisStoreTokenSet +} + +func (o *CreateProjectPermissions) GetBlobStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.BlobStoreTokenSet +} + +func (o *CreateProjectPermissions) GetPostgresStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.PostgresStoreTokenSet +} + +func (o *CreateProjectPermissions) GetIntegrationStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationStoreTokenSet +} + +func (o *CreateProjectPermissions) GetIntegrationResourceReplCommand() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResourceReplCommand +} + +func (o *CreateProjectPermissions) GetStoreTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.StoreTransfer +} + +func (o *CreateProjectPermissions) GetSupportCase() []components.ACLAction { + if o == nil { + return nil + } + return o.SupportCase +} + +func (o *CreateProjectPermissions) GetSupportCaseComment() []components.ACLAction { + if o == nil { + return nil + } + return o.SupportCaseComment +} + +func (o *CreateProjectPermissions) GetDataCacheBillingSettings() []components.ACLAction { + if o == nil { + return nil + } + return o.DataCacheBillingSettings +} + +func (o *CreateProjectPermissions) GetTeam() []components.ACLAction { + if o == nil { + return nil + } + return o.Team +} + +func (o *CreateProjectPermissions) GetTeamAccessRequest() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamAccessRequest +} + +func (o *CreateProjectPermissions) GetTeamFellowMembership() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamFellowMembership +} + +func (o *CreateProjectPermissions) GetTeamGitExclusivity() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamGitExclusivity +} + +func (o *CreateProjectPermissions) GetTeamInvite() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamInvite +} + +func (o *CreateProjectPermissions) GetTeamInviteCode() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamInviteCode +} + +func (o *CreateProjectPermissions) GetTeamJoin() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamJoin +} + +func (o *CreateProjectPermissions) GetTeamMicrofrontends() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamMicrofrontends +} + +func (o *CreateProjectPermissions) GetTeamOwnMembership() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamOwnMembership +} + +func (o *CreateProjectPermissions) GetTeamOwnMembershipDisconnectSAML() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamOwnMembershipDisconnectSAML +} + +func (o *CreateProjectPermissions) GetToken() []components.ACLAction { + if o == nil { + return nil + } + return o.Token +} + +func (o *CreateProjectPermissions) GetUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.Usage +} + +func (o *CreateProjectPermissions) GetUsageCycle() []components.ACLAction { + if o == nil { + return nil + } + return o.UsageCycle +} + +func (o *CreateProjectPermissions) GetUser() []components.ACLAction { + if o == nil { + return nil + } + return o.User +} + +func (o *CreateProjectPermissions) GetUserConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.UserConnection +} + +func (o *CreateProjectPermissions) GetVpcPeeringConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.VpcPeeringConnection +} + +func (o *CreateProjectPermissions) GetWebAnalyticsPlan() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAnalyticsPlan +} + +func (o *CreateProjectPermissions) GetWebAuthn() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAuthn +} + +func (o *CreateProjectPermissions) GetEdgeConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfig +} + +func (o *CreateProjectPermissions) GetEdgeConfigItem() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigItem +} + +func (o *CreateProjectPermissions) GetEdgeConfigSchema() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigSchema +} + +func (o *CreateProjectPermissions) GetEdgeConfigToken() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigToken +} + +func (o *CreateProjectPermissions) GetWebhook() []components.ACLAction { + if o == nil { + return nil + } + return o.Webhook +} + +func (o *CreateProjectPermissions) GetWebhookEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.WebhookEvent +} + +func (o *CreateProjectPermissions) GetEndpointVerification() []components.ACLAction { + if o == nil { + return nil + } + return o.EndpointVerification +} + +func (o *CreateProjectPermissions) GetProjectTransferIn() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransferIn +} + +func (o *CreateProjectPermissions) GetOauth2Application() []components.ACLAction { + if o == nil { + return nil + } + return o.Oauth2Application +} + +func (o *CreateProjectPermissions) GetAliasProject() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasProject +} + +func (o *CreateProjectPermissions) GetAliasProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasProtectionBypass +} + +func (o *CreateProjectPermissions) GetProductionAliasProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.ProductionAliasProtectionBypass +} + +func (o *CreateProjectPermissions) GetConnectConfigurationLink() []components.ACLAction { + if o == nil { + return nil + } + return o.ConnectConfigurationLink +} + +func (o *CreateProjectPermissions) GetDataCacheNamespace() []components.ACLAction { + if o == nil { + return nil + } + return o.DataCacheNamespace +} + +func (o *CreateProjectPermissions) GetDeployment() []components.ACLAction { + if o == nil { + return nil + } + return o.Deployment +} + +func (o *CreateProjectPermissions) GetDeploymentCheck() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheck +} + +func (o *CreateProjectPermissions) GetDeploymentCheckPreview() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheckPreview +} + +func (o *CreateProjectPermissions) GetDeploymentCheckReRunFromProductionBranch() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheckReRunFromProductionBranch +} + +func (o *CreateProjectPermissions) GetDeploymentProductionGit() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentProductionGit +} + +func (o *CreateProjectPermissions) GetDeploymentV0() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentV0 +} + +func (o *CreateProjectPermissions) GetDeploymentPreview() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPreview +} + +func (o *CreateProjectPermissions) GetDeploymentPrivate() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPrivate +} + +func (o *CreateProjectPermissions) GetDeploymentPromote() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPromote +} + +func (o *CreateProjectPermissions) GetDeploymentRollback() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentRollback +} + +func (o *CreateProjectPermissions) GetEnvironments() []components.ACLAction { + if o == nil { + return nil + } + return o.Environments +} + +func (o *CreateProjectPermissions) GetLogs() []components.ACLAction { + if o == nil { + return nil + } + return o.Logs +} + +func (o *CreateProjectPermissions) GetLogsPreset() []components.ACLAction { + if o == nil { + return nil + } + return o.LogsPreset +} + +func (o *CreateProjectPermissions) GetPasswordProtection() []components.ACLAction { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *CreateProjectPermissions) GetOptionsAllowlist() []components.ACLAction { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +func (o *CreateProjectPermissions) GetJob() []components.ACLAction { + if o == nil { + return nil + } + return o.Job +} + +func (o *CreateProjectPermissions) GetObservabilityData() []components.ACLAction { + if o == nil { + return nil + } + return o.ObservabilityData +} + +func (o *CreateProjectPermissions) GetProject() []components.ACLAction { + if o == nil { + return nil + } + return o.Project +} + +func (o *CreateProjectPermissions) GetProjectFromV0() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectFromV0 +} + +func (o *CreateProjectPermissions) GetProjectAccessGroup() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAccessGroup +} + +func (o *CreateProjectPermissions) GetProjectAnalyticsSampling() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAnalyticsSampling +} + +func (o *CreateProjectPermissions) GetProjectDeploymentHook() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDeploymentHook +} + +func (o *CreateProjectPermissions) GetProjectDomain() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomain +} + +func (o *CreateProjectPermissions) GetProjectDomainMove() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomainMove +} + +func (o *CreateProjectPermissions) GetProjectDomainCheckConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomainCheckConfig +} + +func (o *CreateProjectPermissions) GetProjectEnvVars() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVars +} + +func (o *CreateProjectPermissions) GetProjectEnvVarsProduction() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVarsProduction +} + +func (o *CreateProjectPermissions) GetProjectEnvVarsUnownedByIntegration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVarsUnownedByIntegration +} + +func (o *CreateProjectPermissions) GetProjectFlags() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectFlags +} + +func (o *CreateProjectPermissions) GetProjectID() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *CreateProjectPermissions) GetProjectIntegrationConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectIntegrationConfiguration +} + +func (o *CreateProjectPermissions) GetProjectLink() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectLink +} + +func (o *CreateProjectPermissions) GetProjectMember() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectMember +} + +func (o *CreateProjectPermissions) GetProjectMonitoring() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectMonitoring +} + +func (o *CreateProjectPermissions) GetProjectPermissions() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectPermissions +} + +func (o *CreateProjectPermissions) GetProjectProductionBranch() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectProductionBranch +} + +func (o *CreateProjectPermissions) GetProjectTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransfer +} + +func (o *CreateProjectPermissions) GetProjectTransferOut() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransferOut +} + +func (o *CreateProjectPermissions) GetProjectProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectProtectionBypass +} + +func (o *CreateProjectPermissions) GetProjectUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectUsage +} + +func (o *CreateProjectPermissions) GetProjectAnalyticsUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAnalyticsUsage +} + +func (o *CreateProjectPermissions) GetProjectSupportCase() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectSupportCase +} + +func (o *CreateProjectPermissions) GetProjectSupportCaseComment() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectSupportCaseComment +} + +func (o *CreateProjectPermissions) GetProjectDeploymentExpiration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDeploymentExpiration +} + +func (o *CreateProjectPermissions) GetProjectTier() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTier +} + +func (o *CreateProjectPermissions) GetSeawallConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.SeawallConfig +} + +func (o *CreateProjectPermissions) GetSkewProtection() []components.ACLAction { + if o == nil { + return nil + } + return o.SkewProtection +} + +func (o *CreateProjectPermissions) GetAnalytics() []components.ACLAction { + if o == nil { + return nil + } + return o.Analytics +} + +func (o *CreateProjectPermissions) GetTrustedIps() []components.ACLAction { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *CreateProjectPermissions) GetWebAnalytics() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *CreateProjectPermissions) GetSharedEnvVarConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVarConnection +} + +func (o *CreateProjectPermissions) GetSonar() []components.ACLAction { + if o == nil { + return nil + } + return o.Sonar +} + +type CreateProjectLastRollbackTarget struct { +} + +type CreateProjectJobStatus string + +const ( + CreateProjectJobStatusSucceeded CreateProjectJobStatus = "succeeded" + CreateProjectJobStatusFailed CreateProjectJobStatus = "failed" + CreateProjectJobStatusSkipped CreateProjectJobStatus = "skipped" + CreateProjectJobStatusPending CreateProjectJobStatus = "pending" + CreateProjectJobStatusInProgress CreateProjectJobStatus = "in-progress" +) + +func (e CreateProjectJobStatus) ToPointer() *CreateProjectJobStatus { + return &e +} +func (e *CreateProjectJobStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "pending": + fallthrough + case "in-progress": + *e = CreateProjectJobStatus(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectJobStatus: %v", v) + } +} + +type CreateProjectProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + CreateProjectProjectsResponse200ApplicationJSONResponseBodyTypePromote CreateProjectProjectsResponse200ApplicationJSONResponseBodyType = "promote" + CreateProjectProjectsResponse200ApplicationJSONResponseBodyTypeRollback CreateProjectProjectsResponse200ApplicationJSONResponseBodyType = "rollback" +) + +func (e CreateProjectProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *CreateProjectProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *CreateProjectProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "promote": + fallthrough + case "rollback": + *e = CreateProjectProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type CreateProjectLastAliasRequest struct { + FromDeploymentID string `json:"fromDeploymentId"` + ToDeploymentID string `json:"toDeploymentId"` + JobStatus CreateProjectJobStatus `json:"jobStatus"` + RequestedAt float64 `json:"requestedAt"` + Type CreateProjectProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` +} + +func (o *CreateProjectLastAliasRequest) GetFromDeploymentID() string { + if o == nil { + return "" + } + return o.FromDeploymentID +} + +func (o *CreateProjectLastAliasRequest) GetToDeploymentID() string { + if o == nil { + return "" + } + return o.ToDeploymentID +} + +func (o *CreateProjectLastAliasRequest) GetJobStatus() CreateProjectJobStatus { + if o == nil { + return CreateProjectJobStatus("") + } + return o.JobStatus +} + +func (o *CreateProjectLastAliasRequest) GetRequestedAt() float64 { + if o == nil { + return 0.0 + } + return o.RequestedAt +} + +func (o *CreateProjectLastAliasRequest) GetType() CreateProjectProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return CreateProjectProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +type CreateProjectScope string + +const ( + CreateProjectScopeAutomationBypass CreateProjectScope = "automation-bypass" +) + +func (e CreateProjectScope) ToPointer() *CreateProjectScope { + return &e +} +func (e *CreateProjectScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "automation-bypass": + *e = CreateProjectScope(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectScope: %v", v) + } +} + +type CreateProjectProtectionBypass struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope CreateProjectScope `json:"scope"` +} + +func (o *CreateProjectProtectionBypass) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateProjectProtectionBypass) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *CreateProjectProtectionBypass) GetScope() CreateProjectScope { + if o == nil { + return CreateProjectScope("") + } + return o.Scope +} + +type CreateProjectTrustedIpsProjectsDeploymentType string + +const ( + CreateProjectTrustedIpsProjectsDeploymentTypeProduction CreateProjectTrustedIpsProjectsDeploymentType = "production" + CreateProjectTrustedIpsProjectsDeploymentTypePreview CreateProjectTrustedIpsProjectsDeploymentType = "preview" + CreateProjectTrustedIpsProjectsDeploymentTypeAll CreateProjectTrustedIpsProjectsDeploymentType = "all" + CreateProjectTrustedIpsProjectsDeploymentTypeProdDeploymentUrlsAndAllPreviews CreateProjectTrustedIpsProjectsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e CreateProjectTrustedIpsProjectsDeploymentType) ToPointer() *CreateProjectTrustedIpsProjectsDeploymentType { + return &e +} +func (e *CreateProjectTrustedIpsProjectsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = CreateProjectTrustedIpsProjectsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectTrustedIpsProjectsDeploymentType: %v", v) + } +} + +type CreateProjectTrustedIps2 struct { + DeploymentType CreateProjectTrustedIpsProjectsDeploymentType `json:"deploymentType"` +} + +func (o *CreateProjectTrustedIps2) GetDeploymentType() CreateProjectTrustedIpsProjectsDeploymentType { + if o == nil { + return CreateProjectTrustedIpsProjectsDeploymentType("") + } + return o.DeploymentType +} + +type CreateProjectTrustedIpsDeploymentType string + +const ( + CreateProjectTrustedIpsDeploymentTypeProduction CreateProjectTrustedIpsDeploymentType = "production" + CreateProjectTrustedIpsDeploymentTypePreview CreateProjectTrustedIpsDeploymentType = "preview" + CreateProjectTrustedIpsDeploymentTypeAll CreateProjectTrustedIpsDeploymentType = "all" + CreateProjectTrustedIpsDeploymentTypeProdDeploymentUrlsAndAllPreviews CreateProjectTrustedIpsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e CreateProjectTrustedIpsDeploymentType) ToPointer() *CreateProjectTrustedIpsDeploymentType { + return &e +} +func (e *CreateProjectTrustedIpsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = CreateProjectTrustedIpsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectTrustedIpsDeploymentType: %v", v) + } +} + +type TrustedIpsAddresses struct { + Value string `json:"value"` + Note *string `json:"note,omitempty"` +} + +func (o *TrustedIpsAddresses) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *TrustedIpsAddresses) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +type TrustedIpsProtectionMode string + +const ( + TrustedIpsProtectionModeAdditional TrustedIpsProtectionMode = "additional" + TrustedIpsProtectionModeExclusive TrustedIpsProtectionMode = "exclusive" +) + +func (e TrustedIpsProtectionMode) ToPointer() *TrustedIpsProtectionMode { + return &e +} +func (e *TrustedIpsProtectionMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "additional": + fallthrough + case "exclusive": + *e = TrustedIpsProtectionMode(v) + return nil + default: + return fmt.Errorf("invalid value for TrustedIpsProtectionMode: %v", v) + } +} + +type CreateProjectTrustedIps1 struct { + DeploymentType CreateProjectTrustedIpsDeploymentType `json:"deploymentType"` + Addresses []TrustedIpsAddresses `json:"addresses"` + ProtectionMode TrustedIpsProtectionMode `json:"protectionMode"` +} + +func (o *CreateProjectTrustedIps1) GetDeploymentType() CreateProjectTrustedIpsDeploymentType { + if o == nil { + return CreateProjectTrustedIpsDeploymentType("") + } + return o.DeploymentType +} + +func (o *CreateProjectTrustedIps1) GetAddresses() []TrustedIpsAddresses { + if o == nil { + return []TrustedIpsAddresses{} + } + return o.Addresses +} + +func (o *CreateProjectTrustedIps1) GetProtectionMode() TrustedIpsProtectionMode { + if o == nil { + return TrustedIpsProtectionMode("") + } + return o.ProtectionMode +} + +type CreateProjectTrustedIpsType string + +const ( + CreateProjectTrustedIpsTypeCreateProjectTrustedIps1 CreateProjectTrustedIpsType = "createProject_trustedIps_1" + CreateProjectTrustedIpsTypeCreateProjectTrustedIps2 CreateProjectTrustedIpsType = "createProject_trustedIps_2" +) + +type CreateProjectTrustedIps struct { + CreateProjectTrustedIps1 *CreateProjectTrustedIps1 + CreateProjectTrustedIps2 *CreateProjectTrustedIps2 + + Type CreateProjectTrustedIpsType +} + +func CreateCreateProjectTrustedIpsCreateProjectTrustedIps1(createProjectTrustedIps1 CreateProjectTrustedIps1) CreateProjectTrustedIps { + typ := CreateProjectTrustedIpsTypeCreateProjectTrustedIps1 + + return CreateProjectTrustedIps{ + CreateProjectTrustedIps1: &createProjectTrustedIps1, + Type: typ, + } +} + +func CreateCreateProjectTrustedIpsCreateProjectTrustedIps2(createProjectTrustedIps2 CreateProjectTrustedIps2) CreateProjectTrustedIps { + typ := CreateProjectTrustedIpsTypeCreateProjectTrustedIps2 + + return CreateProjectTrustedIps{ + CreateProjectTrustedIps2: &createProjectTrustedIps2, + Type: typ, + } +} + +func (u *CreateProjectTrustedIps) UnmarshalJSON(data []byte) error { + + var createProjectTrustedIps2 CreateProjectTrustedIps2 = CreateProjectTrustedIps2{} + if err := utils.UnmarshalJSON(data, &createProjectTrustedIps2, "", true, true); err == nil { + u.CreateProjectTrustedIps2 = &createProjectTrustedIps2 + u.Type = CreateProjectTrustedIpsTypeCreateProjectTrustedIps2 + return nil + } + + var createProjectTrustedIps1 CreateProjectTrustedIps1 = CreateProjectTrustedIps1{} + if err := utils.UnmarshalJSON(data, &createProjectTrustedIps1, "", true, true); err == nil { + u.CreateProjectTrustedIps1 = &createProjectTrustedIps1 + u.Type = CreateProjectTrustedIpsTypeCreateProjectTrustedIps1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectTrustedIps", string(data)) +} + +func (u CreateProjectTrustedIps) MarshalJSON() ([]byte, error) { + if u.CreateProjectTrustedIps1 != nil { + return utils.MarshalJSON(u.CreateProjectTrustedIps1, "", true) + } + + if u.CreateProjectTrustedIps2 != nil { + return utils.MarshalJSON(u.CreateProjectTrustedIps2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectTrustedIps: all fields are null") +} + +type CreateProjectGitComments struct { + // Whether the Vercel bot should comment on PRs + OnPullRequest bool `json:"onPullRequest"` + // Whether the Vercel bot should comment on commits + OnCommit bool `json:"onCommit"` +} + +func (o *CreateProjectGitComments) GetOnPullRequest() bool { + if o == nil { + return false + } + return o.OnPullRequest +} + +func (o *CreateProjectGitComments) GetOnCommit() bool { + if o == nil { + return false + } + return o.OnCommit +} + +type CreateProjectWebAnalytics struct { + ID string `json:"id"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` +} + +func (o *CreateProjectWebAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectWebAnalytics) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *CreateProjectWebAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *CreateProjectWebAnalytics) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *CreateProjectWebAnalytics) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +type CreateProjectSrc2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *CreateProjectSrc2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *CreateProjectSrc2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *CreateProjectSrc2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *CreateProjectSrc2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *CreateProjectSrc2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *CreateProjectSrc2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *CreateProjectSrc2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *CreateProjectSrc2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *CreateProjectSrc2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *CreateProjectSrc2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *CreateProjectSrc2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type CreateProjectSrcType string + +const ( + CreateProjectSrcTypeStr CreateProjectSrcType = "str" + CreateProjectSrcTypeCreateProjectSrc2 CreateProjectSrcType = "createProject_src_2" +) + +type CreateProjectSrc struct { + Str *string + CreateProjectSrc2 *CreateProjectSrc2 + + Type CreateProjectSrcType +} + +func CreateCreateProjectSrcStr(str string) CreateProjectSrc { + typ := CreateProjectSrcTypeStr + + return CreateProjectSrc{ + Str: &str, + Type: typ, + } +} + +func CreateCreateProjectSrcCreateProjectSrc2(createProjectSrc2 CreateProjectSrc2) CreateProjectSrc { + typ := CreateProjectSrcTypeCreateProjectSrc2 + + return CreateProjectSrc{ + CreateProjectSrc2: &createProjectSrc2, + Type: typ, + } +} + +func (u *CreateProjectSrc) UnmarshalJSON(data []byte) error { + + var createProjectSrc2 CreateProjectSrc2 = CreateProjectSrc2{} + if err := utils.UnmarshalJSON(data, &createProjectSrc2, "", true, true); err == nil { + u.CreateProjectSrc2 = &createProjectSrc2 + u.Type = CreateProjectSrcTypeCreateProjectSrc2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = CreateProjectSrcTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectSrc", string(data)) +} + +func (u CreateProjectSrc) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.CreateProjectSrc2 != nil { + return utils.MarshalJSON(u.CreateProjectSrc2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectSrc: all fields are null") +} + +type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType string + +const ( + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypePath CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "path" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeHost CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "host" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeMethod CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "method" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeHeader CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "header" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeCookie CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "cookie" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeQuery CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "query" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeIPAddress CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "ip_address" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeProtocol CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "protocol" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeScheme CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "scheme" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeEnvironment CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "environment" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeRegion CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "region" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeInitialRequestPath CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "initial_request_path" +) + +func (e CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType) ToPointer() *CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType { + return &e +} +func (e *CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "path": + fallthrough + case "host": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "region": + fallthrough + case "initial_request_path": + *e = CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType: %v", v) + } +} + +type CreateProjectValue2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *CreateProjectValue2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *CreateProjectValue2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *CreateProjectValue2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *CreateProjectValue2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *CreateProjectValue2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *CreateProjectValue2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *CreateProjectValue2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *CreateProjectValue2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *CreateProjectValue2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *CreateProjectValue2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *CreateProjectValue2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type CreateProjectValueType string + +const ( + CreateProjectValueTypeStr CreateProjectValueType = "str" + CreateProjectValueTypeCreateProjectValue2 CreateProjectValueType = "createProject_value_2" +) + +type CreateProjectValue struct { + Str *string + CreateProjectValue2 *CreateProjectValue2 + + Type CreateProjectValueType +} + +func CreateCreateProjectValueStr(str string) CreateProjectValue { + typ := CreateProjectValueTypeStr + + return CreateProjectValue{ + Str: &str, + Type: typ, + } +} + +func CreateCreateProjectValueCreateProjectValue2(createProjectValue2 CreateProjectValue2) CreateProjectValue { + typ := CreateProjectValueTypeCreateProjectValue2 + + return CreateProjectValue{ + CreateProjectValue2: &createProjectValue2, + Type: typ, + } +} + +func (u *CreateProjectValue) UnmarshalJSON(data []byte) error { + + var createProjectValue2 CreateProjectValue2 = CreateProjectValue2{} + if err := utils.UnmarshalJSON(data, &createProjectValue2, "", true, true); err == nil { + u.CreateProjectValue2 = &createProjectValue2 + u.Type = CreateProjectValueTypeCreateProjectValue2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = CreateProjectValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectValue", string(data)) +} + +func (u CreateProjectValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.CreateProjectValue2 != nil { + return utils.MarshalJSON(u.CreateProjectValue2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectValue: all fields are null") +} + +type CreateProjectHas struct { + Type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType `json:"type"` + Key *string `json:"key,omitempty"` + Value *CreateProjectValue `json:"value,omitempty"` +} + +func (o *CreateProjectHas) GetType() CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType { + if o == nil { + return CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType("") + } + return o.Type +} + +func (o *CreateProjectHas) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *CreateProjectHas) GetValue() *CreateProjectValue { + if o == nil { + return nil + } + return o.Value +} + +type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType string + +const ( + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypePath CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "path" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeHost CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "host" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeMethod CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "method" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeHeader CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "header" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeCookie CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "cookie" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeQuery CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "query" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeIPAddress CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "ip_address" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeProtocol CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "protocol" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeScheme CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "scheme" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeEnvironment CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "environment" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeRegion CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "region" + CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeInitialRequestPath CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "initial_request_path" +) + +func (e CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType) ToPointer() *CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType { + return &e +} +func (e *CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "path": + fallthrough + case "host": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "region": + fallthrough + case "initial_request_path": + *e = CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType: %v", v) + } +} + +type CreateProjectValueProjects2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *CreateProjectValueProjects2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *CreateProjectValueProjects2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *CreateProjectValueProjects2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *CreateProjectValueProjects2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *CreateProjectValueProjects2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *CreateProjectValueProjects2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *CreateProjectValueProjects2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *CreateProjectValueProjects2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *CreateProjectValueProjects2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *CreateProjectValueProjects2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *CreateProjectValueProjects2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type CreateProjectProjectsValueType string + +const ( + CreateProjectProjectsValueTypeStr CreateProjectProjectsValueType = "str" + CreateProjectProjectsValueTypeCreateProjectValueProjects2 CreateProjectProjectsValueType = "createProject_value_projects_2" +) + +type CreateProjectProjectsValue struct { + Str *string + CreateProjectValueProjects2 *CreateProjectValueProjects2 + + Type CreateProjectProjectsValueType +} + +func CreateCreateProjectProjectsValueStr(str string) CreateProjectProjectsValue { + typ := CreateProjectProjectsValueTypeStr + + return CreateProjectProjectsValue{ + Str: &str, + Type: typ, + } +} + +func CreateCreateProjectProjectsValueCreateProjectValueProjects2(createProjectValueProjects2 CreateProjectValueProjects2) CreateProjectProjectsValue { + typ := CreateProjectProjectsValueTypeCreateProjectValueProjects2 + + return CreateProjectProjectsValue{ + CreateProjectValueProjects2: &createProjectValueProjects2, + Type: typ, + } +} + +func (u *CreateProjectProjectsValue) UnmarshalJSON(data []byte) error { + + var createProjectValueProjects2 CreateProjectValueProjects2 = CreateProjectValueProjects2{} + if err := utils.UnmarshalJSON(data, &createProjectValueProjects2, "", true, true); err == nil { + u.CreateProjectValueProjects2 = &createProjectValueProjects2 + u.Type = CreateProjectProjectsValueTypeCreateProjectValueProjects2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = CreateProjectProjectsValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectProjectsValue", string(data)) +} + +func (u CreateProjectProjectsValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.CreateProjectValueProjects2 != nil { + return utils.MarshalJSON(u.CreateProjectValueProjects2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectProjectsValue: all fields are null") +} + +type CreateProjectMissing struct { + Type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType `json:"type"` + Key *string `json:"key,omitempty"` + Value *CreateProjectProjectsValue `json:"value,omitempty"` +} + +func (o *CreateProjectMissing) GetType() CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType { + if o == nil { + return CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType("") + } + return o.Type +} + +func (o *CreateProjectMissing) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *CreateProjectMissing) GetValue() *CreateProjectProjectsValue { + if o == nil { + return nil + } + return o.Value +} + +type CreateProjectHandle string + +const ( + CreateProjectHandleInit CreateProjectHandle = "init" + CreateProjectHandleFinalize CreateProjectHandle = "finalize" +) + +func (e CreateProjectHandle) ToPointer() *CreateProjectHandle { + return &e +} +func (e *CreateProjectHandle) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "init": + fallthrough + case "finalize": + *e = CreateProjectHandle(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectHandle: %v", v) + } +} + +type CreateProjectAction string + +const ( + CreateProjectActionDeny CreateProjectAction = "deny" + CreateProjectActionChallenge CreateProjectAction = "challenge" + CreateProjectActionLog CreateProjectAction = "log" + CreateProjectActionBypass CreateProjectAction = "bypass" + CreateProjectActionRateLimit CreateProjectAction = "rate_limit" + CreateProjectActionRedirect CreateProjectAction = "redirect" +) + +func (e CreateProjectAction) ToPointer() *CreateProjectAction { + return &e +} +func (e *CreateProjectAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "challenge": + fallthrough + case "log": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = CreateProjectAction(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectAction: %v", v) + } +} + +type CreateProjectAlgo string + +const ( + CreateProjectAlgoFixedWindow CreateProjectAlgo = "fixed_window" + CreateProjectAlgoTokenBucket CreateProjectAlgo = "token_bucket" +) + +func (e CreateProjectAlgo) ToPointer() *CreateProjectAlgo { + return &e +} +func (e *CreateProjectAlgo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = CreateProjectAlgo(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectAlgo: %v", v) + } +} + +type CreateProjectErl struct { + Algo CreateProjectAlgo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` +} + +func (o *CreateProjectErl) GetAlgo() CreateProjectAlgo { + if o == nil { + return CreateProjectAlgo("") + } + return o.Algo +} + +func (o *CreateProjectErl) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *CreateProjectErl) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *CreateProjectErl) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +type CreateProjectMitigate struct { + Action CreateProjectAction `json:"action"` + RuleID string `json:"rule_id"` + TTL *float64 `json:"ttl,omitempty"` + Erl *CreateProjectErl `json:"erl,omitempty"` +} + +func (o *CreateProjectMitigate) GetAction() CreateProjectAction { + if o == nil { + return CreateProjectAction("") + } + return o.Action +} + +func (o *CreateProjectMitigate) GetRuleID() string { + if o == nil { + return "" + } + return o.RuleID +} + +func (o *CreateProjectMitigate) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *CreateProjectMitigate) GetErl() *CreateProjectErl { + if o == nil { + return nil + } + return o.Erl +} + +type CreateProjectFirewallRoutes struct { + Src *CreateProjectSrc `json:"src,omitempty"` + Has []CreateProjectHas `json:"has,omitempty"` + Missing []CreateProjectMissing `json:"missing,omitempty"` + Dest *string `json:"dest,omitempty"` + Status *float64 `json:"status,omitempty"` + Handle *CreateProjectHandle `json:"handle,omitempty"` + Mitigate *CreateProjectMitigate `json:"mitigate,omitempty"` +} + +func (o *CreateProjectFirewallRoutes) GetSrc() *CreateProjectSrc { + if o == nil { + return nil + } + return o.Src +} + +func (o *CreateProjectFirewallRoutes) GetHas() []CreateProjectHas { + if o == nil { + return nil + } + return o.Has +} + +func (o *CreateProjectFirewallRoutes) GetMissing() []CreateProjectMissing { + if o == nil { + return nil + } + return o.Missing +} + +func (o *CreateProjectFirewallRoutes) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *CreateProjectFirewallRoutes) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +func (o *CreateProjectFirewallRoutes) GetHandle() *CreateProjectHandle { + if o == nil { + return nil + } + return o.Handle +} + +func (o *CreateProjectFirewallRoutes) GetMitigate() *CreateProjectMitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type CreateProjectSecurity struct { + AttackModeEnabled *bool `json:"attackModeEnabled,omitempty"` + AttackModeUpdatedAt *float64 `json:"attackModeUpdatedAt,omitempty"` + FirewallEnabled *bool `json:"firewallEnabled,omitempty"` + FirewallUpdatedAt *float64 `json:"firewallUpdatedAt,omitempty"` + AttackModeActiveUntil *float64 `json:"attackModeActiveUntil,omitempty"` + FirewallConfigVersion *float64 `json:"firewallConfigVersion,omitempty"` + FirewallRoutes []CreateProjectFirewallRoutes `json:"firewallRoutes,omitempty"` + FirewallSeawallEnabled *bool `json:"firewallSeawallEnabled,omitempty"` + Ja3Enabled *bool `json:"ja3Enabled,omitempty"` + Ja4Enabled *bool `json:"ja4Enabled,omitempty"` + FirewallBypassIps []string `json:"firewallBypassIps,omitempty"` +} + +func (o *CreateProjectSecurity) GetAttackModeEnabled() *bool { + if o == nil { + return nil + } + return o.AttackModeEnabled +} + +func (o *CreateProjectSecurity) GetAttackModeUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.AttackModeUpdatedAt +} + +func (o *CreateProjectSecurity) GetFirewallEnabled() *bool { + if o == nil { + return nil + } + return o.FirewallEnabled +} + +func (o *CreateProjectSecurity) GetFirewallUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.FirewallUpdatedAt +} + +func (o *CreateProjectSecurity) GetAttackModeActiveUntil() *float64 { + if o == nil { + return nil + } + return o.AttackModeActiveUntil +} + +func (o *CreateProjectSecurity) GetFirewallConfigVersion() *float64 { + if o == nil { + return nil + } + return o.FirewallConfigVersion +} + +func (o *CreateProjectSecurity) GetFirewallRoutes() []CreateProjectFirewallRoutes { + if o == nil { + return nil + } + return o.FirewallRoutes +} + +func (o *CreateProjectSecurity) GetFirewallSeawallEnabled() *bool { + if o == nil { + return nil + } + return o.FirewallSeawallEnabled +} + +func (o *CreateProjectSecurity) GetJa3Enabled() *bool { + if o == nil { + return nil + } + return o.Ja3Enabled +} + +func (o *CreateProjectSecurity) GetJa4Enabled() *bool { + if o == nil { + return nil + } + return o.Ja4Enabled +} + +func (o *CreateProjectSecurity) GetFirewallBypassIps() []string { + if o == nil { + return nil + } + return o.FirewallBypassIps +} + +// CreateProjectIssuerMode - - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com` +type CreateProjectIssuerMode string + +const ( + CreateProjectIssuerModeTeam CreateProjectIssuerMode = "team" + CreateProjectIssuerModeGlobal CreateProjectIssuerMode = "global" +) + +func (e CreateProjectIssuerMode) ToPointer() *CreateProjectIssuerMode { + return &e +} +func (e *CreateProjectIssuerMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "global": + *e = CreateProjectIssuerMode(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectIssuerMode: %v", v) + } +} + +type CreateProjectOidcTokenConfig struct { + Enabled bool `json:"enabled"` + // - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com` + IssuerMode *CreateProjectIssuerMode `json:"issuerMode,omitempty"` +} + +func (o *CreateProjectOidcTokenConfig) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *CreateProjectOidcTokenConfig) GetIssuerMode() *CreateProjectIssuerMode { + if o == nil { + return nil + } + return o.IssuerMode +} + +type CreateProjectTier string + +const ( + CreateProjectTierStandard CreateProjectTier = "standard" + CreateProjectTierAdvanced CreateProjectTier = "advanced" + CreateProjectTierCritical CreateProjectTier = "critical" +) + +func (e CreateProjectTier) ToPointer() *CreateProjectTier { + return &e +} +func (e *CreateProjectTier) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "standard": + fallthrough + case "advanced": + fallthrough + case "critical": + *e = CreateProjectTier(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectTier: %v", v) + } +} + +// CreateProjectResponseBody - The project was successfuly created +type CreateProjectResponseBody struct { + AccountID string `json:"accountId"` + Analytics *CreateProjectAnalytics `json:"analytics,omitempty"` + SpeedInsights *CreateProjectSpeedInsights `json:"speedInsights,omitempty"` + AutoExposeSystemEnvs *bool `json:"autoExposeSystemEnvs,omitempty"` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + AutoAssignCustomDomainsUpdatedBy *string `json:"autoAssignCustomDomainsUpdatedBy,omitempty"` + BuildCommand *string `json:"buildCommand,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + CustomerSupportCodeVisibility *bool `json:"customerSupportCodeVisibility,omitempty"` + Crons *CreateProjectCrons `json:"crons,omitempty"` + DataCache *CreateProjectDataCache `json:"dataCache,omitempty"` + DeploymentExpiration *CreateProjectDeploymentExpiration `json:"deploymentExpiration,omitempty"` + DevCommand *string `json:"devCommand,omitempty"` + DirectoryListing bool `json:"directoryListing"` + InstallCommand *string `json:"installCommand,omitempty"` + Env []CreateProjectEnv `json:"env,omitempty"` + CustomEnvironments []CreateProjectCustomEnvironments `json:"customEnvironments,omitempty"` + Framework *CreateProjectProjectsFramework `json:"framework,omitempty"` + GitForkProtection *bool `json:"gitForkProtection,omitempty"` + GitLFS *bool `json:"gitLFS,omitempty"` + ID string `json:"id"` + IPBuckets []CreateProjectIPBuckets `json:"ipBuckets,omitempty"` + LatestDeployments []CreateProjectLatestDeployments `json:"latestDeployments,omitempty"` + Link *CreateProjectLink `json:"link,omitempty"` + Microfrontends *CreateProjectMicrofrontends `json:"microfrontends,omitempty"` + Name string `json:"name"` + NodeVersion CreateProjectNodeVersion `json:"nodeVersion"` + OptionsAllowlist *CreateProjectOptionsAllowlist `json:"optionsAllowlist,omitempty"` + OutputDirectory *string `json:"outputDirectory,omitempty"` + PassiveConnectConfigurationID *string `json:"passiveConnectConfigurationId,omitempty"` + PasswordProtection *CreateProjectPasswordProtection `json:"passwordProtection,omitempty"` + ProductionDeploymentsFastLane *bool `json:"productionDeploymentsFastLane,omitempty"` + PublicSource *bool `json:"publicSource,omitempty"` + ResourceConfig *CreateProjectResourceConfig `json:"resourceConfig,omitempty"` + RootDirectory *string `json:"rootDirectory,omitempty"` + ServerlessFunctionRegion *string `json:"serverlessFunctionRegion,omitempty"` + ServerlessFunctionZeroConfigFailover *bool `json:"serverlessFunctionZeroConfigFailover,omitempty"` + SkewProtectionBoundaryAt *float64 `json:"skewProtectionBoundaryAt,omitempty"` + SkewProtectionMaxAge *float64 `json:"skewProtectionMaxAge,omitempty"` + SkipGitConnectDuringLink *bool `json:"skipGitConnectDuringLink,omitempty"` + SourceFilesOutsideRootDirectory *bool `json:"sourceFilesOutsideRootDirectory,omitempty"` + EnableAffectedProjectsDeployments *bool `json:"enableAffectedProjectsDeployments,omitempty"` + SsoProtection *CreateProjectSsoProtection `json:"ssoProtection,omitempty"` + Targets map[string]CreateProjectTargets `json:"targets,omitempty"` + TransferCompletedAt *float64 `json:"transferCompletedAt,omitempty"` + TransferStartedAt *float64 `json:"transferStartedAt,omitempty"` + TransferToAccountID *string `json:"transferToAccountId,omitempty"` + TransferredFromAccountID *string `json:"transferredFromAccountId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Live *bool `json:"live,omitempty"` + EnablePreviewFeedback *bool `json:"enablePreviewFeedback,omitempty"` + EnableProductionFeedback *bool `json:"enableProductionFeedback,omitempty"` + Permissions *CreateProjectPermissions `json:"permissions,omitempty"` + LastRollbackTarget *CreateProjectLastRollbackTarget `json:"lastRollbackTarget,omitempty"` + LastAliasRequest *CreateProjectLastAliasRequest `json:"lastAliasRequest,omitempty"` + HasFloatingAliases *bool `json:"hasFloatingAliases,omitempty"` + ProtectionBypass map[string]CreateProjectProtectionBypass `json:"protectionBypass,omitempty"` + HasActiveBranches *bool `json:"hasActiveBranches,omitempty"` + TrustedIps *CreateProjectTrustedIps `json:"trustedIps,omitempty"` + GitComments *CreateProjectGitComments `json:"gitComments,omitempty"` + Paused *bool `json:"paused,omitempty"` + ConcurrencyBucketName *string `json:"concurrencyBucketName,omitempty"` + WebAnalytics *CreateProjectWebAnalytics `json:"webAnalytics,omitempty"` + Security *CreateProjectSecurity `json:"security,omitempty"` + OidcTokenConfig *CreateProjectOidcTokenConfig `json:"oidcTokenConfig,omitempty"` + Tier *CreateProjectTier `json:"tier,omitempty"` +} + +func (o *CreateProjectResponseBody) GetAccountID() string { + if o == nil { + return "" + } + return o.AccountID +} + +func (o *CreateProjectResponseBody) GetAnalytics() *CreateProjectAnalytics { + if o == nil { + return nil + } + return o.Analytics +} + +func (o *CreateProjectResponseBody) GetSpeedInsights() *CreateProjectSpeedInsights { + if o == nil { + return nil + } + return o.SpeedInsights +} + +func (o *CreateProjectResponseBody) GetAutoExposeSystemEnvs() *bool { + if o == nil { + return nil + } + return o.AutoExposeSystemEnvs +} + +func (o *CreateProjectResponseBody) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *CreateProjectResponseBody) GetAutoAssignCustomDomainsUpdatedBy() *string { + if o == nil { + return nil + } + return o.AutoAssignCustomDomainsUpdatedBy +} + +func (o *CreateProjectResponseBody) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *CreateProjectResponseBody) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *CreateProjectResponseBody) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *CreateProjectResponseBody) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *CreateProjectResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CreateProjectResponseBody) GetCustomerSupportCodeVisibility() *bool { + if o == nil { + return nil + } + return o.CustomerSupportCodeVisibility +} + +func (o *CreateProjectResponseBody) GetCrons() *CreateProjectCrons { + if o == nil { + return nil + } + return o.Crons +} + +func (o *CreateProjectResponseBody) GetDataCache() *CreateProjectDataCache { + if o == nil { + return nil + } + return o.DataCache +} + +func (o *CreateProjectResponseBody) GetDeploymentExpiration() *CreateProjectDeploymentExpiration { + if o == nil { + return nil + } + return o.DeploymentExpiration +} + +func (o *CreateProjectResponseBody) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *CreateProjectResponseBody) GetDirectoryListing() bool { + if o == nil { + return false + } + return o.DirectoryListing +} + +func (o *CreateProjectResponseBody) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *CreateProjectResponseBody) GetEnv() []CreateProjectEnv { + if o == nil { + return nil + } + return o.Env +} + +func (o *CreateProjectResponseBody) GetCustomEnvironments() []CreateProjectCustomEnvironments { + if o == nil { + return nil + } + return o.CustomEnvironments +} + +func (o *CreateProjectResponseBody) GetFramework() *CreateProjectProjectsFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *CreateProjectResponseBody) GetGitForkProtection() *bool { + if o == nil { + return nil + } + return o.GitForkProtection +} + +func (o *CreateProjectResponseBody) GetGitLFS() *bool { + if o == nil { + return nil + } + return o.GitLFS +} + +func (o *CreateProjectResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateProjectResponseBody) GetIPBuckets() []CreateProjectIPBuckets { + if o == nil { + return nil + } + return o.IPBuckets +} + +func (o *CreateProjectResponseBody) GetLatestDeployments() []CreateProjectLatestDeployments { + if o == nil { + return nil + } + return o.LatestDeployments +} + +func (o *CreateProjectResponseBody) GetLink() *CreateProjectLink { + if o == nil { + return nil + } + return o.Link +} + +func (o *CreateProjectResponseBody) GetMicrofrontends() *CreateProjectMicrofrontends { + if o == nil { + return nil + } + return o.Microfrontends +} + +func (o *CreateProjectResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateProjectResponseBody) GetNodeVersion() CreateProjectNodeVersion { + if o == nil { + return CreateProjectNodeVersion("") + } + return o.NodeVersion +} + +func (o *CreateProjectResponseBody) GetOptionsAllowlist() *CreateProjectOptionsAllowlist { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +func (o *CreateProjectResponseBody) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *CreateProjectResponseBody) GetPassiveConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.PassiveConnectConfigurationID +} + +func (o *CreateProjectResponseBody) GetPasswordProtection() *CreateProjectPasswordProtection { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *CreateProjectResponseBody) GetProductionDeploymentsFastLane() *bool { + if o == nil { + return nil + } + return o.ProductionDeploymentsFastLane +} + +func (o *CreateProjectResponseBody) GetPublicSource() *bool { + if o == nil { + return nil + } + return o.PublicSource +} + +func (o *CreateProjectResponseBody) GetResourceConfig() *CreateProjectResourceConfig { + if o == nil { + return nil + } + return o.ResourceConfig +} + +func (o *CreateProjectResponseBody) GetRootDirectory() *string { + if o == nil { + return nil + } + return o.RootDirectory +} + +func (o *CreateProjectResponseBody) GetServerlessFunctionRegion() *string { + if o == nil { + return nil + } + return o.ServerlessFunctionRegion +} + +func (o *CreateProjectResponseBody) GetServerlessFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.ServerlessFunctionZeroConfigFailover +} + +func (o *CreateProjectResponseBody) GetSkewProtectionBoundaryAt() *float64 { + if o == nil { + return nil + } + return o.SkewProtectionBoundaryAt +} + +func (o *CreateProjectResponseBody) GetSkewProtectionMaxAge() *float64 { + if o == nil { + return nil + } + return o.SkewProtectionMaxAge +} + +func (o *CreateProjectResponseBody) GetSkipGitConnectDuringLink() *bool { + if o == nil { + return nil + } + return o.SkipGitConnectDuringLink +} + +func (o *CreateProjectResponseBody) GetSourceFilesOutsideRootDirectory() *bool { + if o == nil { + return nil + } + return o.SourceFilesOutsideRootDirectory +} + +func (o *CreateProjectResponseBody) GetEnableAffectedProjectsDeployments() *bool { + if o == nil { + return nil + } + return o.EnableAffectedProjectsDeployments +} + +func (o *CreateProjectResponseBody) GetSsoProtection() *CreateProjectSsoProtection { + if o == nil { + return nil + } + return o.SsoProtection +} + +func (o *CreateProjectResponseBody) GetTargets() map[string]CreateProjectTargets { + if o == nil { + return nil + } + return o.Targets +} + +func (o *CreateProjectResponseBody) GetTransferCompletedAt() *float64 { + if o == nil { + return nil + } + return o.TransferCompletedAt +} + +func (o *CreateProjectResponseBody) GetTransferStartedAt() *float64 { + if o == nil { + return nil + } + return o.TransferStartedAt +} + +func (o *CreateProjectResponseBody) GetTransferToAccountID() *string { + if o == nil { + return nil + } + return o.TransferToAccountID +} + +func (o *CreateProjectResponseBody) GetTransferredFromAccountID() *string { + if o == nil { + return nil + } + return o.TransferredFromAccountID +} + +func (o *CreateProjectResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *CreateProjectResponseBody) GetLive() *bool { + if o == nil { + return nil + } + return o.Live +} + +func (o *CreateProjectResponseBody) GetEnablePreviewFeedback() *bool { + if o == nil { + return nil + } + return o.EnablePreviewFeedback +} + +func (o *CreateProjectResponseBody) GetEnableProductionFeedback() *bool { + if o == nil { + return nil + } + return o.EnableProductionFeedback +} + +func (o *CreateProjectResponseBody) GetPermissions() *CreateProjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *CreateProjectResponseBody) GetLastRollbackTarget() *CreateProjectLastRollbackTarget { + if o == nil { + return nil + } + return o.LastRollbackTarget +} + +func (o *CreateProjectResponseBody) GetLastAliasRequest() *CreateProjectLastAliasRequest { + if o == nil { + return nil + } + return o.LastAliasRequest +} + +func (o *CreateProjectResponseBody) GetHasFloatingAliases() *bool { + if o == nil { + return nil + } + return o.HasFloatingAliases +} + +func (o *CreateProjectResponseBody) GetProtectionBypass() map[string]CreateProjectProtectionBypass { + if o == nil { + return nil + } + return o.ProtectionBypass +} + +func (o *CreateProjectResponseBody) GetHasActiveBranches() *bool { + if o == nil { + return nil + } + return o.HasActiveBranches +} + +func (o *CreateProjectResponseBody) GetTrustedIps() *CreateProjectTrustedIps { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *CreateProjectResponseBody) GetGitComments() *CreateProjectGitComments { + if o == nil { + return nil + } + return o.GitComments +} + +func (o *CreateProjectResponseBody) GetPaused() *bool { + if o == nil { + return nil + } + return o.Paused +} + +func (o *CreateProjectResponseBody) GetConcurrencyBucketName() *string { + if o == nil { + return nil + } + return o.ConcurrencyBucketName +} + +func (o *CreateProjectResponseBody) GetWebAnalytics() *CreateProjectWebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *CreateProjectResponseBody) GetSecurity() *CreateProjectSecurity { + if o == nil { + return nil + } + return o.Security +} + +func (o *CreateProjectResponseBody) GetOidcTokenConfig() *CreateProjectOidcTokenConfig { + if o == nil { + return nil + } + return o.OidcTokenConfig +} + +func (o *CreateProjectResponseBody) GetTier() *CreateProjectTier { + if o == nil { + return nil + } + return o.Tier +} + +type CreateProjectResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The project was successfuly created + Object *CreateProjectResponseBody +} + +func (o *CreateProjectResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateProjectResponse) GetObject() *CreateProjectResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createprojectenv.go b/src/__tests__/mockserver/internal/sdk/models/operations/createprojectenv.go new file mode 100644 index 00000000..139c19a2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createprojectenv.go @@ -0,0 +1,3878 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// CreateProjectEnv2Type - The type of environment variable +type CreateProjectEnv2Type string + +const ( + CreateProjectEnv2TypeSystem CreateProjectEnv2Type = "system" + CreateProjectEnv2TypeSecret CreateProjectEnv2Type = "secret" + CreateProjectEnv2TypeEncrypted CreateProjectEnv2Type = "encrypted" + CreateProjectEnv2TypePlain CreateProjectEnv2Type = "plain" + CreateProjectEnv2TypeSensitive CreateProjectEnv2Type = "sensitive" +) + +func (e CreateProjectEnv2Type) ToPointer() *CreateProjectEnv2Type { + return &e +} +func (e *CreateProjectEnv2Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "secret": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + *e = CreateProjectEnv2Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnv2Type: %v", v) + } +} + +type CreateProjectEnv2Target string + +const ( + CreateProjectEnv2TargetProduction CreateProjectEnv2Target = "production" + CreateProjectEnv2TargetPreview CreateProjectEnv2Target = "preview" + CreateProjectEnv2TargetDevelopment CreateProjectEnv2Target = "development" +) + +func (e CreateProjectEnv2Target) ToPointer() *CreateProjectEnv2Target { + return &e +} +func (e *CreateProjectEnv2Target) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectEnv2Target(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnv2Target: %v", v) + } +} + +type Two2 struct { + // The name of the environment variable + Key string `json:"key"` + // The value of the environment variable + Value string `json:"value"` + // The type of environment variable + Type CreateProjectEnv2Type `json:"type"` + // The target environment of the environment variable + Target []CreateProjectEnv2Target `json:"target,omitempty"` + // If defined, the git branch of the environment variable (must have target=preview) + GitBranch *string `json:"gitBranch,omitempty"` + // A comment to add context on what this environment variable is for + Comment *string `json:"comment,omitempty"` +} + +func (o *Two2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *Two2) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Two2) GetType() CreateProjectEnv2Type { + if o == nil { + return CreateProjectEnv2Type("") + } + return o.Type +} + +func (o *Two2) GetTarget() []CreateProjectEnv2Target { + if o == nil { + return nil + } + return o.Target +} + +func (o *Two2) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *Two2) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// TwoType - The type of environment variable +type TwoType string + +const ( + TwoTypeSystem TwoType = "system" + TwoTypeSecret TwoType = "secret" + TwoTypeEncrypted TwoType = "encrypted" + TwoTypePlain TwoType = "plain" + TwoTypeSensitive TwoType = "sensitive" +) + +func (e TwoType) ToPointer() *TwoType { + return &e +} +func (e *TwoType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "secret": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + *e = TwoType(v) + return nil + default: + return fmt.Errorf("invalid value for TwoType: %v", v) + } +} + +type TwoTarget string + +const ( + TwoTargetProduction TwoTarget = "production" + TwoTargetPreview TwoTarget = "preview" + TwoTargetDevelopment TwoTarget = "development" +) + +func (e TwoTarget) ToPointer() *TwoTarget { + return &e +} +func (e *TwoTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = TwoTarget(v) + return nil + default: + return fmt.Errorf("invalid value for TwoTarget: %v", v) + } +} + +type Two1 struct { + // The name of the environment variable + Key string `json:"key"` + // The value of the environment variable + Value string `json:"value"` + // The type of environment variable + Type TwoType `json:"type"` + // The target environment of the environment variable + Target []TwoTarget `json:"target"` + // If defined, the git branch of the environment variable (must have target=preview) + GitBranch *string `json:"gitBranch,omitempty"` + // A comment to add context on what this environment variable is for + Comment *string `json:"comment,omitempty"` +} + +func (o *Two1) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *Two1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Two1) GetType() TwoType { + if o == nil { + return TwoType("") + } + return o.Type +} + +func (o *Two1) GetTarget() []TwoTarget { + if o == nil { + return []TwoTarget{} + } + return o.Target +} + +func (o *Two1) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *Two1) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +type CreateProjectEnvRequestBody2Type string + +const ( + CreateProjectEnvRequestBody2TypeTwo1 CreateProjectEnvRequestBody2Type = "2_1" + CreateProjectEnvRequestBody2TypeTwo2 CreateProjectEnvRequestBody2Type = "2_2" +) + +type CreateProjectEnvRequestBody2 struct { + Two1 *Two1 + Two2 *Two2 + + Type CreateProjectEnvRequestBody2Type +} + +func CreateCreateProjectEnvRequestBody2Two1(two1 Two1) CreateProjectEnvRequestBody2 { + typ := CreateProjectEnvRequestBody2TypeTwo1 + + return CreateProjectEnvRequestBody2{ + Two1: &two1, + Type: typ, + } +} + +func CreateCreateProjectEnvRequestBody2Two2(two2 Two2) CreateProjectEnvRequestBody2 { + typ := CreateProjectEnvRequestBody2TypeTwo2 + + return CreateProjectEnvRequestBody2{ + Two2: &two2, + Type: typ, + } +} + +func (u *CreateProjectEnvRequestBody2) UnmarshalJSON(data []byte) error { + + var two1 Two1 = Two1{} + if err := utils.UnmarshalJSON(data, &two1, "", true, true); err == nil { + u.Two1 = &two1 + u.Type = CreateProjectEnvRequestBody2TypeTwo1 + return nil + } + + var two2 Two2 = Two2{} + if err := utils.UnmarshalJSON(data, &two2, "", true, true); err == nil { + u.Two2 = &two2 + u.Type = CreateProjectEnvRequestBody2TypeTwo2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectEnvRequestBody2", string(data)) +} + +func (u CreateProjectEnvRequestBody2) MarshalJSON() ([]byte, error) { + if u.Two1 != nil { + return utils.MarshalJSON(u.Two1, "", true) + } + + if u.Two2 != nil { + return utils.MarshalJSON(u.Two2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectEnvRequestBody2: all fields are null") +} + +// CreateProjectEnv1Type - The type of environment variable +type CreateProjectEnv1Type string + +const ( + CreateProjectEnv1TypeSystem CreateProjectEnv1Type = "system" + CreateProjectEnv1TypeSecret CreateProjectEnv1Type = "secret" + CreateProjectEnv1TypeEncrypted CreateProjectEnv1Type = "encrypted" + CreateProjectEnv1TypePlain CreateProjectEnv1Type = "plain" + CreateProjectEnv1TypeSensitive CreateProjectEnv1Type = "sensitive" +) + +func (e CreateProjectEnv1Type) ToPointer() *CreateProjectEnv1Type { + return &e +} +func (e *CreateProjectEnv1Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "secret": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + *e = CreateProjectEnv1Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnv1Type: %v", v) + } +} + +type CreateProjectEnv1Target string + +const ( + CreateProjectEnv1TargetProduction CreateProjectEnv1Target = "production" + CreateProjectEnv1TargetPreview CreateProjectEnv1Target = "preview" + CreateProjectEnv1TargetDevelopment CreateProjectEnv1Target = "development" +) + +func (e CreateProjectEnv1Target) ToPointer() *CreateProjectEnv1Target { + return &e +} +func (e *CreateProjectEnv1Target) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectEnv1Target(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnv1Target: %v", v) + } +} + +type CreateProjectEnv12 struct { + // The name of the environment variable + Key string `json:"key"` + // The value of the environment variable + Value string `json:"value"` + // The type of environment variable + Type CreateProjectEnv1Type `json:"type"` + // The target environment of the environment variable + Target []CreateProjectEnv1Target `json:"target,omitempty"` + // If defined, the git branch of the environment variable (must have target=preview) + GitBranch *string `json:"gitBranch,omitempty"` + // A comment to add context on what this environment variable is for + Comment *string `json:"comment,omitempty"` +} + +func (o *CreateProjectEnv12) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *CreateProjectEnv12) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *CreateProjectEnv12) GetType() CreateProjectEnv1Type { + if o == nil { + return CreateProjectEnv1Type("") + } + return o.Type +} + +func (o *CreateProjectEnv12) GetTarget() []CreateProjectEnv1Target { + if o == nil { + return nil + } + return o.Target +} + +func (o *CreateProjectEnv12) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *CreateProjectEnv12) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// OneType - The type of environment variable +type OneType string + +const ( + OneTypeSystem OneType = "system" + OneTypeSecret OneType = "secret" + OneTypeEncrypted OneType = "encrypted" + OneTypePlain OneType = "plain" + OneTypeSensitive OneType = "sensitive" +) + +func (e OneType) ToPointer() *OneType { + return &e +} +func (e *OneType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "secret": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + *e = OneType(v) + return nil + default: + return fmt.Errorf("invalid value for OneType: %v", v) + } +} + +type OneTarget string + +const ( + OneTargetProduction OneTarget = "production" + OneTargetPreview OneTarget = "preview" + OneTargetDevelopment OneTarget = "development" +) + +func (e OneTarget) ToPointer() *OneTarget { + return &e +} +func (e *OneTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = OneTarget(v) + return nil + default: + return fmt.Errorf("invalid value for OneTarget: %v", v) + } +} + +type CreateProjectEnv11 struct { + // The name of the environment variable + Key string `json:"key"` + // The value of the environment variable + Value string `json:"value"` + // The type of environment variable + Type OneType `json:"type"` + // The target environment of the environment variable + Target []OneTarget `json:"target"` + // If defined, the git branch of the environment variable (must have target=preview) + GitBranch *string `json:"gitBranch,omitempty"` + // A comment to add context on what this environment variable is for + Comment *string `json:"comment,omitempty"` +} + +func (o *CreateProjectEnv11) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *CreateProjectEnv11) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *CreateProjectEnv11) GetType() OneType { + if o == nil { + return OneType("") + } + return o.Type +} + +func (o *CreateProjectEnv11) GetTarget() []OneTarget { + if o == nil { + return []OneTarget{} + } + return o.Target +} + +func (o *CreateProjectEnv11) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *CreateProjectEnv11) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +type CreateProjectEnvRequestBody1Type string + +const ( + CreateProjectEnvRequestBody1TypeCreateProjectEnv11 CreateProjectEnvRequestBody1Type = "createProjectEnv_1_1" + CreateProjectEnvRequestBody1TypeCreateProjectEnv12 CreateProjectEnvRequestBody1Type = "createProjectEnv_1_2" +) + +type CreateProjectEnvRequestBody1 struct { + CreateProjectEnv11 *CreateProjectEnv11 + CreateProjectEnv12 *CreateProjectEnv12 + + Type CreateProjectEnvRequestBody1Type +} + +func CreateCreateProjectEnvRequestBody1CreateProjectEnv11(createProjectEnv11 CreateProjectEnv11) CreateProjectEnvRequestBody1 { + typ := CreateProjectEnvRequestBody1TypeCreateProjectEnv11 + + return CreateProjectEnvRequestBody1{ + CreateProjectEnv11: &createProjectEnv11, + Type: typ, + } +} + +func CreateCreateProjectEnvRequestBody1CreateProjectEnv12(createProjectEnv12 CreateProjectEnv12) CreateProjectEnvRequestBody1 { + typ := CreateProjectEnvRequestBody1TypeCreateProjectEnv12 + + return CreateProjectEnvRequestBody1{ + CreateProjectEnv12: &createProjectEnv12, + Type: typ, + } +} + +func (u *CreateProjectEnvRequestBody1) UnmarshalJSON(data []byte) error { + + var createProjectEnv11 CreateProjectEnv11 = CreateProjectEnv11{} + if err := utils.UnmarshalJSON(data, &createProjectEnv11, "", true, true); err == nil { + u.CreateProjectEnv11 = &createProjectEnv11 + u.Type = CreateProjectEnvRequestBody1TypeCreateProjectEnv11 + return nil + } + + var createProjectEnv12 CreateProjectEnv12 = CreateProjectEnv12{} + if err := utils.UnmarshalJSON(data, &createProjectEnv12, "", true, true); err == nil { + u.CreateProjectEnv12 = &createProjectEnv12 + u.Type = CreateProjectEnvRequestBody1TypeCreateProjectEnv12 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectEnvRequestBody1", string(data)) +} + +func (u CreateProjectEnvRequestBody1) MarshalJSON() ([]byte, error) { + if u.CreateProjectEnv11 != nil { + return utils.MarshalJSON(u.CreateProjectEnv11, "", true) + } + + if u.CreateProjectEnv12 != nil { + return utils.MarshalJSON(u.CreateProjectEnv12, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectEnvRequestBody1: all fields are null") +} + +type CreateProjectEnvRequestBodyType string + +const ( + CreateProjectEnvRequestBodyTypeCreateProjectEnvRequestBody1 CreateProjectEnvRequestBodyType = "createProjectEnv_requestBody_1" + CreateProjectEnvRequestBodyTypeArrayOfCreateProjectEnvRequestBody2 CreateProjectEnvRequestBodyType = "arrayOfCreateProjectEnvRequestBody2" +) + +type CreateProjectEnvRequestBody struct { + CreateProjectEnvRequestBody1 *CreateProjectEnvRequestBody1 + ArrayOfCreateProjectEnvRequestBody2 []CreateProjectEnvRequestBody2 + + Type CreateProjectEnvRequestBodyType +} + +func CreateCreateProjectEnvRequestBodyCreateProjectEnvRequestBody1(createProjectEnvRequestBody1 CreateProjectEnvRequestBody1) CreateProjectEnvRequestBody { + typ := CreateProjectEnvRequestBodyTypeCreateProjectEnvRequestBody1 + + return CreateProjectEnvRequestBody{ + CreateProjectEnvRequestBody1: &createProjectEnvRequestBody1, + Type: typ, + } +} + +func CreateCreateProjectEnvRequestBodyArrayOfCreateProjectEnvRequestBody2(arrayOfCreateProjectEnvRequestBody2 []CreateProjectEnvRequestBody2) CreateProjectEnvRequestBody { + typ := CreateProjectEnvRequestBodyTypeArrayOfCreateProjectEnvRequestBody2 + + return CreateProjectEnvRequestBody{ + ArrayOfCreateProjectEnvRequestBody2: arrayOfCreateProjectEnvRequestBody2, + Type: typ, + } +} + +func (u *CreateProjectEnvRequestBody) UnmarshalJSON(data []byte) error { + + var createProjectEnvRequestBody1 CreateProjectEnvRequestBody1 = CreateProjectEnvRequestBody1{} + if err := utils.UnmarshalJSON(data, &createProjectEnvRequestBody1, "", true, true); err == nil { + u.CreateProjectEnvRequestBody1 = &createProjectEnvRequestBody1 + u.Type = CreateProjectEnvRequestBodyTypeCreateProjectEnvRequestBody1 + return nil + } + + var arrayOfCreateProjectEnvRequestBody2 []CreateProjectEnvRequestBody2 = []CreateProjectEnvRequestBody2{} + if err := utils.UnmarshalJSON(data, &arrayOfCreateProjectEnvRequestBody2, "", true, true); err == nil { + u.ArrayOfCreateProjectEnvRequestBody2 = arrayOfCreateProjectEnvRequestBody2 + u.Type = CreateProjectEnvRequestBodyTypeArrayOfCreateProjectEnvRequestBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectEnvRequestBody", string(data)) +} + +func (u CreateProjectEnvRequestBody) MarshalJSON() ([]byte, error) { + if u.CreateProjectEnvRequestBody1 != nil { + return utils.MarshalJSON(u.CreateProjectEnvRequestBody1, "", true) + } + + if u.ArrayOfCreateProjectEnvRequestBody2 != nil { + return utils.MarshalJSON(u.ArrayOfCreateProjectEnvRequestBody2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectEnvRequestBody: all fields are null") +} + +type CreateProjectEnvRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // Allow override of environment variable if it already exists + Upsert *string `queryParam:"style=form,explode=true,name=upsert"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateProjectEnvRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateProjectEnvRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *CreateProjectEnvRequest) GetUpsert() *string { + if o == nil { + return nil + } + return o.Upsert +} + +func (o *CreateProjectEnvRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateProjectEnvRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateProjectEnvRequest) GetRequestBody() CreateProjectEnvRequestBody { + if o == nil { + return CreateProjectEnvRequestBody{} + } + return o.RequestBody +} + +type CreateProjectEnvTargetProjects2 string + +const ( + CreateProjectEnvTargetProjects2Production CreateProjectEnvTargetProjects2 = "production" + CreateProjectEnvTargetProjects2Preview CreateProjectEnvTargetProjects2 = "preview" + CreateProjectEnvTargetProjects2Development CreateProjectEnvTargetProjects2 = "development" +) + +func (e CreateProjectEnvTargetProjects2) ToPointer() *CreateProjectEnvTargetProjects2 { + return &e +} +func (e *CreateProjectEnvTargetProjects2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectEnvTargetProjects2(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvTargetProjects2: %v", v) + } +} + +type CreateProjectEnvCreatedTargetType string + +const ( + CreateProjectEnvCreatedTargetTypeArrayOfStr CreateProjectEnvCreatedTargetType = "arrayOfStr" + CreateProjectEnvCreatedTargetTypeCreateProjectEnvTargetProjects2 CreateProjectEnvCreatedTargetType = "createProjectEnv_target_projects_2" +) + +type CreateProjectEnvCreatedTarget struct { + ArrayOfStr []string + CreateProjectEnvTargetProjects2 *CreateProjectEnvTargetProjects2 + + Type CreateProjectEnvCreatedTargetType +} + +func CreateCreateProjectEnvCreatedTargetArrayOfStr(arrayOfStr []string) CreateProjectEnvCreatedTarget { + typ := CreateProjectEnvCreatedTargetTypeArrayOfStr + + return CreateProjectEnvCreatedTarget{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedTargetCreateProjectEnvTargetProjects2(createProjectEnvTargetProjects2 CreateProjectEnvTargetProjects2) CreateProjectEnvCreatedTarget { + typ := CreateProjectEnvCreatedTargetTypeCreateProjectEnvTargetProjects2 + + return CreateProjectEnvCreatedTarget{ + CreateProjectEnvTargetProjects2: &createProjectEnvTargetProjects2, + Type: typ, + } +} + +func (u *CreateProjectEnvCreatedTarget) UnmarshalJSON(data []byte) error { + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = CreateProjectEnvCreatedTargetTypeArrayOfStr + return nil + } + + var createProjectEnvTargetProjects2 CreateProjectEnvTargetProjects2 = CreateProjectEnvTargetProjects2("") + if err := utils.UnmarshalJSON(data, &createProjectEnvTargetProjects2, "", true, true); err == nil { + u.CreateProjectEnvTargetProjects2 = &createProjectEnvTargetProjects2 + u.Type = CreateProjectEnvCreatedTargetTypeCreateProjectEnvTargetProjects2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectEnvCreatedTarget", string(data)) +} + +func (u CreateProjectEnvCreatedTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.CreateProjectEnvTargetProjects2 != nil { + return utils.MarshalJSON(u.CreateProjectEnvTargetProjects2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectEnvCreatedTarget: all fields are null") +} + +type CreateProjectEnvCreatedType string + +const ( + CreateProjectEnvCreatedTypeSystem CreateProjectEnvCreatedType = "system" + CreateProjectEnvCreatedTypeEncrypted CreateProjectEnvCreatedType = "encrypted" + CreateProjectEnvCreatedTypePlain CreateProjectEnvCreatedType = "plain" + CreateProjectEnvCreatedTypeSensitive CreateProjectEnvCreatedType = "sensitive" + CreateProjectEnvCreatedTypeSecret CreateProjectEnvCreatedType = "secret" +) + +func (e CreateProjectEnvCreatedType) ToPointer() *CreateProjectEnvCreatedType { + return &e +} +func (e *CreateProjectEnvCreatedType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = CreateProjectEnvCreatedType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvCreatedType: %v", v) + } +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215TypeFlagsConnectionString CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type = "flags-connection-string" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects15 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *CreateProjectEnvContentHintProjects15) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated215Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214TypeIntegrationStoreSecret CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type = "integration-store-secret" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects14 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *CreateProjectEnvContentHintProjects14) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated214Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *CreateProjectEnvContentHintProjects14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *CreateProjectEnvContentHintProjects14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *CreateProjectEnvContentHintProjects14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213TypePostgresURLNoSsl CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type = "postgres-url-no-ssl" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects13 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects13) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated213Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212TypePostgresDatabase CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type = "postgres-database" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects12 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects12) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated212Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211TypePostgresPassword CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type = "postgres-password" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects11 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects11) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated211Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210TypePostgresHost CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type = "postgres-host" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects10 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects10) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated210Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29TypePostgresUser CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type = "postgres-user" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects9 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects9) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated29Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28TypePostgresPrismaURL CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type = "postgres-prisma-url" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects8 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects8) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated28Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27TypePostgresURLNonPooling CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type = "postgres-url-non-pooling" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects7 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects7) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated27Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26TypePostgresURL CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type = "postgres-url" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects6 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects6) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated26Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25TypeBlobReadWriteToken CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type = "blob-read-write-token" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects5 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects5) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated25Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24TypeRedisRestAPIReadOnlyToken CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type = "redis-rest-api-read-only-token" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects4 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects4) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated24Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23TypeRedisRestAPIToken CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type = "redis-rest-api-token" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects3 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects3) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated23Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22TypeRedisRestAPIURL CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type = "redis-rest-api-url" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects2 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects2) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated22Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2TypeRedisURL CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type = "redis-url" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type: %v", v) + } +} + +type CreateProjectEnvContentHintProjects1 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHintProjects1) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated2Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHintProjects1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvCreatedContentHintType string + +const ( + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects1 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_1" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects2 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_2" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects3 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_3" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects4 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_4" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects5 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_5" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects6 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_6" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects7 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_7" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects8 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_8" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects9 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_9" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects10 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_10" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects11 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_11" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects12 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_12" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects13 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_13" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects14 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_14" + CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects15 CreateProjectEnvCreatedContentHintType = "createProjectEnv_contentHint_projects_15" +) + +type CreateProjectEnvCreatedContentHint struct { + CreateProjectEnvContentHintProjects1 *CreateProjectEnvContentHintProjects1 + CreateProjectEnvContentHintProjects2 *CreateProjectEnvContentHintProjects2 + CreateProjectEnvContentHintProjects3 *CreateProjectEnvContentHintProjects3 + CreateProjectEnvContentHintProjects4 *CreateProjectEnvContentHintProjects4 + CreateProjectEnvContentHintProjects5 *CreateProjectEnvContentHintProjects5 + CreateProjectEnvContentHintProjects6 *CreateProjectEnvContentHintProjects6 + CreateProjectEnvContentHintProjects7 *CreateProjectEnvContentHintProjects7 + CreateProjectEnvContentHintProjects8 *CreateProjectEnvContentHintProjects8 + CreateProjectEnvContentHintProjects9 *CreateProjectEnvContentHintProjects9 + CreateProjectEnvContentHintProjects10 *CreateProjectEnvContentHintProjects10 + CreateProjectEnvContentHintProjects11 *CreateProjectEnvContentHintProjects11 + CreateProjectEnvContentHintProjects12 *CreateProjectEnvContentHintProjects12 + CreateProjectEnvContentHintProjects13 *CreateProjectEnvContentHintProjects13 + CreateProjectEnvContentHintProjects14 *CreateProjectEnvContentHintProjects14 + CreateProjectEnvContentHintProjects15 *CreateProjectEnvContentHintProjects15 + + Type CreateProjectEnvCreatedContentHintType +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects1(createProjectEnvContentHintProjects1 CreateProjectEnvContentHintProjects1) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects1 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects1: &createProjectEnvContentHintProjects1, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects2(createProjectEnvContentHintProjects2 CreateProjectEnvContentHintProjects2) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects2 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects2: &createProjectEnvContentHintProjects2, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects3(createProjectEnvContentHintProjects3 CreateProjectEnvContentHintProjects3) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects3 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects3: &createProjectEnvContentHintProjects3, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects4(createProjectEnvContentHintProjects4 CreateProjectEnvContentHintProjects4) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects4 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects4: &createProjectEnvContentHintProjects4, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects5(createProjectEnvContentHintProjects5 CreateProjectEnvContentHintProjects5) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects5 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects5: &createProjectEnvContentHintProjects5, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects6(createProjectEnvContentHintProjects6 CreateProjectEnvContentHintProjects6) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects6 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects6: &createProjectEnvContentHintProjects6, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects7(createProjectEnvContentHintProjects7 CreateProjectEnvContentHintProjects7) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects7 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects7: &createProjectEnvContentHintProjects7, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects8(createProjectEnvContentHintProjects8 CreateProjectEnvContentHintProjects8) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects8 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects8: &createProjectEnvContentHintProjects8, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects9(createProjectEnvContentHintProjects9 CreateProjectEnvContentHintProjects9) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects9 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects9: &createProjectEnvContentHintProjects9, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects10(createProjectEnvContentHintProjects10 CreateProjectEnvContentHintProjects10) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects10 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects10: &createProjectEnvContentHintProjects10, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects11(createProjectEnvContentHintProjects11 CreateProjectEnvContentHintProjects11) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects11 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects11: &createProjectEnvContentHintProjects11, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects12(createProjectEnvContentHintProjects12 CreateProjectEnvContentHintProjects12) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects12 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects12: &createProjectEnvContentHintProjects12, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects13(createProjectEnvContentHintProjects13 CreateProjectEnvContentHintProjects13) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects13 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects13: &createProjectEnvContentHintProjects13, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects14(createProjectEnvContentHintProjects14 CreateProjectEnvContentHintProjects14) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects14 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects14: &createProjectEnvContentHintProjects14, + Type: typ, + } +} + +func CreateCreateProjectEnvCreatedContentHintCreateProjectEnvContentHintProjects15(createProjectEnvContentHintProjects15 CreateProjectEnvContentHintProjects15) CreateProjectEnvCreatedContentHint { + typ := CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects15 + + return CreateProjectEnvCreatedContentHint{ + CreateProjectEnvContentHintProjects15: &createProjectEnvContentHintProjects15, + Type: typ, + } +} + +func (u *CreateProjectEnvCreatedContentHint) UnmarshalJSON(data []byte) error { + + var createProjectEnvContentHintProjects7 CreateProjectEnvContentHintProjects7 = CreateProjectEnvContentHintProjects7{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects7, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects7 = &createProjectEnvContentHintProjects7 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects7 + return nil + } + + var createProjectEnvContentHintProjects9 CreateProjectEnvContentHintProjects9 = CreateProjectEnvContentHintProjects9{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects9, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects9 = &createProjectEnvContentHintProjects9 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects9 + return nil + } + + var createProjectEnvContentHintProjects3 CreateProjectEnvContentHintProjects3 = CreateProjectEnvContentHintProjects3{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects3, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects3 = &createProjectEnvContentHintProjects3 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects3 + return nil + } + + var createProjectEnvContentHintProjects4 CreateProjectEnvContentHintProjects4 = CreateProjectEnvContentHintProjects4{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects4, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects4 = &createProjectEnvContentHintProjects4 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects4 + return nil + } + + var createProjectEnvContentHintProjects5 CreateProjectEnvContentHintProjects5 = CreateProjectEnvContentHintProjects5{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects5, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects5 = &createProjectEnvContentHintProjects5 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects5 + return nil + } + + var createProjectEnvContentHintProjects6 CreateProjectEnvContentHintProjects6 = CreateProjectEnvContentHintProjects6{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects6, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects6 = &createProjectEnvContentHintProjects6 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects6 + return nil + } + + var createProjectEnvContentHintProjects2 CreateProjectEnvContentHintProjects2 = CreateProjectEnvContentHintProjects2{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects2, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects2 = &createProjectEnvContentHintProjects2 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects2 + return nil + } + + var createProjectEnvContentHintProjects8 CreateProjectEnvContentHintProjects8 = CreateProjectEnvContentHintProjects8{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects8, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects8 = &createProjectEnvContentHintProjects8 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects8 + return nil + } + + var createProjectEnvContentHintProjects1 CreateProjectEnvContentHintProjects1 = CreateProjectEnvContentHintProjects1{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects1, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects1 = &createProjectEnvContentHintProjects1 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects1 + return nil + } + + var createProjectEnvContentHintProjects10 CreateProjectEnvContentHintProjects10 = CreateProjectEnvContentHintProjects10{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects10, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects10 = &createProjectEnvContentHintProjects10 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects10 + return nil + } + + var createProjectEnvContentHintProjects11 CreateProjectEnvContentHintProjects11 = CreateProjectEnvContentHintProjects11{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects11, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects11 = &createProjectEnvContentHintProjects11 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects11 + return nil + } + + var createProjectEnvContentHintProjects12 CreateProjectEnvContentHintProjects12 = CreateProjectEnvContentHintProjects12{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects12, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects12 = &createProjectEnvContentHintProjects12 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects12 + return nil + } + + var createProjectEnvContentHintProjects13 CreateProjectEnvContentHintProjects13 = CreateProjectEnvContentHintProjects13{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects13, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects13 = &createProjectEnvContentHintProjects13 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects13 + return nil + } + + var createProjectEnvContentHintProjects15 CreateProjectEnvContentHintProjects15 = CreateProjectEnvContentHintProjects15{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects15, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects15 = &createProjectEnvContentHintProjects15 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects15 + return nil + } + + var createProjectEnvContentHintProjects14 CreateProjectEnvContentHintProjects14 = CreateProjectEnvContentHintProjects14{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHintProjects14, "", true, true); err == nil { + u.CreateProjectEnvContentHintProjects14 = &createProjectEnvContentHintProjects14 + u.Type = CreateProjectEnvCreatedContentHintTypeCreateProjectEnvContentHintProjects14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectEnvCreatedContentHint", string(data)) +} + +func (u CreateProjectEnvCreatedContentHint) MarshalJSON() ([]byte, error) { + if u.CreateProjectEnvContentHintProjects1 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects1, "", true) + } + + if u.CreateProjectEnvContentHintProjects2 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects2, "", true) + } + + if u.CreateProjectEnvContentHintProjects3 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects3, "", true) + } + + if u.CreateProjectEnvContentHintProjects4 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects4, "", true) + } + + if u.CreateProjectEnvContentHintProjects5 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects5, "", true) + } + + if u.CreateProjectEnvContentHintProjects6 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects6, "", true) + } + + if u.CreateProjectEnvContentHintProjects7 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects7, "", true) + } + + if u.CreateProjectEnvContentHintProjects8 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects8, "", true) + } + + if u.CreateProjectEnvContentHintProjects9 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects9, "", true) + } + + if u.CreateProjectEnvContentHintProjects10 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects10, "", true) + } + + if u.CreateProjectEnvContentHintProjects11 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects11, "", true) + } + + if u.CreateProjectEnvContentHintProjects12 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects12, "", true) + } + + if u.CreateProjectEnvContentHintProjects13 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects13, "", true) + } + + if u.CreateProjectEnvContentHintProjects14 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects14, "", true) + } + + if u.CreateProjectEnvContentHintProjects15 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHintProjects15, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectEnvCreatedContentHint: all fields are null") +} + +type CreateProjectEnvCreatedProjectsResponseType string + +const ( + CreateProjectEnvCreatedProjectsResponseTypeFlagsSecret CreateProjectEnvCreatedProjectsResponseType = "flags-secret" +) + +func (e CreateProjectEnvCreatedProjectsResponseType) ToPointer() *CreateProjectEnvCreatedProjectsResponseType { + return &e +} +func (e *CreateProjectEnvCreatedProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = CreateProjectEnvCreatedProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvCreatedProjectsResponseType: %v", v) + } +} + +// CreateProjectEnvCreatedInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type CreateProjectEnvCreatedInternalContentHint struct { + Type CreateProjectEnvCreatedProjectsResponseType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *CreateProjectEnvCreatedInternalContentHint) GetType() CreateProjectEnvCreatedProjectsResponseType { + if o == nil { + return CreateProjectEnvCreatedProjectsResponseType("") + } + return o.Type +} + +func (o *CreateProjectEnvCreatedInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type Created2 struct { + Target *CreateProjectEnvCreatedTarget `json:"target,omitempty"` + Type *CreateProjectEnvCreatedType `json:"type,omitempty"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key *string `json:"key,omitempty"` + Value *string `json:"value,omitempty"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *CreateProjectEnvCreatedContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *CreateProjectEnvCreatedInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` + System *bool `json:"system,omitempty"` +} + +func (o *Created2) GetTarget() *CreateProjectEnvCreatedTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *Created2) GetType() *CreateProjectEnvCreatedType { + if o == nil { + return nil + } + return o.Type +} + +func (o *Created2) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *Created2) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Created2) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *Created2) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *Created2) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *Created2) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Created2) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Created2) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *Created2) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Created2) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *Created2) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *Created2) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *Created2) GetContentHint() *CreateProjectEnvCreatedContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *Created2) GetInternalContentHint() *CreateProjectEnvCreatedInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *Created2) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *Created2) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *Created2) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *Created2) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +func (o *Created2) GetSystem() *bool { + if o == nil { + return nil + } + return o.System +} + +type CreateProjectEnvTarget2 string + +const ( + CreateProjectEnvTarget2Production CreateProjectEnvTarget2 = "production" + CreateProjectEnvTarget2Preview CreateProjectEnvTarget2 = "preview" + CreateProjectEnvTarget2Development CreateProjectEnvTarget2 = "development" +) + +func (e CreateProjectEnvTarget2) ToPointer() *CreateProjectEnvTarget2 { + return &e +} +func (e *CreateProjectEnvTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectEnvTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvTarget2: %v", v) + } +} + +type CreateProjectEnvTarget1 string + +const ( + CreateProjectEnvTarget1Production CreateProjectEnvTarget1 = "production" + CreateProjectEnvTarget1Preview CreateProjectEnvTarget1 = "preview" + CreateProjectEnvTarget1Development CreateProjectEnvTarget1 = "development" +) + +func (e CreateProjectEnvTarget1) ToPointer() *CreateProjectEnvTarget1 { + return &e +} +func (e *CreateProjectEnvTarget1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectEnvTarget1(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvTarget1: %v", v) + } +} + +type CreatedTargetType string + +const ( + CreatedTargetTypeArrayOfCreateProjectEnvTarget1 CreatedTargetType = "arrayOfCreateProjectEnvTarget1" + CreatedTargetTypeCreateProjectEnvTarget2 CreatedTargetType = "createProjectEnv_target_2" +) + +type CreatedTarget struct { + ArrayOfCreateProjectEnvTarget1 []CreateProjectEnvTarget1 + CreateProjectEnvTarget2 *CreateProjectEnvTarget2 + + Type CreatedTargetType +} + +func CreateCreatedTargetArrayOfCreateProjectEnvTarget1(arrayOfCreateProjectEnvTarget1 []CreateProjectEnvTarget1) CreatedTarget { + typ := CreatedTargetTypeArrayOfCreateProjectEnvTarget1 + + return CreatedTarget{ + ArrayOfCreateProjectEnvTarget1: arrayOfCreateProjectEnvTarget1, + Type: typ, + } +} + +func CreateCreatedTargetCreateProjectEnvTarget2(createProjectEnvTarget2 CreateProjectEnvTarget2) CreatedTarget { + typ := CreatedTargetTypeCreateProjectEnvTarget2 + + return CreatedTarget{ + CreateProjectEnvTarget2: &createProjectEnvTarget2, + Type: typ, + } +} + +func (u *CreatedTarget) UnmarshalJSON(data []byte) error { + + var arrayOfCreateProjectEnvTarget1 []CreateProjectEnvTarget1 = []CreateProjectEnvTarget1{} + if err := utils.UnmarshalJSON(data, &arrayOfCreateProjectEnvTarget1, "", true, true); err == nil { + u.ArrayOfCreateProjectEnvTarget1 = arrayOfCreateProjectEnvTarget1 + u.Type = CreatedTargetTypeArrayOfCreateProjectEnvTarget1 + return nil + } + + var createProjectEnvTarget2 CreateProjectEnvTarget2 = CreateProjectEnvTarget2("") + if err := utils.UnmarshalJSON(data, &createProjectEnvTarget2, "", true, true); err == nil { + u.CreateProjectEnvTarget2 = &createProjectEnvTarget2 + u.Type = CreatedTargetTypeCreateProjectEnvTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreatedTarget", string(data)) +} + +func (u CreatedTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfCreateProjectEnvTarget1 != nil { + return utils.MarshalJSON(u.ArrayOfCreateProjectEnvTarget1, "", true) + } + + if u.CreateProjectEnvTarget2 != nil { + return utils.MarshalJSON(u.CreateProjectEnvTarget2, "", true) + } + + return nil, errors.New("could not marshal union type CreatedTarget: all fields are null") +} + +type CreatedType string + +const ( + CreatedTypeSystem CreatedType = "system" + CreatedTypeEncrypted CreatedType = "encrypted" + CreatedTypePlain CreatedType = "plain" + CreatedTypeSensitive CreatedType = "sensitive" + CreatedTypeSecret CreatedType = "secret" +) + +func (e CreatedType) ToPointer() *CreatedType { + return &e +} +func (e *CreatedType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = CreatedType(v) + return nil + default: + return fmt.Errorf("invalid value for CreatedType: %v", v) + } +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115TypeFlagsConnectionString CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type = "flags-connection-string" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type: %v", v) + } +} + +type CreateProjectEnvContentHint15 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *CreateProjectEnvContentHint15) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated115Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114TypeIntegrationStoreSecret CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type = "integration-store-secret" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type: %v", v) + } +} + +type CreateProjectEnvContentHint14 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *CreateProjectEnvContentHint14) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated114Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *CreateProjectEnvContentHint14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *CreateProjectEnvContentHint14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *CreateProjectEnvContentHint14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113TypePostgresURLNoSsl CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type = "postgres-url-no-ssl" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type: %v", v) + } +} + +type CreateProjectEnvContentHint13 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint13) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated113Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112TypePostgresDatabase CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type = "postgres-database" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type: %v", v) + } +} + +type CreateProjectEnvContentHint12 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint12) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated112Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111TypePostgresPassword CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type = "postgres-password" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type: %v", v) + } +} + +type CreateProjectEnvContentHint11 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint11) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated111Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110TypePostgresHost CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type = "postgres-host" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type: %v", v) + } +} + +type CreateProjectEnvContentHint10 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint10) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated110Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19TypePostgresUser CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type = "postgres-user" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type: %v", v) + } +} + +type CreateProjectEnvContentHint9 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint9) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated19Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1TypePostgresPrismaURL CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type = "postgres-prisma-url" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type: %v", v) + } +} + +type CreateProjectEnvContentHint8 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint8) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreated1Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedTypePostgresURLNonPooling CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType = "postgres-url-non-pooling" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType: %v", v) + } +} + +type CreateProjectEnvContentHint7 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint7) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyCreatedType("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyTypePostgresURL CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType = "postgres-url" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType: %v", v) + } +} + +type CreateProjectEnvContentHint6 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint6) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType string + +const ( + CreateProjectEnvContentHintProjectsResponse201ApplicationJSONTypeBlobReadWriteToken CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType = "blob-read-write-token" +) + +func (e CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType) ToPointer() *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType: %v", v) + } +} + +type CreateProjectEnvContentHint5 struct { + Type CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint5) GetType() CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201ApplicationJSONType("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponse201Type string + +const ( + CreateProjectEnvContentHintProjectsResponse201TypeRedisRestAPIReadOnlyToken CreateProjectEnvContentHintProjectsResponse201Type = "redis-rest-api-read-only-token" +) + +func (e CreateProjectEnvContentHintProjectsResponse201Type) ToPointer() *CreateProjectEnvContentHintProjectsResponse201Type { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponse201Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = CreateProjectEnvContentHintProjectsResponse201Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponse201Type: %v", v) + } +} + +type CreateProjectEnvContentHint4 struct { + Type CreateProjectEnvContentHintProjectsResponse201Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint4) GetType() CreateProjectEnvContentHintProjectsResponse201Type { + if o == nil { + return CreateProjectEnvContentHintProjectsResponse201Type("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsResponseType string + +const ( + CreateProjectEnvContentHintProjectsResponseTypeRedisRestAPIToken CreateProjectEnvContentHintProjectsResponseType = "redis-rest-api-token" +) + +func (e CreateProjectEnvContentHintProjectsResponseType) ToPointer() *CreateProjectEnvContentHintProjectsResponseType { + return &e +} +func (e *CreateProjectEnvContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = CreateProjectEnvContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsResponseType: %v", v) + } +} + +type CreateProjectEnvContentHint3 struct { + Type CreateProjectEnvContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint3) GetType() CreateProjectEnvContentHintProjectsResponseType { + if o == nil { + return CreateProjectEnvContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintProjectsType string + +const ( + CreateProjectEnvContentHintProjectsTypeRedisRestAPIURL CreateProjectEnvContentHintProjectsType = "redis-rest-api-url" +) + +func (e CreateProjectEnvContentHintProjectsType) ToPointer() *CreateProjectEnvContentHintProjectsType { + return &e +} +func (e *CreateProjectEnvContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = CreateProjectEnvContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintProjectsType: %v", v) + } +} + +type CreateProjectEnvContentHint2 struct { + Type CreateProjectEnvContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint2) GetType() CreateProjectEnvContentHintProjectsType { + if o == nil { + return CreateProjectEnvContentHintProjectsType("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreateProjectEnvContentHintType string + +const ( + CreateProjectEnvContentHintTypeRedisURL CreateProjectEnvContentHintType = "redis-url" +) + +func (e CreateProjectEnvContentHintType) ToPointer() *CreateProjectEnvContentHintType { + return &e +} +func (e *CreateProjectEnvContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = CreateProjectEnvContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvContentHintType: %v", v) + } +} + +type CreateProjectEnvContentHint1 struct { + Type CreateProjectEnvContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *CreateProjectEnvContentHint1) GetType() CreateProjectEnvContentHintType { + if o == nil { + return CreateProjectEnvContentHintType("") + } + return o.Type +} + +func (o *CreateProjectEnvContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type CreatedContentHintType string + +const ( + CreatedContentHintTypeCreateProjectEnvContentHint1 CreatedContentHintType = "createProjectEnv_contentHint_1" + CreatedContentHintTypeCreateProjectEnvContentHint2 CreatedContentHintType = "createProjectEnv_contentHint_2" + CreatedContentHintTypeCreateProjectEnvContentHint3 CreatedContentHintType = "createProjectEnv_contentHint_3" + CreatedContentHintTypeCreateProjectEnvContentHint4 CreatedContentHintType = "createProjectEnv_contentHint_4" + CreatedContentHintTypeCreateProjectEnvContentHint5 CreatedContentHintType = "createProjectEnv_contentHint_5" + CreatedContentHintTypeCreateProjectEnvContentHint6 CreatedContentHintType = "createProjectEnv_contentHint_6" + CreatedContentHintTypeCreateProjectEnvContentHint7 CreatedContentHintType = "createProjectEnv_contentHint_7" + CreatedContentHintTypeCreateProjectEnvContentHint8 CreatedContentHintType = "createProjectEnv_contentHint_8" + CreatedContentHintTypeCreateProjectEnvContentHint9 CreatedContentHintType = "createProjectEnv_contentHint_9" + CreatedContentHintTypeCreateProjectEnvContentHint10 CreatedContentHintType = "createProjectEnv_contentHint_10" + CreatedContentHintTypeCreateProjectEnvContentHint11 CreatedContentHintType = "createProjectEnv_contentHint_11" + CreatedContentHintTypeCreateProjectEnvContentHint12 CreatedContentHintType = "createProjectEnv_contentHint_12" + CreatedContentHintTypeCreateProjectEnvContentHint13 CreatedContentHintType = "createProjectEnv_contentHint_13" + CreatedContentHintTypeCreateProjectEnvContentHint14 CreatedContentHintType = "createProjectEnv_contentHint_14" + CreatedContentHintTypeCreateProjectEnvContentHint15 CreatedContentHintType = "createProjectEnv_contentHint_15" +) + +type CreatedContentHint struct { + CreateProjectEnvContentHint1 *CreateProjectEnvContentHint1 + CreateProjectEnvContentHint2 *CreateProjectEnvContentHint2 + CreateProjectEnvContentHint3 *CreateProjectEnvContentHint3 + CreateProjectEnvContentHint4 *CreateProjectEnvContentHint4 + CreateProjectEnvContentHint5 *CreateProjectEnvContentHint5 + CreateProjectEnvContentHint6 *CreateProjectEnvContentHint6 + CreateProjectEnvContentHint7 *CreateProjectEnvContentHint7 + CreateProjectEnvContentHint8 *CreateProjectEnvContentHint8 + CreateProjectEnvContentHint9 *CreateProjectEnvContentHint9 + CreateProjectEnvContentHint10 *CreateProjectEnvContentHint10 + CreateProjectEnvContentHint11 *CreateProjectEnvContentHint11 + CreateProjectEnvContentHint12 *CreateProjectEnvContentHint12 + CreateProjectEnvContentHint13 *CreateProjectEnvContentHint13 + CreateProjectEnvContentHint14 *CreateProjectEnvContentHint14 + CreateProjectEnvContentHint15 *CreateProjectEnvContentHint15 + + Type CreatedContentHintType +} + +func CreateCreatedContentHintCreateProjectEnvContentHint1(createProjectEnvContentHint1 CreateProjectEnvContentHint1) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint1 + + return CreatedContentHint{ + CreateProjectEnvContentHint1: &createProjectEnvContentHint1, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint2(createProjectEnvContentHint2 CreateProjectEnvContentHint2) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint2 + + return CreatedContentHint{ + CreateProjectEnvContentHint2: &createProjectEnvContentHint2, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint3(createProjectEnvContentHint3 CreateProjectEnvContentHint3) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint3 + + return CreatedContentHint{ + CreateProjectEnvContentHint3: &createProjectEnvContentHint3, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint4(createProjectEnvContentHint4 CreateProjectEnvContentHint4) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint4 + + return CreatedContentHint{ + CreateProjectEnvContentHint4: &createProjectEnvContentHint4, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint5(createProjectEnvContentHint5 CreateProjectEnvContentHint5) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint5 + + return CreatedContentHint{ + CreateProjectEnvContentHint5: &createProjectEnvContentHint5, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint6(createProjectEnvContentHint6 CreateProjectEnvContentHint6) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint6 + + return CreatedContentHint{ + CreateProjectEnvContentHint6: &createProjectEnvContentHint6, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint7(createProjectEnvContentHint7 CreateProjectEnvContentHint7) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint7 + + return CreatedContentHint{ + CreateProjectEnvContentHint7: &createProjectEnvContentHint7, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint8(createProjectEnvContentHint8 CreateProjectEnvContentHint8) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint8 + + return CreatedContentHint{ + CreateProjectEnvContentHint8: &createProjectEnvContentHint8, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint9(createProjectEnvContentHint9 CreateProjectEnvContentHint9) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint9 + + return CreatedContentHint{ + CreateProjectEnvContentHint9: &createProjectEnvContentHint9, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint10(createProjectEnvContentHint10 CreateProjectEnvContentHint10) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint10 + + return CreatedContentHint{ + CreateProjectEnvContentHint10: &createProjectEnvContentHint10, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint11(createProjectEnvContentHint11 CreateProjectEnvContentHint11) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint11 + + return CreatedContentHint{ + CreateProjectEnvContentHint11: &createProjectEnvContentHint11, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint12(createProjectEnvContentHint12 CreateProjectEnvContentHint12) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint12 + + return CreatedContentHint{ + CreateProjectEnvContentHint12: &createProjectEnvContentHint12, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint13(createProjectEnvContentHint13 CreateProjectEnvContentHint13) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint13 + + return CreatedContentHint{ + CreateProjectEnvContentHint13: &createProjectEnvContentHint13, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint14(createProjectEnvContentHint14 CreateProjectEnvContentHint14) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint14 + + return CreatedContentHint{ + CreateProjectEnvContentHint14: &createProjectEnvContentHint14, + Type: typ, + } +} + +func CreateCreatedContentHintCreateProjectEnvContentHint15(createProjectEnvContentHint15 CreateProjectEnvContentHint15) CreatedContentHint { + typ := CreatedContentHintTypeCreateProjectEnvContentHint15 + + return CreatedContentHint{ + CreateProjectEnvContentHint15: &createProjectEnvContentHint15, + Type: typ, + } +} + +func (u *CreatedContentHint) UnmarshalJSON(data []byte) error { + + var createProjectEnvContentHint7 CreateProjectEnvContentHint7 = CreateProjectEnvContentHint7{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint7, "", true, true); err == nil { + u.CreateProjectEnvContentHint7 = &createProjectEnvContentHint7 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint7 + return nil + } + + var createProjectEnvContentHint9 CreateProjectEnvContentHint9 = CreateProjectEnvContentHint9{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint9, "", true, true); err == nil { + u.CreateProjectEnvContentHint9 = &createProjectEnvContentHint9 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint9 + return nil + } + + var createProjectEnvContentHint3 CreateProjectEnvContentHint3 = CreateProjectEnvContentHint3{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint3, "", true, true); err == nil { + u.CreateProjectEnvContentHint3 = &createProjectEnvContentHint3 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint3 + return nil + } + + var createProjectEnvContentHint4 CreateProjectEnvContentHint4 = CreateProjectEnvContentHint4{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint4, "", true, true); err == nil { + u.CreateProjectEnvContentHint4 = &createProjectEnvContentHint4 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint4 + return nil + } + + var createProjectEnvContentHint5 CreateProjectEnvContentHint5 = CreateProjectEnvContentHint5{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint5, "", true, true); err == nil { + u.CreateProjectEnvContentHint5 = &createProjectEnvContentHint5 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint5 + return nil + } + + var createProjectEnvContentHint6 CreateProjectEnvContentHint6 = CreateProjectEnvContentHint6{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint6, "", true, true); err == nil { + u.CreateProjectEnvContentHint6 = &createProjectEnvContentHint6 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint6 + return nil + } + + var createProjectEnvContentHint2 CreateProjectEnvContentHint2 = CreateProjectEnvContentHint2{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint2, "", true, true); err == nil { + u.CreateProjectEnvContentHint2 = &createProjectEnvContentHint2 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint2 + return nil + } + + var createProjectEnvContentHint8 CreateProjectEnvContentHint8 = CreateProjectEnvContentHint8{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint8, "", true, true); err == nil { + u.CreateProjectEnvContentHint8 = &createProjectEnvContentHint8 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint8 + return nil + } + + var createProjectEnvContentHint1 CreateProjectEnvContentHint1 = CreateProjectEnvContentHint1{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint1, "", true, true); err == nil { + u.CreateProjectEnvContentHint1 = &createProjectEnvContentHint1 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint1 + return nil + } + + var createProjectEnvContentHint10 CreateProjectEnvContentHint10 = CreateProjectEnvContentHint10{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint10, "", true, true); err == nil { + u.CreateProjectEnvContentHint10 = &createProjectEnvContentHint10 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint10 + return nil + } + + var createProjectEnvContentHint11 CreateProjectEnvContentHint11 = CreateProjectEnvContentHint11{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint11, "", true, true); err == nil { + u.CreateProjectEnvContentHint11 = &createProjectEnvContentHint11 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint11 + return nil + } + + var createProjectEnvContentHint12 CreateProjectEnvContentHint12 = CreateProjectEnvContentHint12{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint12, "", true, true); err == nil { + u.CreateProjectEnvContentHint12 = &createProjectEnvContentHint12 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint12 + return nil + } + + var createProjectEnvContentHint13 CreateProjectEnvContentHint13 = CreateProjectEnvContentHint13{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint13, "", true, true); err == nil { + u.CreateProjectEnvContentHint13 = &createProjectEnvContentHint13 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint13 + return nil + } + + var createProjectEnvContentHint15 CreateProjectEnvContentHint15 = CreateProjectEnvContentHint15{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint15, "", true, true); err == nil { + u.CreateProjectEnvContentHint15 = &createProjectEnvContentHint15 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint15 + return nil + } + + var createProjectEnvContentHint14 CreateProjectEnvContentHint14 = CreateProjectEnvContentHint14{} + if err := utils.UnmarshalJSON(data, &createProjectEnvContentHint14, "", true, true); err == nil { + u.CreateProjectEnvContentHint14 = &createProjectEnvContentHint14 + u.Type = CreatedContentHintTypeCreateProjectEnvContentHint14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreatedContentHint", string(data)) +} + +func (u CreatedContentHint) MarshalJSON() ([]byte, error) { + if u.CreateProjectEnvContentHint1 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint1, "", true) + } + + if u.CreateProjectEnvContentHint2 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint2, "", true) + } + + if u.CreateProjectEnvContentHint3 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint3, "", true) + } + + if u.CreateProjectEnvContentHint4 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint4, "", true) + } + + if u.CreateProjectEnvContentHint5 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint5, "", true) + } + + if u.CreateProjectEnvContentHint6 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint6, "", true) + } + + if u.CreateProjectEnvContentHint7 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint7, "", true) + } + + if u.CreateProjectEnvContentHint8 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint8, "", true) + } + + if u.CreateProjectEnvContentHint9 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint9, "", true) + } + + if u.CreateProjectEnvContentHint10 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint10, "", true) + } + + if u.CreateProjectEnvContentHint11 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint11, "", true) + } + + if u.CreateProjectEnvContentHint12 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint12, "", true) + } + + if u.CreateProjectEnvContentHint13 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint13, "", true) + } + + if u.CreateProjectEnvContentHint14 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint14, "", true) + } + + if u.CreateProjectEnvContentHint15 != nil { + return utils.MarshalJSON(u.CreateProjectEnvContentHint15, "", true) + } + + return nil, errors.New("could not marshal union type CreatedContentHint: all fields are null") +} + +type CreateProjectEnvCreatedProjectsType string + +const ( + CreateProjectEnvCreatedProjectsTypeFlagsSecret CreateProjectEnvCreatedProjectsType = "flags-secret" +) + +func (e CreateProjectEnvCreatedProjectsType) ToPointer() *CreateProjectEnvCreatedProjectsType { + return &e +} +func (e *CreateProjectEnvCreatedProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = CreateProjectEnvCreatedProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvCreatedProjectsType: %v", v) + } +} + +// CreatedInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type CreatedInternalContentHint struct { + Type CreateProjectEnvCreatedProjectsType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *CreatedInternalContentHint) GetType() CreateProjectEnvCreatedProjectsType { + if o == nil { + return CreateProjectEnvCreatedProjectsType("") + } + return o.Type +} + +func (o *CreatedInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type Created1 struct { + Target *CreatedTarget `json:"target,omitempty"` + Type *CreatedType `json:"type,omitempty"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key *string `json:"key,omitempty"` + Value *string `json:"value,omitempty"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *CreatedContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *CreatedInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` + System *bool `json:"system,omitempty"` +} + +func (o *Created1) GetTarget() *CreatedTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *Created1) GetType() *CreatedType { + if o == nil { + return nil + } + return o.Type +} + +func (o *Created1) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *Created1) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Created1) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *Created1) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *Created1) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *Created1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Created1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Created1) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *Created1) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Created1) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *Created1) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *Created1) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *Created1) GetContentHint() *CreatedContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *Created1) GetInternalContentHint() *CreatedInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *Created1) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *Created1) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *Created1) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *Created1) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +func (o *Created1) GetSystem() *bool { + if o == nil { + return nil + } + return o.System +} + +type CreatedUnionType string + +const ( + CreatedUnionTypeCreated1 CreatedUnionType = "created_1" + CreatedUnionTypeArrayOfCreated2 CreatedUnionType = "arrayOfCreated2" +) + +type Created struct { + Created1 *Created1 + ArrayOfCreated2 []Created2 + + Type CreatedUnionType +} + +func CreateCreatedCreated1(created1 Created1) Created { + typ := CreatedUnionTypeCreated1 + + return Created{ + Created1: &created1, + Type: typ, + } +} + +func CreateCreatedArrayOfCreated2(arrayOfCreated2 []Created2) Created { + typ := CreatedUnionTypeArrayOfCreated2 + + return Created{ + ArrayOfCreated2: arrayOfCreated2, + Type: typ, + } +} + +func (u *Created) UnmarshalJSON(data []byte) error { + + var created1 Created1 = Created1{} + if err := utils.UnmarshalJSON(data, &created1, "", true, true); err == nil { + u.Created1 = &created1 + u.Type = CreatedUnionTypeCreated1 + return nil + } + + var arrayOfCreated2 []Created2 = []Created2{} + if err := utils.UnmarshalJSON(data, &arrayOfCreated2, "", true, true); err == nil { + u.ArrayOfCreated2 = arrayOfCreated2 + u.Type = CreatedUnionTypeArrayOfCreated2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Created", string(data)) +} + +func (u Created) MarshalJSON() ([]byte, error) { + if u.Created1 != nil { + return utils.MarshalJSON(u.Created1, "", true) + } + + if u.ArrayOfCreated2 != nil { + return utils.MarshalJSON(u.ArrayOfCreated2, "", true) + } + + return nil, errors.New("could not marshal union type Created: all fields are null") +} + +type CreateProjectEnvValue2 string + +const ( + CreateProjectEnvValue2Production CreateProjectEnvValue2 = "production" + CreateProjectEnvValue2Preview CreateProjectEnvValue2 = "preview" + CreateProjectEnvValue2Development CreateProjectEnvValue2 = "development" +) + +func (e CreateProjectEnvValue2) ToPointer() *CreateProjectEnvValue2 { + return &e +} +func (e *CreateProjectEnvValue2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectEnvValue2(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvValue2: %v", v) + } +} + +type CreateProjectEnvValueType string + +const ( + CreateProjectEnvValueTypeStr CreateProjectEnvValueType = "str" + CreateProjectEnvValueTypeArrayOfCreateProjectEnvValue2 CreateProjectEnvValueType = "arrayOfCreateProjectEnvValue2" +) + +type CreateProjectEnvValue struct { + Str *string + ArrayOfCreateProjectEnvValue2 []CreateProjectEnvValue2 + + Type CreateProjectEnvValueType +} + +func CreateCreateProjectEnvValueStr(str string) CreateProjectEnvValue { + typ := CreateProjectEnvValueTypeStr + + return CreateProjectEnvValue{ + Str: &str, + Type: typ, + } +} + +func CreateCreateProjectEnvValueArrayOfCreateProjectEnvValue2(arrayOfCreateProjectEnvValue2 []CreateProjectEnvValue2) CreateProjectEnvValue { + typ := CreateProjectEnvValueTypeArrayOfCreateProjectEnvValue2 + + return CreateProjectEnvValue{ + ArrayOfCreateProjectEnvValue2: arrayOfCreateProjectEnvValue2, + Type: typ, + } +} + +func (u *CreateProjectEnvValue) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = CreateProjectEnvValueTypeStr + return nil + } + + var arrayOfCreateProjectEnvValue2 []CreateProjectEnvValue2 = []CreateProjectEnvValue2{} + if err := utils.UnmarshalJSON(data, &arrayOfCreateProjectEnvValue2, "", true, true); err == nil { + u.ArrayOfCreateProjectEnvValue2 = arrayOfCreateProjectEnvValue2 + u.Type = CreateProjectEnvValueTypeArrayOfCreateProjectEnvValue2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectEnvValue", string(data)) +} + +func (u CreateProjectEnvValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfCreateProjectEnvValue2 != nil { + return utils.MarshalJSON(u.ArrayOfCreateProjectEnvValue2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectEnvValue: all fields are null") +} + +type CreateProjectEnvTargetProjectsResponse2 string + +const ( + CreateProjectEnvTargetProjectsResponse2Production CreateProjectEnvTargetProjectsResponse2 = "production" + CreateProjectEnvTargetProjectsResponse2Preview CreateProjectEnvTargetProjectsResponse2 = "preview" + CreateProjectEnvTargetProjectsResponse2Development CreateProjectEnvTargetProjectsResponse2 = "development" +) + +func (e CreateProjectEnvTargetProjectsResponse2) ToPointer() *CreateProjectEnvTargetProjectsResponse2 { + return &e +} +func (e *CreateProjectEnvTargetProjectsResponse2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectEnvTargetProjectsResponse2(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvTargetProjectsResponse2: %v", v) + } +} + +type CreateProjectEnvTargetProjects1 string + +const ( + CreateProjectEnvTargetProjects1Production CreateProjectEnvTargetProjects1 = "production" + CreateProjectEnvTargetProjects1Preview CreateProjectEnvTargetProjects1 = "preview" + CreateProjectEnvTargetProjects1Development CreateProjectEnvTargetProjects1 = "development" +) + +func (e CreateProjectEnvTargetProjects1) ToPointer() *CreateProjectEnvTargetProjects1 { + return &e +} +func (e *CreateProjectEnvTargetProjects1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = CreateProjectEnvTargetProjects1(v) + return nil + default: + return fmt.Errorf("invalid value for CreateProjectEnvTargetProjects1: %v", v) + } +} + +type CreateProjectEnvTargetType string + +const ( + CreateProjectEnvTargetTypeArrayOfCreateProjectEnvTargetProjects1 CreateProjectEnvTargetType = "arrayOfCreateProjectEnvTargetProjects1" + CreateProjectEnvTargetTypeCreateProjectEnvTargetProjectsResponse2 CreateProjectEnvTargetType = "createProjectEnv_target_projects_response_2" +) + +type CreateProjectEnvTarget struct { + ArrayOfCreateProjectEnvTargetProjects1 []CreateProjectEnvTargetProjects1 + CreateProjectEnvTargetProjectsResponse2 *CreateProjectEnvTargetProjectsResponse2 + + Type CreateProjectEnvTargetType +} + +func CreateCreateProjectEnvTargetArrayOfCreateProjectEnvTargetProjects1(arrayOfCreateProjectEnvTargetProjects1 []CreateProjectEnvTargetProjects1) CreateProjectEnvTarget { + typ := CreateProjectEnvTargetTypeArrayOfCreateProjectEnvTargetProjects1 + + return CreateProjectEnvTarget{ + ArrayOfCreateProjectEnvTargetProjects1: arrayOfCreateProjectEnvTargetProjects1, + Type: typ, + } +} + +func CreateCreateProjectEnvTargetCreateProjectEnvTargetProjectsResponse2(createProjectEnvTargetProjectsResponse2 CreateProjectEnvTargetProjectsResponse2) CreateProjectEnvTarget { + typ := CreateProjectEnvTargetTypeCreateProjectEnvTargetProjectsResponse2 + + return CreateProjectEnvTarget{ + CreateProjectEnvTargetProjectsResponse2: &createProjectEnvTargetProjectsResponse2, + Type: typ, + } +} + +func (u *CreateProjectEnvTarget) UnmarshalJSON(data []byte) error { + + var arrayOfCreateProjectEnvTargetProjects1 []CreateProjectEnvTargetProjects1 = []CreateProjectEnvTargetProjects1{} + if err := utils.UnmarshalJSON(data, &arrayOfCreateProjectEnvTargetProjects1, "", true, true); err == nil { + u.ArrayOfCreateProjectEnvTargetProjects1 = arrayOfCreateProjectEnvTargetProjects1 + u.Type = CreateProjectEnvTargetTypeArrayOfCreateProjectEnvTargetProjects1 + return nil + } + + var createProjectEnvTargetProjectsResponse2 CreateProjectEnvTargetProjectsResponse2 = CreateProjectEnvTargetProjectsResponse2("") + if err := utils.UnmarshalJSON(data, &createProjectEnvTargetProjectsResponse2, "", true, true); err == nil { + u.CreateProjectEnvTargetProjectsResponse2 = &createProjectEnvTargetProjectsResponse2 + u.Type = CreateProjectEnvTargetTypeCreateProjectEnvTargetProjectsResponse2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateProjectEnvTarget", string(data)) +} + +func (u CreateProjectEnvTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfCreateProjectEnvTargetProjects1 != nil { + return utils.MarshalJSON(u.ArrayOfCreateProjectEnvTargetProjects1, "", true) + } + + if u.CreateProjectEnvTargetProjectsResponse2 != nil { + return utils.MarshalJSON(u.CreateProjectEnvTargetProjectsResponse2, "", true) + } + + return nil, errors.New("could not marshal union type CreateProjectEnvTarget: all fields are null") +} + +type CreateProjectEnvError struct { + Code string `json:"code"` + Message string `json:"message"` + Key *string `json:"key,omitempty"` + EnvVarID *string `json:"envVarId,omitempty"` + EnvVarKey *string `json:"envVarKey,omitempty"` + Action *string `json:"action,omitempty"` + Link *string `json:"link,omitempty"` + Value *CreateProjectEnvValue `json:"value,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + Target *CreateProjectEnvTarget `json:"target,omitempty"` + Project *string `json:"project,omitempty"` +} + +func (o *CreateProjectEnvError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *CreateProjectEnvError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +func (o *CreateProjectEnvError) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *CreateProjectEnvError) GetEnvVarID() *string { + if o == nil { + return nil + } + return o.EnvVarID +} + +func (o *CreateProjectEnvError) GetEnvVarKey() *string { + if o == nil { + return nil + } + return o.EnvVarKey +} + +func (o *CreateProjectEnvError) GetAction() *string { + if o == nil { + return nil + } + return o.Action +} + +func (o *CreateProjectEnvError) GetLink() *string { + if o == nil { + return nil + } + return o.Link +} + +func (o *CreateProjectEnvError) GetValue() *CreateProjectEnvValue { + if o == nil { + return nil + } + return o.Value +} + +func (o *CreateProjectEnvError) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *CreateProjectEnvError) GetTarget() *CreateProjectEnvTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *CreateProjectEnvError) GetProject() *string { + if o == nil { + return nil + } + return o.Project +} + +type Failed struct { + Error CreateProjectEnvError `json:"error"` +} + +func (o *Failed) GetError() CreateProjectEnvError { + if o == nil { + return CreateProjectEnvError{} + } + return o.Error +} + +// CreateProjectEnvResponseBody - The environment variable was created successfully +type CreateProjectEnvResponseBody struct { + Created Created `json:"created"` + Failed []Failed `json:"failed"` +} + +func (o *CreateProjectEnvResponseBody) GetCreated() Created { + if o == nil { + return Created{} + } + return o.Created +} + +func (o *CreateProjectEnvResponseBody) GetFailed() []Failed { + if o == nil { + return []Failed{} + } + return o.Failed +} + +type CreateProjectEnvResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The environment variable was created successfully + Object *CreateProjectEnvResponseBody +} + +func (o *CreateProjectEnvResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateProjectEnvResponse) GetObject() *CreateProjectEnvResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createrecord.go b/src/__tests__/mockserver/internal/sdk/models/operations/createrecord.go new file mode 100644 index 00000000..144b7a3f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createrecord.go @@ -0,0 +1,1434 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// CreateRecordRequestBodyDNSRequest10Type - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyDNSRequest10Type string + +const ( + CreateRecordRequestBodyDNSRequest10TypeA CreateRecordRequestBodyDNSRequest10Type = "A" + CreateRecordRequestBodyDNSRequest10TypeAaaa CreateRecordRequestBodyDNSRequest10Type = "AAAA" + CreateRecordRequestBodyDNSRequest10TypeAlias CreateRecordRequestBodyDNSRequest10Type = "ALIAS" + CreateRecordRequestBodyDNSRequest10TypeCaa CreateRecordRequestBodyDNSRequest10Type = "CAA" + CreateRecordRequestBodyDNSRequest10TypeCname CreateRecordRequestBodyDNSRequest10Type = "CNAME" + CreateRecordRequestBodyDNSRequest10TypeHTTPS CreateRecordRequestBodyDNSRequest10Type = "HTTPS" + CreateRecordRequestBodyDNSRequest10TypeMx CreateRecordRequestBodyDNSRequest10Type = "MX" + CreateRecordRequestBodyDNSRequest10TypeSrv CreateRecordRequestBodyDNSRequest10Type = "SRV" + CreateRecordRequestBodyDNSRequest10TypeTxt CreateRecordRequestBodyDNSRequest10Type = "TXT" + CreateRecordRequestBodyDNSRequest10TypeNs CreateRecordRequestBodyDNSRequest10Type = "NS" +) + +func (e CreateRecordRequestBodyDNSRequest10Type) ToPointer() *CreateRecordRequestBodyDNSRequest10Type { + return &e +} +func (e *CreateRecordRequestBodyDNSRequest10Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyDNSRequest10Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyDNSRequest10Type: %v", v) + } +} + +type RequestBodyHTTPS struct { + Priority *float64 `json:"priority"` + Target string `json:"target"` + Params *string `json:"params,omitempty"` +} + +func (o *RequestBodyHTTPS) GetPriority() *float64 { + if o == nil { + return nil + } + return o.Priority +} + +func (o *RequestBodyHTTPS) GetTarget() string { + if o == nil { + return "" + } + return o.Target +} + +func (o *RequestBodyHTTPS) GetParams() *string { + if o == nil { + return nil + } + return o.Params +} + +type Ten struct { + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyDNSRequest10Type `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + HTTPS RequestBodyHTTPS `json:"https"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *Ten) GetType() CreateRecordRequestBodyDNSRequest10Type { + if o == nil { + return CreateRecordRequestBodyDNSRequest10Type("") + } + return o.Type +} + +func (o *Ten) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *Ten) GetHTTPS() RequestBodyHTTPS { + if o == nil { + return RequestBodyHTTPS{} + } + return o.HTTPS +} + +func (o *Ten) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// CreateRecordRequestBodyDNSRequest9Type - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyDNSRequest9Type string + +const ( + CreateRecordRequestBodyDNSRequest9TypeA CreateRecordRequestBodyDNSRequest9Type = "A" + CreateRecordRequestBodyDNSRequest9TypeAaaa CreateRecordRequestBodyDNSRequest9Type = "AAAA" + CreateRecordRequestBodyDNSRequest9TypeAlias CreateRecordRequestBodyDNSRequest9Type = "ALIAS" + CreateRecordRequestBodyDNSRequest9TypeCaa CreateRecordRequestBodyDNSRequest9Type = "CAA" + CreateRecordRequestBodyDNSRequest9TypeCname CreateRecordRequestBodyDNSRequest9Type = "CNAME" + CreateRecordRequestBodyDNSRequest9TypeHTTPS CreateRecordRequestBodyDNSRequest9Type = "HTTPS" + CreateRecordRequestBodyDNSRequest9TypeMx CreateRecordRequestBodyDNSRequest9Type = "MX" + CreateRecordRequestBodyDNSRequest9TypeSrv CreateRecordRequestBodyDNSRequest9Type = "SRV" + CreateRecordRequestBodyDNSRequest9TypeTxt CreateRecordRequestBodyDNSRequest9Type = "TXT" + CreateRecordRequestBodyDNSRequest9TypeNs CreateRecordRequestBodyDNSRequest9Type = "NS" +) + +func (e CreateRecordRequestBodyDNSRequest9Type) ToPointer() *CreateRecordRequestBodyDNSRequest9Type { + return &e +} +func (e *CreateRecordRequestBodyDNSRequest9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyDNSRequest9Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyDNSRequest9Type: %v", v) + } +} + +type Nine struct { + // A subdomain name. + Name string `json:"name"` + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyDNSRequest9Type `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + // An NS domain value. + Value *string `json:"value,omitempty"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *Nine) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Nine) GetType() CreateRecordRequestBodyDNSRequest9Type { + if o == nil { + return CreateRecordRequestBodyDNSRequest9Type("") + } + return o.Type +} + +func (o *Nine) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *Nine) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *Nine) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// CreateRecordRequestBodyDNSRequest8Type - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyDNSRequest8Type string + +const ( + CreateRecordRequestBodyDNSRequest8TypeA CreateRecordRequestBodyDNSRequest8Type = "A" + CreateRecordRequestBodyDNSRequest8TypeAaaa CreateRecordRequestBodyDNSRequest8Type = "AAAA" + CreateRecordRequestBodyDNSRequest8TypeAlias CreateRecordRequestBodyDNSRequest8Type = "ALIAS" + CreateRecordRequestBodyDNSRequest8TypeCaa CreateRecordRequestBodyDNSRequest8Type = "CAA" + CreateRecordRequestBodyDNSRequest8TypeCname CreateRecordRequestBodyDNSRequest8Type = "CNAME" + CreateRecordRequestBodyDNSRequest8TypeHTTPS CreateRecordRequestBodyDNSRequest8Type = "HTTPS" + CreateRecordRequestBodyDNSRequest8TypeMx CreateRecordRequestBodyDNSRequest8Type = "MX" + CreateRecordRequestBodyDNSRequest8TypeSrv CreateRecordRequestBodyDNSRequest8Type = "SRV" + CreateRecordRequestBodyDNSRequest8TypeTxt CreateRecordRequestBodyDNSRequest8Type = "TXT" + CreateRecordRequestBodyDNSRequest8TypeNs CreateRecordRequestBodyDNSRequest8Type = "NS" +) + +func (e CreateRecordRequestBodyDNSRequest8Type) ToPointer() *CreateRecordRequestBodyDNSRequest8Type { + return &e +} +func (e *CreateRecordRequestBodyDNSRequest8Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyDNSRequest8Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyDNSRequest8Type: %v", v) + } +} + +type Eight struct { + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyDNSRequest8Type `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + // A TXT record containing arbitrary text. + Value string `json:"value"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *Eight) GetType() CreateRecordRequestBodyDNSRequest8Type { + if o == nil { + return CreateRecordRequestBodyDNSRequest8Type("") + } + return o.Type +} + +func (o *Eight) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *Eight) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Eight) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// CreateRecordRequestBodyDNSRequest7Type - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyDNSRequest7Type string + +const ( + CreateRecordRequestBodyDNSRequest7TypeA CreateRecordRequestBodyDNSRequest7Type = "A" + CreateRecordRequestBodyDNSRequest7TypeAaaa CreateRecordRequestBodyDNSRequest7Type = "AAAA" + CreateRecordRequestBodyDNSRequest7TypeAlias CreateRecordRequestBodyDNSRequest7Type = "ALIAS" + CreateRecordRequestBodyDNSRequest7TypeCaa CreateRecordRequestBodyDNSRequest7Type = "CAA" + CreateRecordRequestBodyDNSRequest7TypeCname CreateRecordRequestBodyDNSRequest7Type = "CNAME" + CreateRecordRequestBodyDNSRequest7TypeHTTPS CreateRecordRequestBodyDNSRequest7Type = "HTTPS" + CreateRecordRequestBodyDNSRequest7TypeMx CreateRecordRequestBodyDNSRequest7Type = "MX" + CreateRecordRequestBodyDNSRequest7TypeSrv CreateRecordRequestBodyDNSRequest7Type = "SRV" + CreateRecordRequestBodyDNSRequest7TypeTxt CreateRecordRequestBodyDNSRequest7Type = "TXT" + CreateRecordRequestBodyDNSRequest7TypeNs CreateRecordRequestBodyDNSRequest7Type = "NS" +) + +func (e CreateRecordRequestBodyDNSRequest7Type) ToPointer() *CreateRecordRequestBodyDNSRequest7Type { + return &e +} +func (e *CreateRecordRequestBodyDNSRequest7Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyDNSRequest7Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyDNSRequest7Type: %v", v) + } +} + +type RequestBodySrv struct { + Priority *float64 `json:"priority"` + Weight *float64 `json:"weight"` + Port *float64 `json:"port"` + Target string `json:"target"` +} + +func (o *RequestBodySrv) GetPriority() *float64 { + if o == nil { + return nil + } + return o.Priority +} + +func (o *RequestBodySrv) GetWeight() *float64 { + if o == nil { + return nil + } + return o.Weight +} + +func (o *RequestBodySrv) GetPort() *float64 { + if o == nil { + return nil + } + return o.Port +} + +func (o *RequestBodySrv) GetTarget() string { + if o == nil { + return "" + } + return o.Target +} + +type Seven struct { + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyDNSRequest7Type `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + Srv RequestBodySrv `json:"srv"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *Seven) GetType() CreateRecordRequestBodyDNSRequest7Type { + if o == nil { + return CreateRecordRequestBodyDNSRequest7Type("") + } + return o.Type +} + +func (o *Seven) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *Seven) GetSrv() RequestBodySrv { + if o == nil { + return RequestBodySrv{} + } + return o.Srv +} + +func (o *Seven) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// CreateRecordRequestBodyDNSRequest6Type - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyDNSRequest6Type string + +const ( + CreateRecordRequestBodyDNSRequest6TypeA CreateRecordRequestBodyDNSRequest6Type = "A" + CreateRecordRequestBodyDNSRequest6TypeAaaa CreateRecordRequestBodyDNSRequest6Type = "AAAA" + CreateRecordRequestBodyDNSRequest6TypeAlias CreateRecordRequestBodyDNSRequest6Type = "ALIAS" + CreateRecordRequestBodyDNSRequest6TypeCaa CreateRecordRequestBodyDNSRequest6Type = "CAA" + CreateRecordRequestBodyDNSRequest6TypeCname CreateRecordRequestBodyDNSRequest6Type = "CNAME" + CreateRecordRequestBodyDNSRequest6TypeHTTPS CreateRecordRequestBodyDNSRequest6Type = "HTTPS" + CreateRecordRequestBodyDNSRequest6TypeMx CreateRecordRequestBodyDNSRequest6Type = "MX" + CreateRecordRequestBodyDNSRequest6TypeSrv CreateRecordRequestBodyDNSRequest6Type = "SRV" + CreateRecordRequestBodyDNSRequest6TypeTxt CreateRecordRequestBodyDNSRequest6Type = "TXT" + CreateRecordRequestBodyDNSRequest6TypeNs CreateRecordRequestBodyDNSRequest6Type = "NS" +) + +func (e CreateRecordRequestBodyDNSRequest6Type) ToPointer() *CreateRecordRequestBodyDNSRequest6Type { + return &e +} +func (e *CreateRecordRequestBodyDNSRequest6Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyDNSRequest6Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyDNSRequest6Type: %v", v) + } +} + +type Six struct { + // A subdomain name or an empty string for the root domain. + Name string `json:"name"` + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyDNSRequest6Type `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + // An MX record specifying the mail server responsible for accepting messages on behalf of the domain name. + Value string `json:"value"` + MxPriority float64 `json:"mxPriority"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *Six) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Six) GetType() CreateRecordRequestBodyDNSRequest6Type { + if o == nil { + return CreateRecordRequestBodyDNSRequest6Type("") + } + return o.Type +} + +func (o *Six) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *Six) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Six) GetMxPriority() float64 { + if o == nil { + return 0.0 + } + return o.MxPriority +} + +func (o *Six) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// CreateRecordRequestBodyDNSRequest5Type - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyDNSRequest5Type string + +const ( + CreateRecordRequestBodyDNSRequest5TypeA CreateRecordRequestBodyDNSRequest5Type = "A" + CreateRecordRequestBodyDNSRequest5TypeAaaa CreateRecordRequestBodyDNSRequest5Type = "AAAA" + CreateRecordRequestBodyDNSRequest5TypeAlias CreateRecordRequestBodyDNSRequest5Type = "ALIAS" + CreateRecordRequestBodyDNSRequest5TypeCaa CreateRecordRequestBodyDNSRequest5Type = "CAA" + CreateRecordRequestBodyDNSRequest5TypeCname CreateRecordRequestBodyDNSRequest5Type = "CNAME" + CreateRecordRequestBodyDNSRequest5TypeHTTPS CreateRecordRequestBodyDNSRequest5Type = "HTTPS" + CreateRecordRequestBodyDNSRequest5TypeMx CreateRecordRequestBodyDNSRequest5Type = "MX" + CreateRecordRequestBodyDNSRequest5TypeSrv CreateRecordRequestBodyDNSRequest5Type = "SRV" + CreateRecordRequestBodyDNSRequest5TypeTxt CreateRecordRequestBodyDNSRequest5Type = "TXT" + CreateRecordRequestBodyDNSRequest5TypeNs CreateRecordRequestBodyDNSRequest5Type = "NS" +) + +func (e CreateRecordRequestBodyDNSRequest5Type) ToPointer() *CreateRecordRequestBodyDNSRequest5Type { + return &e +} +func (e *CreateRecordRequestBodyDNSRequest5Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyDNSRequest5Type(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyDNSRequest5Type: %v", v) + } +} + +type RequestBody5 struct { + // A subdomain name or an empty string for the root domain. + Name string `json:"name"` + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyDNSRequest5Type `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + // A CNAME record mapping to another domain name. + Value *string `json:"value,omitempty"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *RequestBody5) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *RequestBody5) GetType() CreateRecordRequestBodyDNSRequest5Type { + if o == nil { + return CreateRecordRequestBodyDNSRequest5Type("") + } + return o.Type +} + +func (o *RequestBody5) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *RequestBody5) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *RequestBody5) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// CreateRecordRequestBodyDNSRequestType - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyDNSRequestType string + +const ( + CreateRecordRequestBodyDNSRequestTypeA CreateRecordRequestBodyDNSRequestType = "A" + CreateRecordRequestBodyDNSRequestTypeAaaa CreateRecordRequestBodyDNSRequestType = "AAAA" + CreateRecordRequestBodyDNSRequestTypeAlias CreateRecordRequestBodyDNSRequestType = "ALIAS" + CreateRecordRequestBodyDNSRequestTypeCaa CreateRecordRequestBodyDNSRequestType = "CAA" + CreateRecordRequestBodyDNSRequestTypeCname CreateRecordRequestBodyDNSRequestType = "CNAME" + CreateRecordRequestBodyDNSRequestTypeHTTPS CreateRecordRequestBodyDNSRequestType = "HTTPS" + CreateRecordRequestBodyDNSRequestTypeMx CreateRecordRequestBodyDNSRequestType = "MX" + CreateRecordRequestBodyDNSRequestTypeSrv CreateRecordRequestBodyDNSRequestType = "SRV" + CreateRecordRequestBodyDNSRequestTypeTxt CreateRecordRequestBodyDNSRequestType = "TXT" + CreateRecordRequestBodyDNSRequestTypeNs CreateRecordRequestBodyDNSRequestType = "NS" +) + +func (e CreateRecordRequestBodyDNSRequestType) ToPointer() *CreateRecordRequestBodyDNSRequestType { + return &e +} +func (e *CreateRecordRequestBodyDNSRequestType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyDNSRequestType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyDNSRequestType: %v", v) + } +} + +type RequestBody4 struct { + // A subdomain name or an empty string for the root domain. + Name string `json:"name"` + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyDNSRequestType `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + // A CAA record to specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. + Value string `json:"value"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *RequestBody4) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *RequestBody4) GetType() CreateRecordRequestBodyDNSRequestType { + if o == nil { + return CreateRecordRequestBodyDNSRequestType("") + } + return o.Type +} + +func (o *RequestBody4) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *RequestBody4) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *RequestBody4) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// CreateRecordRequestBodyDNSType - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyDNSType string + +const ( + CreateRecordRequestBodyDNSTypeA CreateRecordRequestBodyDNSType = "A" + CreateRecordRequestBodyDNSTypeAaaa CreateRecordRequestBodyDNSType = "AAAA" + CreateRecordRequestBodyDNSTypeAlias CreateRecordRequestBodyDNSType = "ALIAS" + CreateRecordRequestBodyDNSTypeCaa CreateRecordRequestBodyDNSType = "CAA" + CreateRecordRequestBodyDNSTypeCname CreateRecordRequestBodyDNSType = "CNAME" + CreateRecordRequestBodyDNSTypeHTTPS CreateRecordRequestBodyDNSType = "HTTPS" + CreateRecordRequestBodyDNSTypeMx CreateRecordRequestBodyDNSType = "MX" + CreateRecordRequestBodyDNSTypeSrv CreateRecordRequestBodyDNSType = "SRV" + CreateRecordRequestBodyDNSTypeTxt CreateRecordRequestBodyDNSType = "TXT" + CreateRecordRequestBodyDNSTypeNs CreateRecordRequestBodyDNSType = "NS" +) + +func (e CreateRecordRequestBodyDNSType) ToPointer() *CreateRecordRequestBodyDNSType { + return &e +} +func (e *CreateRecordRequestBodyDNSType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyDNSType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyDNSType: %v", v) + } +} + +type RequestBody3 struct { + // A subdomain name or an empty string for the root domain. + Name string `json:"name"` + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyDNSType `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + // An ALIAS virtual record pointing to a hostname resolved to an A record on server side. + Value string `json:"value"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *RequestBody3) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *RequestBody3) GetType() CreateRecordRequestBodyDNSType { + if o == nil { + return CreateRecordRequestBodyDNSType("") + } + return o.Type +} + +func (o *RequestBody3) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *RequestBody3) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *RequestBody3) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// CreateRecordRequestBodyType - The type of record, it could be one of the valid DNS records. +type CreateRecordRequestBodyType string + +const ( + CreateRecordRequestBodyTypeA CreateRecordRequestBodyType = "A" + CreateRecordRequestBodyTypeAaaa CreateRecordRequestBodyType = "AAAA" + CreateRecordRequestBodyTypeAlias CreateRecordRequestBodyType = "ALIAS" + CreateRecordRequestBodyTypeCaa CreateRecordRequestBodyType = "CAA" + CreateRecordRequestBodyTypeCname CreateRecordRequestBodyType = "CNAME" + CreateRecordRequestBodyTypeHTTPS CreateRecordRequestBodyType = "HTTPS" + CreateRecordRequestBodyTypeMx CreateRecordRequestBodyType = "MX" + CreateRecordRequestBodyTypeSrv CreateRecordRequestBodyType = "SRV" + CreateRecordRequestBodyTypeTxt CreateRecordRequestBodyType = "TXT" + CreateRecordRequestBodyTypeNs CreateRecordRequestBodyType = "NS" +) + +func (e CreateRecordRequestBodyType) ToPointer() *CreateRecordRequestBodyType { + return &e +} +func (e *CreateRecordRequestBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = CreateRecordRequestBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateRecordRequestBodyType: %v", v) + } +} + +type RequestBody2 struct { + // A subdomain name or an empty string for the root domain. + Name string `json:"name"` + // The type of record, it could be one of the valid DNS records. + Type CreateRecordRequestBodyType `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + // An AAAA record pointing to an IPv6 address. + Value string `json:"value"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *RequestBody2) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *RequestBody2) GetType() CreateRecordRequestBodyType { + if o == nil { + return CreateRecordRequestBodyType("") + } + return o.Type +} + +func (o *RequestBody2) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *RequestBody2) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *RequestBody2) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +// RequestBodyType - The type of record, it could be one of the valid DNS records. +type RequestBodyType string + +const ( + RequestBodyTypeA RequestBodyType = "A" + RequestBodyTypeAaaa RequestBodyType = "AAAA" + RequestBodyTypeAlias RequestBodyType = "ALIAS" + RequestBodyTypeCaa RequestBodyType = "CAA" + RequestBodyTypeCname RequestBodyType = "CNAME" + RequestBodyTypeHTTPS RequestBodyType = "HTTPS" + RequestBodyTypeMx RequestBodyType = "MX" + RequestBodyTypeSrv RequestBodyType = "SRV" + RequestBodyTypeTxt RequestBodyType = "TXT" + RequestBodyTypeNs RequestBodyType = "NS" +) + +func (e RequestBodyType) ToPointer() *RequestBodyType { + return &e +} +func (e *RequestBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = RequestBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for RequestBodyType: %v", v) + } +} + +type RequestBody1 struct { + // A subdomain name or an empty string for the root domain. + Name string `json:"name"` + // The type of record, it could be one of the valid DNS records. + Type RequestBodyType `json:"type"` + // The TTL value. Must be a number between 60 and 2147483647. Default value is 60. + TTL *float64 `json:"ttl,omitempty"` + // The record value must be a valid IPv4 address. + Value string `json:"value"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *RequestBody1) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *RequestBody1) GetType() RequestBodyType { + if o == nil { + return RequestBodyType("") + } + return o.Type +} + +func (o *RequestBody1) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *RequestBody1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *RequestBody1) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +type CreateRecordRequestBodyUnionType string + +const ( + CreateRecordRequestBodyUnionTypeRequestBody1 CreateRecordRequestBodyUnionType = "requestBody_1" + CreateRecordRequestBodyUnionTypeRequestBody2 CreateRecordRequestBodyUnionType = "requestBody_2" + CreateRecordRequestBodyUnionTypeRequestBody3 CreateRecordRequestBodyUnionType = "requestBody_3" + CreateRecordRequestBodyUnionTypeRequestBody4 CreateRecordRequestBodyUnionType = "requestBody_4" + CreateRecordRequestBodyUnionTypeRequestBody5 CreateRecordRequestBodyUnionType = "requestBody_5" + CreateRecordRequestBodyUnionTypeSix CreateRecordRequestBodyUnionType = "6" + CreateRecordRequestBodyUnionTypeSeven CreateRecordRequestBodyUnionType = "7" + CreateRecordRequestBodyUnionTypeEight CreateRecordRequestBodyUnionType = "8" + CreateRecordRequestBodyUnionTypeNine CreateRecordRequestBodyUnionType = "9" + CreateRecordRequestBodyUnionTypeTen CreateRecordRequestBodyUnionType = "10" +) + +type CreateRecordRequestBody struct { + RequestBody1 *RequestBody1 + RequestBody2 *RequestBody2 + RequestBody3 *RequestBody3 + RequestBody4 *RequestBody4 + RequestBody5 *RequestBody5 + Six *Six + Seven *Seven + Eight *Eight + Nine *Nine + Ten *Ten + + Type CreateRecordRequestBodyUnionType +} + +func CreateCreateRecordRequestBodyRequestBody1(requestBody1 RequestBody1) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeRequestBody1 + + return CreateRecordRequestBody{ + RequestBody1: &requestBody1, + Type: typ, + } +} + +func CreateCreateRecordRequestBodyRequestBody2(requestBody2 RequestBody2) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeRequestBody2 + + return CreateRecordRequestBody{ + RequestBody2: &requestBody2, + Type: typ, + } +} + +func CreateCreateRecordRequestBodyRequestBody3(requestBody3 RequestBody3) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeRequestBody3 + + return CreateRecordRequestBody{ + RequestBody3: &requestBody3, + Type: typ, + } +} + +func CreateCreateRecordRequestBodyRequestBody4(requestBody4 RequestBody4) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeRequestBody4 + + return CreateRecordRequestBody{ + RequestBody4: &requestBody4, + Type: typ, + } +} + +func CreateCreateRecordRequestBodyRequestBody5(requestBody5 RequestBody5) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeRequestBody5 + + return CreateRecordRequestBody{ + RequestBody5: &requestBody5, + Type: typ, + } +} + +func CreateCreateRecordRequestBodySix(six Six) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeSix + + return CreateRecordRequestBody{ + Six: &six, + Type: typ, + } +} + +func CreateCreateRecordRequestBodySeven(seven Seven) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeSeven + + return CreateRecordRequestBody{ + Seven: &seven, + Type: typ, + } +} + +func CreateCreateRecordRequestBodyEight(eight Eight) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeEight + + return CreateRecordRequestBody{ + Eight: &eight, + Type: typ, + } +} + +func CreateCreateRecordRequestBodyNine(nine Nine) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeNine + + return CreateRecordRequestBody{ + Nine: &nine, + Type: typ, + } +} + +func CreateCreateRecordRequestBodyTen(ten Ten) CreateRecordRequestBody { + typ := CreateRecordRequestBodyUnionTypeTen + + return CreateRecordRequestBody{ + Ten: &ten, + Type: typ, + } +} + +func (u *CreateRecordRequestBody) UnmarshalJSON(data []byte) error { + + var seven Seven = Seven{} + if err := utils.UnmarshalJSON(data, &seven, "", true, true); err == nil { + u.Seven = &seven + u.Type = CreateRecordRequestBodyUnionTypeSeven + return nil + } + + var eight Eight = Eight{} + if err := utils.UnmarshalJSON(data, &eight, "", true, true); err == nil { + u.Eight = &eight + u.Type = CreateRecordRequestBodyUnionTypeEight + return nil + } + + var ten Ten = Ten{} + if err := utils.UnmarshalJSON(data, &ten, "", true, true); err == nil { + u.Ten = &ten + u.Type = CreateRecordRequestBodyUnionTypeTen + return nil + } + + var requestBody1 RequestBody1 = RequestBody1{} + if err := utils.UnmarshalJSON(data, &requestBody1, "", true, true); err == nil { + u.RequestBody1 = &requestBody1 + u.Type = CreateRecordRequestBodyUnionTypeRequestBody1 + return nil + } + + var requestBody2 RequestBody2 = RequestBody2{} + if err := utils.UnmarshalJSON(data, &requestBody2, "", true, true); err == nil { + u.RequestBody2 = &requestBody2 + u.Type = CreateRecordRequestBodyUnionTypeRequestBody2 + return nil + } + + var requestBody3 RequestBody3 = RequestBody3{} + if err := utils.UnmarshalJSON(data, &requestBody3, "", true, true); err == nil { + u.RequestBody3 = &requestBody3 + u.Type = CreateRecordRequestBodyUnionTypeRequestBody3 + return nil + } + + var requestBody4 RequestBody4 = RequestBody4{} + if err := utils.UnmarshalJSON(data, &requestBody4, "", true, true); err == nil { + u.RequestBody4 = &requestBody4 + u.Type = CreateRecordRequestBodyUnionTypeRequestBody4 + return nil + } + + var requestBody5 RequestBody5 = RequestBody5{} + if err := utils.UnmarshalJSON(data, &requestBody5, "", true, true); err == nil { + u.RequestBody5 = &requestBody5 + u.Type = CreateRecordRequestBodyUnionTypeRequestBody5 + return nil + } + + var nine Nine = Nine{} + if err := utils.UnmarshalJSON(data, &nine, "", true, true); err == nil { + u.Nine = &nine + u.Type = CreateRecordRequestBodyUnionTypeNine + return nil + } + + var six Six = Six{} + if err := utils.UnmarshalJSON(data, &six, "", true, true); err == nil { + u.Six = &six + u.Type = CreateRecordRequestBodyUnionTypeSix + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateRecordRequestBody", string(data)) +} + +func (u CreateRecordRequestBody) MarshalJSON() ([]byte, error) { + if u.RequestBody1 != nil { + return utils.MarshalJSON(u.RequestBody1, "", true) + } + + if u.RequestBody2 != nil { + return utils.MarshalJSON(u.RequestBody2, "", true) + } + + if u.RequestBody3 != nil { + return utils.MarshalJSON(u.RequestBody3, "", true) + } + + if u.RequestBody4 != nil { + return utils.MarshalJSON(u.RequestBody4, "", true) + } + + if u.RequestBody5 != nil { + return utils.MarshalJSON(u.RequestBody5, "", true) + } + + if u.Six != nil { + return utils.MarshalJSON(u.Six, "", true) + } + + if u.Seven != nil { + return utils.MarshalJSON(u.Seven, "", true) + } + + if u.Eight != nil { + return utils.MarshalJSON(u.Eight, "", true) + } + + if u.Nine != nil { + return utils.MarshalJSON(u.Nine, "", true) + } + + if u.Ten != nil { + return utils.MarshalJSON(u.Ten, "", true) + } + + return nil, errors.New("could not marshal union type CreateRecordRequestBody: all fields are null") +} + +type CreateRecordRequest struct { + // The domain used to create the DNS record. + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateRecordRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateRecordRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *CreateRecordRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateRecordRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateRecordRequest) GetRequestBody() CreateRecordRequestBody { + if o == nil { + return CreateRecordRequestBody{} + } + return o.RequestBody +} + +type CreateRecordResponseBody2 struct { + // The id of the newly created DNS record + UID string `json:"uid"` +} + +func (o *CreateRecordResponseBody2) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +type CreateRecordResponseBody1 struct { + UID string `json:"uid"` + Updated float64 `json:"updated"` +} + +func (o *CreateRecordResponseBody1) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *CreateRecordResponseBody1) GetUpdated() float64 { + if o == nil { + return 0.0 + } + return o.Updated +} + +type CreateRecordResponseBodyType string + +const ( + CreateRecordResponseBodyTypeCreateRecordResponseBody1 CreateRecordResponseBodyType = "createRecord_responseBody_1" + CreateRecordResponseBodyTypeCreateRecordResponseBody2 CreateRecordResponseBodyType = "createRecord_responseBody_2" +) + +// CreateRecordResponseBody - Successful response showing the uid of the newly created DNS record. +type CreateRecordResponseBody struct { + CreateRecordResponseBody1 *CreateRecordResponseBody1 + CreateRecordResponseBody2 *CreateRecordResponseBody2 + + Type CreateRecordResponseBodyType +} + +func CreateCreateRecordResponseBodyCreateRecordResponseBody1(createRecordResponseBody1 CreateRecordResponseBody1) CreateRecordResponseBody { + typ := CreateRecordResponseBodyTypeCreateRecordResponseBody1 + + return CreateRecordResponseBody{ + CreateRecordResponseBody1: &createRecordResponseBody1, + Type: typ, + } +} + +func CreateCreateRecordResponseBodyCreateRecordResponseBody2(createRecordResponseBody2 CreateRecordResponseBody2) CreateRecordResponseBody { + typ := CreateRecordResponseBodyTypeCreateRecordResponseBody2 + + return CreateRecordResponseBody{ + CreateRecordResponseBody2: &createRecordResponseBody2, + Type: typ, + } +} + +func (u *CreateRecordResponseBody) UnmarshalJSON(data []byte) error { + + var createRecordResponseBody2 CreateRecordResponseBody2 = CreateRecordResponseBody2{} + if err := utils.UnmarshalJSON(data, &createRecordResponseBody2, "", true, true); err == nil { + u.CreateRecordResponseBody2 = &createRecordResponseBody2 + u.Type = CreateRecordResponseBodyTypeCreateRecordResponseBody2 + return nil + } + + var createRecordResponseBody1 CreateRecordResponseBody1 = CreateRecordResponseBody1{} + if err := utils.UnmarshalJSON(data, &createRecordResponseBody1, "", true, true); err == nil { + u.CreateRecordResponseBody1 = &createRecordResponseBody1 + u.Type = CreateRecordResponseBodyTypeCreateRecordResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateRecordResponseBody", string(data)) +} + +func (u CreateRecordResponseBody) MarshalJSON() ([]byte, error) { + if u.CreateRecordResponseBody1 != nil { + return utils.MarshalJSON(u.CreateRecordResponseBody1, "", true) + } + + if u.CreateRecordResponseBody2 != nil { + return utils.MarshalJSON(u.CreateRecordResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type CreateRecordResponseBody: all fields are null") +} + +type CreateRecordResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response showing the uid of the newly created DNS record. + OneOf *CreateRecordResponseBody +} + +func (o *CreateRecordResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateRecordResponse) GetOneOf() *CreateRecordResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createteam.go b/src/__tests__/mockserver/internal/sdk/models/operations/createteam.go new file mode 100644 index 00000000..26b215c7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createteam.go @@ -0,0 +1,169 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type Utm struct { + // UTM source + UtmSource *string `json:"utmSource,omitempty"` + // UTM medium + UtmMedium *string `json:"utmMedium,omitempty"` + // UTM campaign + UtmCampaign *string `json:"utmCampaign,omitempty"` + // UTM term + UtmTerm *string `json:"utmTerm,omitempty"` +} + +func (o *Utm) GetUtmSource() *string { + if o == nil { + return nil + } + return o.UtmSource +} + +func (o *Utm) GetUtmMedium() *string { + if o == nil { + return nil + } + return o.UtmMedium +} + +func (o *Utm) GetUtmCampaign() *string { + if o == nil { + return nil + } + return o.UtmCampaign +} + +func (o *Utm) GetUtmTerm() *string { + if o == nil { + return nil + } + return o.UtmTerm +} + +// Attribution information for the session or current page +type Attribution struct { + // Session referrer + SessionReferrer *string `json:"sessionReferrer,omitempty"` + // Session landing page + LandingPage *string `json:"landingPage,omitempty"` + // Referrer to the signup page + PageBeforeConversionPage *string `json:"pageBeforeConversionPage,omitempty"` + Utm *Utm `json:"utm,omitempty"` +} + +func (o *Attribution) GetSessionReferrer() *string { + if o == nil { + return nil + } + return o.SessionReferrer +} + +func (o *Attribution) GetLandingPage() *string { + if o == nil { + return nil + } + return o.LandingPage +} + +func (o *Attribution) GetPageBeforeConversionPage() *string { + if o == nil { + return nil + } + return o.PageBeforeConversionPage +} + +func (o *Attribution) GetUtm() *Utm { + if o == nil { + return nil + } + return o.Utm +} + +type CreateTeamRequestBody struct { + // The desired slug for the Team + Slug string `json:"slug"` + // The desired name for the Team. It will be generated from the provided slug if nothing is provided + Name *string `json:"name,omitempty"` + // Attribution information for the session or current page + Attribution *Attribution `json:"attribution,omitempty"` +} + +func (o *CreateTeamRequestBody) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *CreateTeamRequestBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *CreateTeamRequestBody) GetAttribution() *Attribution { + if o == nil { + return nil + } + return o.Attribution +} + +// CreateTeamBilling - IMPORTANT: If extending Billing, particularly with optional fields, make sure you also update `sync-orb-subscription-to-owner.ts` to handle the items when the object is recreated. +type CreateTeamBilling struct { +} + +// CreateTeamResponseBody - The team was created successfully +type CreateTeamResponseBody struct { + // Id of the created team + ID string `json:"id"` + Slug string `json:"slug"` + // IMPORTANT: If extending Billing, particularly with optional fields, make sure you also update `sync-orb-subscription-to-owner.ts` to handle the items when the object is recreated. + Billing CreateTeamBilling `json:"billing"` +} + +func (o *CreateTeamResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateTeamResponseBody) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *CreateTeamResponseBody) GetBilling() CreateTeamBilling { + if o == nil { + return CreateTeamBilling{} + } + return o.Billing +} + +type CreateTeamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The team was created successfully + Object *CreateTeamResponseBody +} + +func (o *CreateTeamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateTeamResponse) GetObject() *CreateTeamResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/createwebhook.go b/src/__tests__/mockserver/internal/sdk/models/operations/createwebhook.go new file mode 100644 index 00000000..f97c0b23 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/createwebhook.go @@ -0,0 +1,458 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type Events string + +const ( + EventsBudgetReached Events = "budget.reached" + EventsBudgetReset Events = "budget.reset" + EventsDomainCreated Events = "domain.created" + EventsDeploymentCreated Events = "deployment.created" + EventsDeploymentError Events = "deployment.error" + EventsDeploymentCanceled Events = "deployment.canceled" + EventsDeploymentSucceeded Events = "deployment.succeeded" + EventsDeploymentReady Events = "deployment.ready" + EventsDeploymentCheckRerequested Events = "deployment.check-rerequested" + EventsDeploymentPromoted Events = "deployment.promoted" + EventsDeploymentIntegrationActionStart Events = "deployment.integration.action.start" + EventsDeploymentIntegrationActionCancel Events = "deployment.integration.action.cancel" + EventsDeploymentIntegrationActionCleanup Events = "deployment.integration.action.cleanup" + EventsEdgeConfigCreated Events = "edge-config.created" + EventsEdgeConfigDeleted Events = "edge-config.deleted" + EventsEdgeConfigItemsUpdated Events = "edge-config.items.updated" + EventsFirewallAttack Events = "firewall.attack" + EventsIntegrationConfigurationPermissionUpgraded Events = "integration-configuration.permission-upgraded" + EventsIntegrationConfigurationRemoved Events = "integration-configuration.removed" + EventsIntegrationConfigurationScopeChangeConfirmed Events = "integration-configuration.scope-change-confirmed" + EventsIntegrationResourceProjectConnected Events = "integration-resource.project-connected" + EventsIntegrationResourceProjectDisconnected Events = "integration-resource.project-disconnected" + EventsProjectCreated Events = "project.created" + EventsProjectRemoved Events = "project.removed" + EventsDeploymentChecksCompletedLegacy Events = "deployment-checks-completed" + EventsDeploymentReadyLegacy Events = "deployment-ready" + EventsDeploymentPreparedLegacy Events = "deployment-prepared" + EventsDeploymentErrorLegacy Events = "deployment-error" + EventsDeploymentCheckRerequestedLegacy Events = "deployment-check-rerequested" + EventsDeploymentCanceledLegacy Events = "deployment-canceled" + EventsProjectCreatedLegacy Events = "project-created" + EventsProjectRemovedLegacy Events = "project-removed" + EventsDomainCreatedLegacy Events = "domain-created" + EventsDeploymentLegacy Events = "deployment" + EventsIntegrationConfigurationPermissionUpdatedLegacy Events = "integration-configuration-permission-updated" + EventsIntegrationConfigurationRemovedLegacy Events = "integration-configuration-removed" + EventsIntegrationConfigurationScopeChangeConfirmedLegacy Events = "integration-configuration-scope-change-confirmed" + EventsMarketplaceInvoiceCreated Events = "marketplace.invoice.created" + EventsMarketplaceInvoicePaid Events = "marketplace.invoice.paid" + EventsMarketplaceInvoiceNotpaid Events = "marketplace.invoice.notpaid" + EventsMarketplaceInvoiceRefunded Events = "marketplace.invoice.refunded" + EventsObservabilityAnomaly Events = "observability.anomaly" + EventsTestWebhook Events = "test-webhook" +) + +func (e Events) ToPointer() *Events { + return &e +} +func (e *Events) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "budget.reached": + fallthrough + case "budget.reset": + fallthrough + case "domain.created": + fallthrough + case "deployment.created": + fallthrough + case "deployment.error": + fallthrough + case "deployment.canceled": + fallthrough + case "deployment.succeeded": + fallthrough + case "deployment.ready": + fallthrough + case "deployment.check-rerequested": + fallthrough + case "deployment.promoted": + fallthrough + case "deployment.integration.action.start": + fallthrough + case "deployment.integration.action.cancel": + fallthrough + case "deployment.integration.action.cleanup": + fallthrough + case "edge-config.created": + fallthrough + case "edge-config.deleted": + fallthrough + case "edge-config.items.updated": + fallthrough + case "firewall.attack": + fallthrough + case "integration-configuration.permission-upgraded": + fallthrough + case "integration-configuration.removed": + fallthrough + case "integration-configuration.scope-change-confirmed": + fallthrough + case "integration-resource.project-connected": + fallthrough + case "integration-resource.project-disconnected": + fallthrough + case "project.created": + fallthrough + case "project.removed": + fallthrough + case "deployment-checks-completed": + fallthrough + case "deployment-ready": + fallthrough + case "deployment-prepared": + fallthrough + case "deployment-error": + fallthrough + case "deployment-check-rerequested": + fallthrough + case "deployment-canceled": + fallthrough + case "project-created": + fallthrough + case "project-removed": + fallthrough + case "domain-created": + fallthrough + case "deployment": + fallthrough + case "integration-configuration-permission-updated": + fallthrough + case "integration-configuration-removed": + fallthrough + case "integration-configuration-scope-change-confirmed": + fallthrough + case "marketplace.invoice.created": + fallthrough + case "marketplace.invoice.paid": + fallthrough + case "marketplace.invoice.notpaid": + fallthrough + case "marketplace.invoice.refunded": + fallthrough + case "observability.anomaly": + fallthrough + case "test-webhook": + *e = Events(v) + return nil + default: + return fmt.Errorf("invalid value for Events: %v", v) + } +} + +type CreateWebhookRequestBody struct { + URL string `json:"url"` + Events []Events `json:"events"` + ProjectIds []string `json:"projectIds,omitempty"` +} + +func (o *CreateWebhookRequestBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateWebhookRequestBody) GetEvents() []Events { + if o == nil { + return []Events{} + } + return o.Events +} + +func (o *CreateWebhookRequestBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +type CreateWebhookRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody CreateWebhookRequestBody `request:"mediaType=application/json"` +} + +func (o *CreateWebhookRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *CreateWebhookRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *CreateWebhookRequest) GetRequestBody() CreateWebhookRequestBody { + if o == nil { + return CreateWebhookRequestBody{} + } + return o.RequestBody +} + +// CreateWebhookEvents - The webhooks events +type CreateWebhookEvents string + +const ( + CreateWebhookEventsBudgetReached CreateWebhookEvents = "budget.reached" + CreateWebhookEventsBudgetReset CreateWebhookEvents = "budget.reset" + CreateWebhookEventsDomainCreated CreateWebhookEvents = "domain.created" + CreateWebhookEventsDeploymentCreated CreateWebhookEvents = "deployment.created" + CreateWebhookEventsDeploymentError CreateWebhookEvents = "deployment.error" + CreateWebhookEventsDeploymentCanceled CreateWebhookEvents = "deployment.canceled" + CreateWebhookEventsDeploymentSucceeded CreateWebhookEvents = "deployment.succeeded" + CreateWebhookEventsDeploymentReady CreateWebhookEvents = "deployment.ready" + CreateWebhookEventsDeploymentCheckRerequested CreateWebhookEvents = "deployment.check-rerequested" + CreateWebhookEventsDeploymentPromoted CreateWebhookEvents = "deployment.promoted" + CreateWebhookEventsDeploymentIntegrationActionStart CreateWebhookEvents = "deployment.integration.action.start" + CreateWebhookEventsDeploymentIntegrationActionCancel CreateWebhookEvents = "deployment.integration.action.cancel" + CreateWebhookEventsDeploymentIntegrationActionCleanup CreateWebhookEvents = "deployment.integration.action.cleanup" + CreateWebhookEventsEdgeConfigCreated CreateWebhookEvents = "edge-config.created" + CreateWebhookEventsEdgeConfigDeleted CreateWebhookEvents = "edge-config.deleted" + CreateWebhookEventsEdgeConfigItemsUpdated CreateWebhookEvents = "edge-config.items.updated" + CreateWebhookEventsFirewallAttack CreateWebhookEvents = "firewall.attack" + CreateWebhookEventsIntegrationConfigurationPermissionUpgraded CreateWebhookEvents = "integration-configuration.permission-upgraded" + CreateWebhookEventsIntegrationConfigurationRemoved CreateWebhookEvents = "integration-configuration.removed" + CreateWebhookEventsIntegrationConfigurationScopeChangeConfirmed CreateWebhookEvents = "integration-configuration.scope-change-confirmed" + CreateWebhookEventsIntegrationResourceProjectConnected CreateWebhookEvents = "integration-resource.project-connected" + CreateWebhookEventsIntegrationResourceProjectDisconnected CreateWebhookEvents = "integration-resource.project-disconnected" + CreateWebhookEventsProjectCreated CreateWebhookEvents = "project.created" + CreateWebhookEventsProjectRemoved CreateWebhookEvents = "project.removed" + CreateWebhookEventsDeploymentChecksCompletedLegacy CreateWebhookEvents = "deployment-checks-completed" + CreateWebhookEventsDeploymentReadyLegacy CreateWebhookEvents = "deployment-ready" + CreateWebhookEventsDeploymentPreparedLegacy CreateWebhookEvents = "deployment-prepared" + CreateWebhookEventsDeploymentErrorLegacy CreateWebhookEvents = "deployment-error" + CreateWebhookEventsDeploymentCheckRerequestedLegacy CreateWebhookEvents = "deployment-check-rerequested" + CreateWebhookEventsDeploymentCanceledLegacy CreateWebhookEvents = "deployment-canceled" + CreateWebhookEventsProjectCreatedLegacy CreateWebhookEvents = "project-created" + CreateWebhookEventsProjectRemovedLegacy CreateWebhookEvents = "project-removed" + CreateWebhookEventsDomainCreatedLegacy CreateWebhookEvents = "domain-created" + CreateWebhookEventsDeploymentLegacy CreateWebhookEvents = "deployment" + CreateWebhookEventsIntegrationConfigurationPermissionUpdatedLegacy CreateWebhookEvents = "integration-configuration-permission-updated" + CreateWebhookEventsIntegrationConfigurationRemovedLegacy CreateWebhookEvents = "integration-configuration-removed" + CreateWebhookEventsIntegrationConfigurationScopeChangeConfirmedLegacy CreateWebhookEvents = "integration-configuration-scope-change-confirmed" + CreateWebhookEventsMarketplaceInvoiceCreated CreateWebhookEvents = "marketplace.invoice.created" + CreateWebhookEventsMarketplaceInvoicePaid CreateWebhookEvents = "marketplace.invoice.paid" + CreateWebhookEventsMarketplaceInvoiceNotpaid CreateWebhookEvents = "marketplace.invoice.notpaid" + CreateWebhookEventsMarketplaceInvoiceRefunded CreateWebhookEvents = "marketplace.invoice.refunded" + CreateWebhookEventsObservabilityAnomaly CreateWebhookEvents = "observability.anomaly" + CreateWebhookEventsTestWebhook CreateWebhookEvents = "test-webhook" +) + +func (e CreateWebhookEvents) ToPointer() *CreateWebhookEvents { + return &e +} +func (e *CreateWebhookEvents) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "budget.reached": + fallthrough + case "budget.reset": + fallthrough + case "domain.created": + fallthrough + case "deployment.created": + fallthrough + case "deployment.error": + fallthrough + case "deployment.canceled": + fallthrough + case "deployment.succeeded": + fallthrough + case "deployment.ready": + fallthrough + case "deployment.check-rerequested": + fallthrough + case "deployment.promoted": + fallthrough + case "deployment.integration.action.start": + fallthrough + case "deployment.integration.action.cancel": + fallthrough + case "deployment.integration.action.cleanup": + fallthrough + case "edge-config.created": + fallthrough + case "edge-config.deleted": + fallthrough + case "edge-config.items.updated": + fallthrough + case "firewall.attack": + fallthrough + case "integration-configuration.permission-upgraded": + fallthrough + case "integration-configuration.removed": + fallthrough + case "integration-configuration.scope-change-confirmed": + fallthrough + case "integration-resource.project-connected": + fallthrough + case "integration-resource.project-disconnected": + fallthrough + case "project.created": + fallthrough + case "project.removed": + fallthrough + case "deployment-checks-completed": + fallthrough + case "deployment-ready": + fallthrough + case "deployment-prepared": + fallthrough + case "deployment-error": + fallthrough + case "deployment-check-rerequested": + fallthrough + case "deployment-canceled": + fallthrough + case "project-created": + fallthrough + case "project-removed": + fallthrough + case "domain-created": + fallthrough + case "deployment": + fallthrough + case "integration-configuration-permission-updated": + fallthrough + case "integration-configuration-removed": + fallthrough + case "integration-configuration-scope-change-confirmed": + fallthrough + case "marketplace.invoice.created": + fallthrough + case "marketplace.invoice.paid": + fallthrough + case "marketplace.invoice.notpaid": + fallthrough + case "marketplace.invoice.refunded": + fallthrough + case "observability.anomaly": + fallthrough + case "test-webhook": + *e = CreateWebhookEvents(v) + return nil + default: + return fmt.Errorf("invalid value for CreateWebhookEvents: %v", v) + } +} + +type CreateWebhookResponseBody struct { + // The webhook secret used to sign the payload + Secret string `json:"secret"` + // The webhooks events + Events []CreateWebhookEvents `json:"events"` + // The webhook id + ID string `json:"id"` + // A string with the URL of the webhook + URL string `json:"url"` + // The unique ID of the team the webhook belongs to + OwnerID string `json:"ownerId"` + // A number containing the date when the webhook was created in in milliseconds + CreatedAt float64 `json:"createdAt"` + // A number containing the date when the webhook was updated in in milliseconds + UpdatedAt float64 `json:"updatedAt"` + // The ID of the projects the webhook is associated with + ProjectIds []string `json:"projectIds,omitempty"` +} + +func (o *CreateWebhookResponseBody) GetSecret() string { + if o == nil { + return "" + } + return o.Secret +} + +func (o *CreateWebhookResponseBody) GetEvents() []CreateWebhookEvents { + if o == nil { + return []CreateWebhookEvents{} + } + return o.Events +} + +func (o *CreateWebhookResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CreateWebhookResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CreateWebhookResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *CreateWebhookResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *CreateWebhookResponseBody) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *CreateWebhookResponseBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +type CreateWebhookResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *CreateWebhookResponseBody +} + +func (o *CreateWebhookResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateWebhookResponse) GetObject() *CreateWebhookResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteaccessgroup.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteaccessgroup.go new file mode 100644 index 00000000..dc328345 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteaccessgroup.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteAccessGroupRequest struct { + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteAccessGroupRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *DeleteAccessGroupRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteAccessGroupRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteAccessGroupResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteAccessGroupResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteaccessgroupproject.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteaccessgroupproject.go new file mode 100644 index 00000000..b20f8e8f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteaccessgroupproject.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteAccessGroupProjectRequest struct { + AccessGroupIDOrName string `pathParam:"style=simple,explode=false,name=accessGroupIdOrName"` + ProjectID string `pathParam:"style=simple,explode=false,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteAccessGroupProjectRequest) GetAccessGroupIDOrName() string { + if o == nil { + return "" + } + return o.AccessGroupIDOrName +} + +func (o *DeleteAccessGroupProjectRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *DeleteAccessGroupProjectRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteAccessGroupProjectRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteAccessGroupProjectResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteAccessGroupProjectResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deletealias.go b/src/__tests__/mockserver/internal/sdk/models/operations/deletealias.go new file mode 100644 index 00000000..ebdeff80 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deletealias.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type DeleteAliasRequest struct { + // The ID or alias that will be removed + AliasID string `pathParam:"style=simple,explode=false,name=aliasId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteAliasRequest) GetAliasID() string { + if o == nil { + return "" + } + return o.AliasID +} + +func (o *DeleteAliasRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteAliasRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteAliasStatus string + +const ( + DeleteAliasStatusSuccess DeleteAliasStatus = "SUCCESS" +) + +func (e DeleteAliasStatus) ToPointer() *DeleteAliasStatus { + return &e +} +func (e *DeleteAliasStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "SUCCESS": + *e = DeleteAliasStatus(v) + return nil + default: + return fmt.Errorf("invalid value for DeleteAliasStatus: %v", v) + } +} + +// DeleteAliasResponseBody - The alias was successfully removed +type DeleteAliasResponseBody struct { + Status DeleteAliasStatus `json:"status"` +} + +func (o *DeleteAliasResponseBody) GetStatus() DeleteAliasStatus { + if o == nil { + return DeleteAliasStatus("") + } + return o.Status +} + +type DeleteAliasResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The alias was successfully removed + Object *DeleteAliasResponseBody +} + +func (o *DeleteAliasResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DeleteAliasResponse) GetObject() *DeleteAliasResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteauthtoken.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteauthtoken.go new file mode 100644 index 00000000..eb8a6cdd --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteauthtoken.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteAuthTokenRequest struct { + // The identifier of the token to invalidate. The special value \"current\" may be supplied, which invalidates the token that the HTTP request was authenticated with. + TokenID string `pathParam:"style=simple,explode=false,name=tokenId"` +} + +func (o *DeleteAuthTokenRequest) GetTokenID() string { + if o == nil { + return "" + } + return o.TokenID +} + +// DeleteAuthTokenResponseBody - Authentication token successfully deleted. +type DeleteAuthTokenResponseBody struct { + // The unique identifier of the token that was deleted. + TokenID string `json:"tokenId"` +} + +func (o *DeleteAuthTokenResponseBody) GetTokenID() string { + if o == nil { + return "" + } + return o.TokenID +} + +type DeleteAuthTokenResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Authentication token successfully deleted. + Object *DeleteAuthTokenResponseBody +} + +func (o *DeleteAuthTokenResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DeleteAuthTokenResponse) GetObject() *DeleteAuthTokenResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteconfigurablelogdrain.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteconfigurablelogdrain.go new file mode 100644 index 00000000..6892faf8 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteconfigurablelogdrain.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteConfigurableLogDrainRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteConfigurableLogDrainRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *DeleteConfigurableLogDrainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteConfigurableLogDrainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteConfigurableLogDrainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteConfigurableLogDrainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteconfiguration.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteconfiguration.go new file mode 100644 index 00000000..b982d80c --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteconfiguration.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteConfigurationRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteConfigurationRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *DeleteConfigurationRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteConfigurationRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteConfigurationResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteConfigurationResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deletedeployment.go b/src/__tests__/mockserver/internal/sdk/models/operations/deletedeployment.go new file mode 100644 index 00000000..53f6b673 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deletedeployment.go @@ -0,0 +1,114 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type DeleteDeploymentRequest struct { + // The ID of the deployment to be deleted + ID string `pathParam:"style=simple,explode=false,name=id"` + // A Deployment or Alias URL. In case it is passed, the ID will be ignored + URL *string `queryParam:"style=form,explode=true,name=url"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteDeploymentRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *DeleteDeploymentRequest) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *DeleteDeploymentRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteDeploymentRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// DeleteDeploymentState - A constant with the final state of the deployment. +type DeleteDeploymentState string + +const ( + DeleteDeploymentStateDeleted DeleteDeploymentState = "DELETED" +) + +func (e DeleteDeploymentState) ToPointer() *DeleteDeploymentState { + return &e +} +func (e *DeleteDeploymentState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DELETED": + *e = DeleteDeploymentState(v) + return nil + default: + return fmt.Errorf("invalid value for DeleteDeploymentState: %v", v) + } +} + +// DeleteDeploymentResponseBody - The deployment was successfully deleted +type DeleteDeploymentResponseBody struct { + // The removed deployment ID. + UID string `json:"uid"` + // A constant with the final state of the deployment. + State DeleteDeploymentState `json:"state"` +} + +func (o *DeleteDeploymentResponseBody) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *DeleteDeploymentResponseBody) GetState() DeleteDeploymentState { + if o == nil { + return DeleteDeploymentState("") + } + return o.State +} + +type DeleteDeploymentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The deployment was successfully deleted + Object *DeleteDeploymentResponseBody +} + +func (o *DeleteDeploymentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DeleteDeploymentResponse) GetObject() *DeleteDeploymentResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deletedomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/deletedomain.go new file mode 100644 index 00000000..79bf98cd --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deletedomain.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteDomainRequest struct { + // The name of the domain. + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteDomainRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *DeleteDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// DeleteDomainResponseBody - Successful response removing a domain. +type DeleteDomainResponseBody struct { + // The id of the newly created DNS record + UID string `json:"uid"` +} + +func (o *DeleteDomainResponseBody) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +type DeleteDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response removing a domain. + Object *DeleteDomainResponseBody +} + +func (o *DeleteDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DeleteDomainResponse) GetObject() *DeleteDomainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfig.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfig.go new file mode 100644 index 00000000..b1ab3660 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfig.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteEdgeConfigRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteEdgeConfigRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *DeleteEdgeConfigRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteEdgeConfigRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteEdgeConfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteEdgeConfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfigschema.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfigschema.go new file mode 100644 index 00000000..c07146cf --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfigschema.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteEdgeConfigSchemaRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteEdgeConfigSchemaRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *DeleteEdgeConfigSchemaRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteEdgeConfigSchemaRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteEdgeConfigSchemaResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteEdgeConfigSchemaResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfigtokens.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfigtokens.go new file mode 100644 index 00000000..416c70cf --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteedgeconfigtokens.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteEdgeConfigTokensRequestBody struct { + Tokens []string `json:"tokens"` +} + +func (o *DeleteEdgeConfigTokensRequestBody) GetTokens() []string { + if o == nil { + return []string{} + } + return o.Tokens +} + +type DeleteEdgeConfigTokensRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody DeleteEdgeConfigTokensRequestBody `request:"mediaType=application/json"` +} + +func (o *DeleteEdgeConfigTokensRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *DeleteEdgeConfigTokensRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteEdgeConfigTokensRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *DeleteEdgeConfigTokensRequest) GetRequestBody() DeleteEdgeConfigTokensRequestBody { + if o == nil { + return DeleteEdgeConfigTokensRequestBody{} + } + return o.RequestBody +} + +type DeleteEdgeConfigTokensResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteEdgeConfigTokensResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteintegrationlogdrain.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteintegrationlogdrain.go new file mode 100644 index 00000000..7f590fa7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteintegrationlogdrain.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteIntegrationLogDrainRequest struct { + // ID of the log drain to be deleted + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteIntegrationLogDrainRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *DeleteIntegrationLogDrainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteIntegrationLogDrainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteIntegrationLogDrainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteIntegrationLogDrainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteproject.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteproject.go new file mode 100644 index 00000000..efd0524a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteproject.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteProjectRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteProjectRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *DeleteProjectRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteProjectRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteProjectResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteProjectResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteteam.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteteam.go new file mode 100644 index 00000000..21f2410e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteteam.go @@ -0,0 +1,121 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +// Reasons - An object describing the reason why the team is being deleted. +type Reasons struct { + // Idenitifier slug of the reason why the team is being deleted. + Slug string `json:"slug"` + // Description of the reason why the team is being deleted. + Description string `json:"description"` +} + +func (o *Reasons) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *Reasons) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +type DeleteTeamRequestBody struct { + // Optional array of objects that describe the reason why the team is being deleted. + Reasons []Reasons `json:"reasons,omitempty"` +} + +func (o *DeleteTeamRequestBody) GetReasons() []Reasons { + if o == nil { + return nil + } + return o.Reasons +} + +type DeleteTeamRequest struct { + // Id of the team to be set as the new default team + NewDefaultTeamID *string `queryParam:"style=form,explode=true,name=newDefaultTeamId"` + // The Team identifier to perform the request on behalf of. + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody DeleteTeamRequestBody `request:"mediaType=application/json"` +} + +func (o *DeleteTeamRequest) GetNewDefaultTeamID() *string { + if o == nil { + return nil + } + return o.NewDefaultTeamID +} + +func (o *DeleteTeamRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *DeleteTeamRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *DeleteTeamRequest) GetRequestBody() DeleteTeamRequestBody { + if o == nil { + return DeleteTeamRequestBody{} + } + return o.RequestBody +} + +// DeleteTeamResponseBody - The Team was successfully deleted +type DeleteTeamResponseBody struct { + // The ID of the deleted Team + ID string `json:"id"` + // Signifies whether the default team update has failed, when newDefaultTeamId is provided in request query. + NewDefaultTeamIDError *bool `json:"newDefaultTeamIdError,omitempty"` +} + +func (o *DeleteTeamResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *DeleteTeamResponseBody) GetNewDefaultTeamIDError() *bool { + if o == nil { + return nil + } + return o.NewDefaultTeamIDError +} + +type DeleteTeamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The Team was successfully deleted + Object *DeleteTeamResponseBody +} + +func (o *DeleteTeamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DeleteTeamResponse) GetObject() *DeleteTeamResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deleteteaminvitecode.go b/src/__tests__/mockserver/internal/sdk/models/operations/deleteteaminvitecode.go new file mode 100644 index 00000000..a69ecbb9 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deleteteaminvitecode.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteTeamInviteCodeRequest struct { + // The Team invite code ID. + InviteID string `pathParam:"style=simple,explode=false,name=inviteId"` + // The Team identifier to perform the request on behalf of. + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` +} + +func (o *DeleteTeamInviteCodeRequest) GetInviteID() string { + if o == nil { + return "" + } + return o.InviteID +} + +func (o *DeleteTeamInviteCodeRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +// DeleteTeamInviteCodeResponseBody - Successfully deleted Team invite code. +type DeleteTeamInviteCodeResponseBody struct { + // ID of the team. + ID string `json:"id"` +} + +func (o *DeleteTeamInviteCodeResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type DeleteTeamInviteCodeResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successfully deleted Team invite code. + Object *DeleteTeamInviteCodeResponseBody +} + +func (o *DeleteTeamInviteCodeResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DeleteTeamInviteCodeResponse) GetObject() *DeleteTeamInviteCodeResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deletev9projectsidornamecustomenvironmentsenvironmentslugorid.go b/src/__tests__/mockserver/internal/sdk/models/operations/deletev9projectsidornamecustomenvironmentsenvironmentslugorid.go new file mode 100644 index 00000000..b9504743 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deletev9projectsidornamecustomenvironmentsenvironmentslugorid.go @@ -0,0 +1,88 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody struct { + // Delete Environment Variables that are not assigned to any environments. + DeleteUnassignedEnvironmentVariables *bool `json:"deleteUnassignedEnvironmentVariables,omitempty"` +} + +func (o *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody) GetDeleteUnassignedEnvironmentVariables() *bool { + if o == nil { + return nil + } + return o.DeleteUnassignedEnvironmentVariables +} + +type DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The unique custom environment identifier within the project + EnvironmentSlugOrID string `pathParam:"style=simple,explode=false,name=environmentSlugOrId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody `request:"mediaType=application/json"` +} + +func (o *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetEnvironmentSlugOrID() string { + if o == nil { + return "" + } + return o.EnvironmentSlugOrID +} + +func (o *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetRequestBody() *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody { + if o == nil { + return nil + } + return o.RequestBody +} + +type DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody struct { +} + +type DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody +} + +func (o *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse) GetObject() *DeleteV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/deletewebhook.go b/src/__tests__/mockserver/internal/sdk/models/operations/deletewebhook.go new file mode 100644 index 00000000..50c477f3 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/deletewebhook.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteWebhookRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DeleteWebhookRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *DeleteWebhookRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DeleteWebhookRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DeleteWebhookResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteWebhookResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/downloadartifact.go b/src/__tests__/mockserver/internal/sdk/models/operations/downloadartifact.go new file mode 100644 index 00000000..bfbf9fce --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/downloadartifact.go @@ -0,0 +1,77 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "io" + "mockserver/internal/sdk/models/components" +) + +type DownloadArtifactRequest struct { + // The continuous integration or delivery environment where this artifact is downloaded. + XArtifactClientCi *string `header:"style=simple,explode=false,name=x-artifact-client-ci"` + // 1 if the client is an interactive shell. Otherwise 0 + XArtifactClientInteractive *int64 `header:"style=simple,explode=false,name=x-artifact-client-interactive"` + // The artifact hash + Hash string `pathParam:"style=simple,explode=false,name=hash"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *DownloadArtifactRequest) GetXArtifactClientCi() *string { + if o == nil { + return nil + } + return o.XArtifactClientCi +} + +func (o *DownloadArtifactRequest) GetXArtifactClientInteractive() *int64 { + if o == nil { + return nil + } + return o.XArtifactClientInteractive +} + +func (o *DownloadArtifactRequest) GetHash() string { + if o == nil { + return "" + } + return o.Hash +} + +func (o *DownloadArtifactRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *DownloadArtifactRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type DownloadArtifactResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The artifact was found and is downloaded as a stream. Content-Length should be verified. + // The Close method must be called on this field, even if it is not used, to prevent resource leaks. + ResponseStream io.ReadCloser +} + +func (o *DownloadArtifactResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DownloadArtifactResponse) GetResponseStream() io.ReadCloser { + if o == nil { + return nil + } + return o.ResponseStream +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/editprojectenv.go b/src/__tests__/mockserver/internal/sdk/models/operations/editprojectenv.go new file mode 100644 index 00000000..4871d5eb --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/editprojectenv.go @@ -0,0 +1,1607 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type EditProjectEnvTarget string + +const ( + EditProjectEnvTargetProduction EditProjectEnvTarget = "production" + EditProjectEnvTargetPreview EditProjectEnvTarget = "preview" + EditProjectEnvTargetDevelopment EditProjectEnvTarget = "development" +) + +func (e EditProjectEnvTarget) ToPointer() *EditProjectEnvTarget { + return &e +} +func (e *EditProjectEnvTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = EditProjectEnvTarget(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvTarget: %v", v) + } +} + +// EditProjectEnvType - The type of environment variable +type EditProjectEnvType string + +const ( + EditProjectEnvTypeSystem EditProjectEnvType = "system" + EditProjectEnvTypeSecret EditProjectEnvType = "secret" + EditProjectEnvTypeEncrypted EditProjectEnvType = "encrypted" + EditProjectEnvTypePlain EditProjectEnvType = "plain" + EditProjectEnvTypeSensitive EditProjectEnvType = "sensitive" +) + +func (e EditProjectEnvType) ToPointer() *EditProjectEnvType { + return &e +} +func (e *EditProjectEnvType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "secret": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + *e = EditProjectEnvType(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvType: %v", v) + } +} + +type EditProjectEnvRequestBody struct { + // The name of the environment variable + Key *string `json:"key,omitempty"` + // The target environment of the environment variable + Target []EditProjectEnvTarget `json:"target,omitempty"` + // If defined, the git branch of the environment variable (must have target=preview) + GitBranch *string `json:"gitBranch,omitempty"` + // The type of environment variable + Type *EditProjectEnvType `json:"type,omitempty"` + // The value of the environment variable + Value *string `json:"value,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + // A comment to add context on what this env var is for + Comment *string `json:"comment,omitempty"` +} + +func (o *EditProjectEnvRequestBody) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *EditProjectEnvRequestBody) GetTarget() []EditProjectEnvTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *EditProjectEnvRequestBody) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *EditProjectEnvRequestBody) GetType() *EditProjectEnvType { + if o == nil { + return nil + } + return o.Type +} + +func (o *EditProjectEnvRequestBody) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *EditProjectEnvRequestBody) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *EditProjectEnvRequestBody) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +type EditProjectEnvRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The unique environment variable identifier + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody EditProjectEnvRequestBody `request:"mediaType=application/json"` +} + +func (o *EditProjectEnvRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *EditProjectEnvRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *EditProjectEnvRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *EditProjectEnvRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *EditProjectEnvRequest) GetRequestBody() EditProjectEnvRequestBody { + if o == nil { + return EditProjectEnvRequestBody{} + } + return o.RequestBody +} + +type EditProjectEnvResponseBody2 struct { +} + +type EditProjectEnvTarget2 string + +const ( + EditProjectEnvTarget2Production EditProjectEnvTarget2 = "production" + EditProjectEnvTarget2Preview EditProjectEnvTarget2 = "preview" + EditProjectEnvTarget2Development EditProjectEnvTarget2 = "development" +) + +func (e EditProjectEnvTarget2) ToPointer() *EditProjectEnvTarget2 { + return &e +} +func (e *EditProjectEnvTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = EditProjectEnvTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvTarget2: %v", v) + } +} + +type EditProjectEnvResponseBodyTargetType string + +const ( + EditProjectEnvResponseBodyTargetTypeArrayOfStr EditProjectEnvResponseBodyTargetType = "arrayOfStr" + EditProjectEnvResponseBodyTargetTypeEditProjectEnvTarget2 EditProjectEnvResponseBodyTargetType = "editProjectEnv_target_2" +) + +type EditProjectEnvResponseBodyTarget struct { + ArrayOfStr []string + EditProjectEnvTarget2 *EditProjectEnvTarget2 + + Type EditProjectEnvResponseBodyTargetType +} + +func CreateEditProjectEnvResponseBodyTargetArrayOfStr(arrayOfStr []string) EditProjectEnvResponseBodyTarget { + typ := EditProjectEnvResponseBodyTargetTypeArrayOfStr + + return EditProjectEnvResponseBodyTarget{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyTargetEditProjectEnvTarget2(editProjectEnvTarget2 EditProjectEnvTarget2) EditProjectEnvResponseBodyTarget { + typ := EditProjectEnvResponseBodyTargetTypeEditProjectEnvTarget2 + + return EditProjectEnvResponseBodyTarget{ + EditProjectEnvTarget2: &editProjectEnvTarget2, + Type: typ, + } +} + +func (u *EditProjectEnvResponseBodyTarget) UnmarshalJSON(data []byte) error { + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = EditProjectEnvResponseBodyTargetTypeArrayOfStr + return nil + } + + var editProjectEnvTarget2 EditProjectEnvTarget2 = EditProjectEnvTarget2("") + if err := utils.UnmarshalJSON(data, &editProjectEnvTarget2, "", true, true); err == nil { + u.EditProjectEnvTarget2 = &editProjectEnvTarget2 + u.Type = EditProjectEnvResponseBodyTargetTypeEditProjectEnvTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for EditProjectEnvResponseBodyTarget", string(data)) +} + +func (u EditProjectEnvResponseBodyTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.EditProjectEnvTarget2 != nil { + return utils.MarshalJSON(u.EditProjectEnvTarget2, "", true) + } + + return nil, errors.New("could not marshal union type EditProjectEnvResponseBodyTarget: all fields are null") +} + +type EditProjectEnvResponseBodyType string + +const ( + EditProjectEnvResponseBodyTypeSystem EditProjectEnvResponseBodyType = "system" + EditProjectEnvResponseBodyTypeEncrypted EditProjectEnvResponseBodyType = "encrypted" + EditProjectEnvResponseBodyTypePlain EditProjectEnvResponseBodyType = "plain" + EditProjectEnvResponseBodyTypeSensitive EditProjectEnvResponseBodyType = "sensitive" + EditProjectEnvResponseBodyTypeSecret EditProjectEnvResponseBodyType = "secret" +) + +func (e EditProjectEnvResponseBodyType) ToPointer() *EditProjectEnvResponseBodyType { + return &e +} +func (e *EditProjectEnvResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = EditProjectEnvResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvResponseBodyType: %v", v) + } +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115TypeFlagsConnectionString EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type = "flags-connection-string" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type: %v", v) + } +} + +type EditProjectEnvContentHint15 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *EditProjectEnvContentHint15) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114TypeIntegrationStoreSecret EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type = "integration-store-secret" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type: %v", v) + } +} + +type EditProjectEnvContentHint14 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *EditProjectEnvContentHint14) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *EditProjectEnvContentHint14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *EditProjectEnvContentHint14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *EditProjectEnvContentHint14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113TypePostgresURLNoSsl EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type = "postgres-url-no-ssl" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type: %v", v) + } +} + +type EditProjectEnvContentHint13 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint13) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112TypePostgresDatabase EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type = "postgres-database" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type: %v", v) + } +} + +type EditProjectEnvContentHint12 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint12) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111TypePostgresPassword EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type = "postgres-password" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type: %v", v) + } +} + +type EditProjectEnvContentHint11 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint11) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110TypePostgresHost EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type = "postgres-host" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type: %v", v) + } +} + +type EditProjectEnvContentHint10 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint10) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19TypePostgresUser EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type = "postgres-user" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type: %v", v) + } +} + +type EditProjectEnvContentHint9 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint9) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18TypePostgresPrismaURL EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type = "postgres-prisma-url" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type: %v", v) + } +} + +type EditProjectEnvContentHint8 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint8) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1TypePostgresURLNonPooling EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type = "postgres-url-non-pooling" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type: %v", v) + } +} + +type EditProjectEnvContentHint7 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint7) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyTypePostgresURL EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType = "postgres-url" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type EditProjectEnvContentHint6 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint6) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200ApplicationJSONType string + +const ( + EditProjectEnvContentHintProjectsResponse200ApplicationJSONTypeBlobReadWriteToken EditProjectEnvContentHintProjectsResponse200ApplicationJSONType = "blob-read-write-token" +) + +func (e EditProjectEnvContentHintProjectsResponse200ApplicationJSONType) ToPointer() *EditProjectEnvContentHintProjectsResponse200ApplicationJSONType { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = EditProjectEnvContentHintProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type EditProjectEnvContentHint5 struct { + Type EditProjectEnvContentHintProjectsResponse200ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint5) GetType() EditProjectEnvContentHintProjectsResponse200ApplicationJSONType { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponse200Type string + +const ( + EditProjectEnvContentHintProjectsResponse200TypeRedisRestAPIReadOnlyToken EditProjectEnvContentHintProjectsResponse200Type = "redis-rest-api-read-only-token" +) + +func (e EditProjectEnvContentHintProjectsResponse200Type) ToPointer() *EditProjectEnvContentHintProjectsResponse200Type { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = EditProjectEnvContentHintProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponse200Type: %v", v) + } +} + +type EditProjectEnvContentHint4 struct { + Type EditProjectEnvContentHintProjectsResponse200Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint4) GetType() EditProjectEnvContentHintProjectsResponse200Type { + if o == nil { + return EditProjectEnvContentHintProjectsResponse200Type("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsResponseType string + +const ( + EditProjectEnvContentHintProjectsResponseTypeRedisRestAPIToken EditProjectEnvContentHintProjectsResponseType = "redis-rest-api-token" +) + +func (e EditProjectEnvContentHintProjectsResponseType) ToPointer() *EditProjectEnvContentHintProjectsResponseType { + return &e +} +func (e *EditProjectEnvContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = EditProjectEnvContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsResponseType: %v", v) + } +} + +type EditProjectEnvContentHint3 struct { + Type EditProjectEnvContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint3) GetType() EditProjectEnvContentHintProjectsResponseType { + if o == nil { + return EditProjectEnvContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintProjectsType string + +const ( + EditProjectEnvContentHintProjectsTypeRedisRestAPIURL EditProjectEnvContentHintProjectsType = "redis-rest-api-url" +) + +func (e EditProjectEnvContentHintProjectsType) ToPointer() *EditProjectEnvContentHintProjectsType { + return &e +} +func (e *EditProjectEnvContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = EditProjectEnvContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintProjectsType: %v", v) + } +} + +type EditProjectEnvContentHint2 struct { + Type EditProjectEnvContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint2) GetType() EditProjectEnvContentHintProjectsType { + if o == nil { + return EditProjectEnvContentHintProjectsType("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvContentHintType string + +const ( + EditProjectEnvContentHintTypeRedisURL EditProjectEnvContentHintType = "redis-url" +) + +func (e EditProjectEnvContentHintType) ToPointer() *EditProjectEnvContentHintType { + return &e +} +func (e *EditProjectEnvContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = EditProjectEnvContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvContentHintType: %v", v) + } +} + +type EditProjectEnvContentHint1 struct { + Type EditProjectEnvContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *EditProjectEnvContentHint1) GetType() EditProjectEnvContentHintType { + if o == nil { + return EditProjectEnvContentHintType("") + } + return o.Type +} + +func (o *EditProjectEnvContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type EditProjectEnvResponseBodyContentHintType string + +const ( + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint1 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_1" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint2 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_2" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint3 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_3" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint4 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_4" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint5 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_5" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint6 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_6" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint7 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_7" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint8 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_8" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint9 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_9" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint10 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_10" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint11 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_11" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint12 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_12" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint13 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_13" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint14 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_14" + EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint15 EditProjectEnvResponseBodyContentHintType = "editProjectEnv_contentHint_15" +) + +type EditProjectEnvResponseBodyContentHint struct { + EditProjectEnvContentHint1 *EditProjectEnvContentHint1 + EditProjectEnvContentHint2 *EditProjectEnvContentHint2 + EditProjectEnvContentHint3 *EditProjectEnvContentHint3 + EditProjectEnvContentHint4 *EditProjectEnvContentHint4 + EditProjectEnvContentHint5 *EditProjectEnvContentHint5 + EditProjectEnvContentHint6 *EditProjectEnvContentHint6 + EditProjectEnvContentHint7 *EditProjectEnvContentHint7 + EditProjectEnvContentHint8 *EditProjectEnvContentHint8 + EditProjectEnvContentHint9 *EditProjectEnvContentHint9 + EditProjectEnvContentHint10 *EditProjectEnvContentHint10 + EditProjectEnvContentHint11 *EditProjectEnvContentHint11 + EditProjectEnvContentHint12 *EditProjectEnvContentHint12 + EditProjectEnvContentHint13 *EditProjectEnvContentHint13 + EditProjectEnvContentHint14 *EditProjectEnvContentHint14 + EditProjectEnvContentHint15 *EditProjectEnvContentHint15 + + Type EditProjectEnvResponseBodyContentHintType +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint1(editProjectEnvContentHint1 EditProjectEnvContentHint1) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint1 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint1: &editProjectEnvContentHint1, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint2(editProjectEnvContentHint2 EditProjectEnvContentHint2) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint2 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint2: &editProjectEnvContentHint2, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint3(editProjectEnvContentHint3 EditProjectEnvContentHint3) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint3 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint3: &editProjectEnvContentHint3, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint4(editProjectEnvContentHint4 EditProjectEnvContentHint4) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint4 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint4: &editProjectEnvContentHint4, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint5(editProjectEnvContentHint5 EditProjectEnvContentHint5) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint5 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint5: &editProjectEnvContentHint5, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint6(editProjectEnvContentHint6 EditProjectEnvContentHint6) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint6 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint6: &editProjectEnvContentHint6, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint7(editProjectEnvContentHint7 EditProjectEnvContentHint7) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint7 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint7: &editProjectEnvContentHint7, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint8(editProjectEnvContentHint8 EditProjectEnvContentHint8) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint8 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint8: &editProjectEnvContentHint8, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint9(editProjectEnvContentHint9 EditProjectEnvContentHint9) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint9 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint9: &editProjectEnvContentHint9, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint10(editProjectEnvContentHint10 EditProjectEnvContentHint10) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint10 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint10: &editProjectEnvContentHint10, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint11(editProjectEnvContentHint11 EditProjectEnvContentHint11) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint11 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint11: &editProjectEnvContentHint11, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint12(editProjectEnvContentHint12 EditProjectEnvContentHint12) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint12 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint12: &editProjectEnvContentHint12, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint13(editProjectEnvContentHint13 EditProjectEnvContentHint13) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint13 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint13: &editProjectEnvContentHint13, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint14(editProjectEnvContentHint14 EditProjectEnvContentHint14) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint14 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint14: &editProjectEnvContentHint14, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyContentHintEditProjectEnvContentHint15(editProjectEnvContentHint15 EditProjectEnvContentHint15) EditProjectEnvResponseBodyContentHint { + typ := EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint15 + + return EditProjectEnvResponseBodyContentHint{ + EditProjectEnvContentHint15: &editProjectEnvContentHint15, + Type: typ, + } +} + +func (u *EditProjectEnvResponseBodyContentHint) UnmarshalJSON(data []byte) error { + + var editProjectEnvContentHint7 EditProjectEnvContentHint7 = EditProjectEnvContentHint7{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint7, "", true, true); err == nil { + u.EditProjectEnvContentHint7 = &editProjectEnvContentHint7 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint7 + return nil + } + + var editProjectEnvContentHint9 EditProjectEnvContentHint9 = EditProjectEnvContentHint9{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint9, "", true, true); err == nil { + u.EditProjectEnvContentHint9 = &editProjectEnvContentHint9 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint9 + return nil + } + + var editProjectEnvContentHint3 EditProjectEnvContentHint3 = EditProjectEnvContentHint3{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint3, "", true, true); err == nil { + u.EditProjectEnvContentHint3 = &editProjectEnvContentHint3 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint3 + return nil + } + + var editProjectEnvContentHint4 EditProjectEnvContentHint4 = EditProjectEnvContentHint4{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint4, "", true, true); err == nil { + u.EditProjectEnvContentHint4 = &editProjectEnvContentHint4 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint4 + return nil + } + + var editProjectEnvContentHint5 EditProjectEnvContentHint5 = EditProjectEnvContentHint5{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint5, "", true, true); err == nil { + u.EditProjectEnvContentHint5 = &editProjectEnvContentHint5 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint5 + return nil + } + + var editProjectEnvContentHint6 EditProjectEnvContentHint6 = EditProjectEnvContentHint6{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint6, "", true, true); err == nil { + u.EditProjectEnvContentHint6 = &editProjectEnvContentHint6 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint6 + return nil + } + + var editProjectEnvContentHint2 EditProjectEnvContentHint2 = EditProjectEnvContentHint2{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint2, "", true, true); err == nil { + u.EditProjectEnvContentHint2 = &editProjectEnvContentHint2 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint2 + return nil + } + + var editProjectEnvContentHint8 EditProjectEnvContentHint8 = EditProjectEnvContentHint8{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint8, "", true, true); err == nil { + u.EditProjectEnvContentHint8 = &editProjectEnvContentHint8 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint8 + return nil + } + + var editProjectEnvContentHint1 EditProjectEnvContentHint1 = EditProjectEnvContentHint1{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint1, "", true, true); err == nil { + u.EditProjectEnvContentHint1 = &editProjectEnvContentHint1 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint1 + return nil + } + + var editProjectEnvContentHint10 EditProjectEnvContentHint10 = EditProjectEnvContentHint10{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint10, "", true, true); err == nil { + u.EditProjectEnvContentHint10 = &editProjectEnvContentHint10 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint10 + return nil + } + + var editProjectEnvContentHint11 EditProjectEnvContentHint11 = EditProjectEnvContentHint11{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint11, "", true, true); err == nil { + u.EditProjectEnvContentHint11 = &editProjectEnvContentHint11 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint11 + return nil + } + + var editProjectEnvContentHint12 EditProjectEnvContentHint12 = EditProjectEnvContentHint12{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint12, "", true, true); err == nil { + u.EditProjectEnvContentHint12 = &editProjectEnvContentHint12 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint12 + return nil + } + + var editProjectEnvContentHint13 EditProjectEnvContentHint13 = EditProjectEnvContentHint13{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint13, "", true, true); err == nil { + u.EditProjectEnvContentHint13 = &editProjectEnvContentHint13 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint13 + return nil + } + + var editProjectEnvContentHint15 EditProjectEnvContentHint15 = EditProjectEnvContentHint15{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint15, "", true, true); err == nil { + u.EditProjectEnvContentHint15 = &editProjectEnvContentHint15 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint15 + return nil + } + + var editProjectEnvContentHint14 EditProjectEnvContentHint14 = EditProjectEnvContentHint14{} + if err := utils.UnmarshalJSON(data, &editProjectEnvContentHint14, "", true, true); err == nil { + u.EditProjectEnvContentHint14 = &editProjectEnvContentHint14 + u.Type = EditProjectEnvResponseBodyContentHintTypeEditProjectEnvContentHint14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for EditProjectEnvResponseBodyContentHint", string(data)) +} + +func (u EditProjectEnvResponseBodyContentHint) MarshalJSON() ([]byte, error) { + if u.EditProjectEnvContentHint1 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint1, "", true) + } + + if u.EditProjectEnvContentHint2 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint2, "", true) + } + + if u.EditProjectEnvContentHint3 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint3, "", true) + } + + if u.EditProjectEnvContentHint4 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint4, "", true) + } + + if u.EditProjectEnvContentHint5 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint5, "", true) + } + + if u.EditProjectEnvContentHint6 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint6, "", true) + } + + if u.EditProjectEnvContentHint7 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint7, "", true) + } + + if u.EditProjectEnvContentHint8 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint8, "", true) + } + + if u.EditProjectEnvContentHint9 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint9, "", true) + } + + if u.EditProjectEnvContentHint10 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint10, "", true) + } + + if u.EditProjectEnvContentHint11 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint11, "", true) + } + + if u.EditProjectEnvContentHint12 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint12, "", true) + } + + if u.EditProjectEnvContentHint13 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint13, "", true) + } + + if u.EditProjectEnvContentHint14 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint14, "", true) + } + + if u.EditProjectEnvContentHint15 != nil { + return utils.MarshalJSON(u.EditProjectEnvContentHint15, "", true) + } + + return nil, errors.New("could not marshal union type EditProjectEnvResponseBodyContentHint: all fields are null") +} + +type EditProjectEnvResponseBodyProjectsType string + +const ( + EditProjectEnvResponseBodyProjectsTypeFlagsSecret EditProjectEnvResponseBodyProjectsType = "flags-secret" +) + +func (e EditProjectEnvResponseBodyProjectsType) ToPointer() *EditProjectEnvResponseBodyProjectsType { + return &e +} +func (e *EditProjectEnvResponseBodyProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = EditProjectEnvResponseBodyProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for EditProjectEnvResponseBodyProjectsType: %v", v) + } +} + +// EditProjectEnvResponseBodyInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type EditProjectEnvResponseBodyInternalContentHint struct { + Type EditProjectEnvResponseBodyProjectsType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *EditProjectEnvResponseBodyInternalContentHint) GetType() EditProjectEnvResponseBodyProjectsType { + if o == nil { + return EditProjectEnvResponseBodyProjectsType("") + } + return o.Type +} + +func (o *EditProjectEnvResponseBodyInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type EditProjectEnvResponseBody1 struct { + Target *EditProjectEnvResponseBodyTarget `json:"target,omitempty"` + Type EditProjectEnvResponseBodyType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *EditProjectEnvResponseBodyContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *EditProjectEnvResponseBodyInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` +} + +func (o *EditProjectEnvResponseBody1) GetTarget() *EditProjectEnvResponseBodyTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *EditProjectEnvResponseBody1) GetType() EditProjectEnvResponseBodyType { + if o == nil { + return EditProjectEnvResponseBodyType("") + } + return o.Type +} + +func (o *EditProjectEnvResponseBody1) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *EditProjectEnvResponseBody1) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *EditProjectEnvResponseBody1) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *EditProjectEnvResponseBody1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *EditProjectEnvResponseBody1) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *EditProjectEnvResponseBody1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *EditProjectEnvResponseBody1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *EditProjectEnvResponseBody1) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *EditProjectEnvResponseBody1) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *EditProjectEnvResponseBody1) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *EditProjectEnvResponseBody1) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *EditProjectEnvResponseBody1) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *EditProjectEnvResponseBody1) GetContentHint() *EditProjectEnvResponseBodyContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *EditProjectEnvResponseBody1) GetInternalContentHint() *EditProjectEnvResponseBodyInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *EditProjectEnvResponseBody1) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *EditProjectEnvResponseBody1) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *EditProjectEnvResponseBody1) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +type EditProjectEnvResponseBodyUnionType string + +const ( + EditProjectEnvResponseBodyUnionTypeEditProjectEnvResponseBody1 EditProjectEnvResponseBodyUnionType = "editProjectEnv_responseBody_1" + EditProjectEnvResponseBodyUnionTypeEditProjectEnvResponseBody2 EditProjectEnvResponseBodyUnionType = "editProjectEnv_responseBody_2" +) + +// EditProjectEnvResponseBody - The environment variable was successfully edited +type EditProjectEnvResponseBody struct { + EditProjectEnvResponseBody1 *EditProjectEnvResponseBody1 + EditProjectEnvResponseBody2 *EditProjectEnvResponseBody2 + + Type EditProjectEnvResponseBodyUnionType +} + +func CreateEditProjectEnvResponseBodyEditProjectEnvResponseBody1(editProjectEnvResponseBody1 EditProjectEnvResponseBody1) EditProjectEnvResponseBody { + typ := EditProjectEnvResponseBodyUnionTypeEditProjectEnvResponseBody1 + + return EditProjectEnvResponseBody{ + EditProjectEnvResponseBody1: &editProjectEnvResponseBody1, + Type: typ, + } +} + +func CreateEditProjectEnvResponseBodyEditProjectEnvResponseBody2(editProjectEnvResponseBody2 EditProjectEnvResponseBody2) EditProjectEnvResponseBody { + typ := EditProjectEnvResponseBodyUnionTypeEditProjectEnvResponseBody2 + + return EditProjectEnvResponseBody{ + EditProjectEnvResponseBody2: &editProjectEnvResponseBody2, + Type: typ, + } +} + +func (u *EditProjectEnvResponseBody) UnmarshalJSON(data []byte) error { + + var editProjectEnvResponseBody2 EditProjectEnvResponseBody2 = EditProjectEnvResponseBody2{} + if err := utils.UnmarshalJSON(data, &editProjectEnvResponseBody2, "", true, true); err == nil { + u.EditProjectEnvResponseBody2 = &editProjectEnvResponseBody2 + u.Type = EditProjectEnvResponseBodyUnionTypeEditProjectEnvResponseBody2 + return nil + } + + var editProjectEnvResponseBody1 EditProjectEnvResponseBody1 = EditProjectEnvResponseBody1{} + if err := utils.UnmarshalJSON(data, &editProjectEnvResponseBody1, "", true, true); err == nil { + u.EditProjectEnvResponseBody1 = &editProjectEnvResponseBody1 + u.Type = EditProjectEnvResponseBodyUnionTypeEditProjectEnvResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for EditProjectEnvResponseBody", string(data)) +} + +func (u EditProjectEnvResponseBody) MarshalJSON() ([]byte, error) { + if u.EditProjectEnvResponseBody1 != nil { + return utils.MarshalJSON(u.EditProjectEnvResponseBody1, "", true) + } + + if u.EditProjectEnvResponseBody2 != nil { + return utils.MarshalJSON(u.EditProjectEnvResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type EditProjectEnvResponseBody: all fields are null") +} + +type EditProjectEnvResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The environment variable was successfully edited + OneOf *EditProjectEnvResponseBody +} + +func (o *EditProjectEnvResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *EditProjectEnvResponse) GetOneOf() *EditProjectEnvResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/exchangessotoken.go b/src/__tests__/mockserver/internal/sdk/models/operations/exchangessotoken.go new file mode 100644 index 00000000..da59ebfa --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/exchangessotoken.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ExchangeSsoTokenRequestBody struct { + // The sensitive code received from Vercel + Code string `json:"code"` + // The state received from the initialization request + State *string `json:"state,omitempty"` + // The integration client id + ClientID string `json:"client_id"` + // The integration client secret + ClientSecret string `json:"client_secret"` + // The integration redirect URI + RedirectURI *string `json:"redirect_uri,omitempty"` +} + +func (o *ExchangeSsoTokenRequestBody) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *ExchangeSsoTokenRequestBody) GetState() *string { + if o == nil { + return nil + } + return o.State +} + +func (o *ExchangeSsoTokenRequestBody) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *ExchangeSsoTokenRequestBody) GetClientSecret() string { + if o == nil { + return "" + } + return o.ClientSecret +} + +func (o *ExchangeSsoTokenRequestBody) GetRedirectURI() *string { + if o == nil { + return nil + } + return o.RedirectURI +} + +type ExchangeSsoTokenResponseBody struct { + IDToken string `json:"id_token"` + AccessToken any `json:"access_token"` + TokenType any `json:"token_type"` +} + +func (o *ExchangeSsoTokenResponseBody) GetIDToken() string { + if o == nil { + return "" + } + return o.IDToken +} + +func (o *ExchangeSsoTokenResponseBody) GetAccessToken() any { + if o == nil { + return nil + } + return o.AccessToken +} + +func (o *ExchangeSsoTokenResponseBody) GetTokenType() any { + if o == nil { + return nil + } + return o.TokenType +} + +type ExchangeSsoTokenResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *ExchangeSsoTokenResponseBody +} + +func (o *ExchangeSsoTokenResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ExchangeSsoTokenResponse) GetObject() *ExchangeSsoTokenResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/filterprojectenvs.go b/src/__tests__/mockserver/internal/sdk/models/operations/filterprojectenvs.go new file mode 100644 index 00000000..8d9e6337 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/filterprojectenvs.go @@ -0,0 +1,4355 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// Decrypt - If true, the environment variable value will be decrypted +// +// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. +type Decrypt string + +const ( + DecryptTrue Decrypt = "true" + DecryptFalse Decrypt = "false" +) + +func (e Decrypt) ToPointer() *Decrypt { + return &e +} +func (e *Decrypt) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "true": + fallthrough + case "false": + *e = Decrypt(v) + return nil + default: + return fmt.Errorf("invalid value for Decrypt: %v", v) + } +} + +type FilterProjectEnvsRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // If defined, the git branch of the environment variable to filter the results (must have target=preview) + GitBranch *string `queryParam:"style=form,explode=true,name=gitBranch"` + // If true, the environment variable value will be decrypted + Decrypt *Decrypt `queryParam:"style=form,explode=true,name=decrypt"` + // The source that is calling the endpoint. + Source *string `queryParam:"style=form,explode=true,name=source"` + // The unique custom environment identifier within the project + CustomEnvironmentID *string `queryParam:"style=form,explode=true,name=customEnvironmentId"` + // The custom environment slug (name) within the project + CustomEnvironmentSlug *string `queryParam:"style=form,explode=true,name=customEnvironmentSlug"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *FilterProjectEnvsRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *FilterProjectEnvsRequest) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *FilterProjectEnvsRequest) GetDecrypt() *Decrypt { + if o == nil { + return nil + } + return o.Decrypt +} + +func (o *FilterProjectEnvsRequest) GetSource() *string { + if o == nil { + return nil + } + return o.Source +} + +func (o *FilterProjectEnvsRequest) GetCustomEnvironmentID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentID +} + +func (o *FilterProjectEnvsRequest) GetCustomEnvironmentSlug() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentSlug +} + +func (o *FilterProjectEnvsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *FilterProjectEnvsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type FilterProjectEnvsTargetProjectsResponse2 string + +const ( + FilterProjectEnvsTargetProjectsResponse2Production FilterProjectEnvsTargetProjectsResponse2 = "production" + FilterProjectEnvsTargetProjectsResponse2Preview FilterProjectEnvsTargetProjectsResponse2 = "preview" + FilterProjectEnvsTargetProjectsResponse2Development FilterProjectEnvsTargetProjectsResponse2 = "development" +) + +func (e FilterProjectEnvsTargetProjectsResponse2) ToPointer() *FilterProjectEnvsTargetProjectsResponse2 { + return &e +} +func (e *FilterProjectEnvsTargetProjectsResponse2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = FilterProjectEnvsTargetProjectsResponse2(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsTargetProjectsResponse2: %v", v) + } +} + +type FilterProjectEnvsTargetProjects1 string + +const ( + FilterProjectEnvsTargetProjects1Production FilterProjectEnvsTargetProjects1 = "production" + FilterProjectEnvsTargetProjects1Preview FilterProjectEnvsTargetProjects1 = "preview" + FilterProjectEnvsTargetProjects1Development FilterProjectEnvsTargetProjects1 = "development" +) + +func (e FilterProjectEnvsTargetProjects1) ToPointer() *FilterProjectEnvsTargetProjects1 { + return &e +} +func (e *FilterProjectEnvsTargetProjects1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = FilterProjectEnvsTargetProjects1(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsTargetProjects1: %v", v) + } +} + +type FilterProjectEnvsResponseBodyProjectsResponseTargetType string + +const ( + FilterProjectEnvsResponseBodyProjectsResponseTargetTypeArrayOfFilterProjectEnvsTargetProjects1 FilterProjectEnvsResponseBodyProjectsResponseTargetType = "arrayOfFilterProjectEnvsTargetProjects1" + FilterProjectEnvsResponseBodyProjectsResponseTargetTypeFilterProjectEnvsTargetProjectsResponse2 FilterProjectEnvsResponseBodyProjectsResponseTargetType = "filterProjectEnvs_target_projects_response_2" +) + +type FilterProjectEnvsResponseBodyProjectsResponseTarget struct { + ArrayOfFilterProjectEnvsTargetProjects1 []FilterProjectEnvsTargetProjects1 + FilterProjectEnvsTargetProjectsResponse2 *FilterProjectEnvsTargetProjectsResponse2 + + Type FilterProjectEnvsResponseBodyProjectsResponseTargetType +} + +func CreateFilterProjectEnvsResponseBodyProjectsResponseTargetArrayOfFilterProjectEnvsTargetProjects1(arrayOfFilterProjectEnvsTargetProjects1 []FilterProjectEnvsTargetProjects1) FilterProjectEnvsResponseBodyProjectsResponseTarget { + typ := FilterProjectEnvsResponseBodyProjectsResponseTargetTypeArrayOfFilterProjectEnvsTargetProjects1 + + return FilterProjectEnvsResponseBodyProjectsResponseTarget{ + ArrayOfFilterProjectEnvsTargetProjects1: arrayOfFilterProjectEnvsTargetProjects1, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsResponseTargetFilterProjectEnvsTargetProjectsResponse2(filterProjectEnvsTargetProjectsResponse2 FilterProjectEnvsTargetProjectsResponse2) FilterProjectEnvsResponseBodyProjectsResponseTarget { + typ := FilterProjectEnvsResponseBodyProjectsResponseTargetTypeFilterProjectEnvsTargetProjectsResponse2 + + return FilterProjectEnvsResponseBodyProjectsResponseTarget{ + FilterProjectEnvsTargetProjectsResponse2: &filterProjectEnvsTargetProjectsResponse2, + Type: typ, + } +} + +func (u *FilterProjectEnvsResponseBodyProjectsResponseTarget) UnmarshalJSON(data []byte) error { + + var arrayOfFilterProjectEnvsTargetProjects1 []FilterProjectEnvsTargetProjects1 = []FilterProjectEnvsTargetProjects1{} + if err := utils.UnmarshalJSON(data, &arrayOfFilterProjectEnvsTargetProjects1, "", true, true); err == nil { + u.ArrayOfFilterProjectEnvsTargetProjects1 = arrayOfFilterProjectEnvsTargetProjects1 + u.Type = FilterProjectEnvsResponseBodyProjectsResponseTargetTypeArrayOfFilterProjectEnvsTargetProjects1 + return nil + } + + var filterProjectEnvsTargetProjectsResponse2 FilterProjectEnvsTargetProjectsResponse2 = FilterProjectEnvsTargetProjectsResponse2("") + if err := utils.UnmarshalJSON(data, &filterProjectEnvsTargetProjectsResponse2, "", true, true); err == nil { + u.FilterProjectEnvsTargetProjectsResponse2 = &filterProjectEnvsTargetProjectsResponse2 + u.Type = FilterProjectEnvsResponseBodyProjectsResponseTargetTypeFilterProjectEnvsTargetProjectsResponse2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FilterProjectEnvsResponseBodyProjectsResponseTarget", string(data)) +} + +func (u FilterProjectEnvsResponseBodyProjectsResponseTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfFilterProjectEnvsTargetProjects1 != nil { + return utils.MarshalJSON(u.ArrayOfFilterProjectEnvsTargetProjects1, "", true) + } + + if u.FilterProjectEnvsTargetProjectsResponse2 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsTargetProjectsResponse2, "", true) + } + + return nil, errors.New("could not marshal union type FilterProjectEnvsResponseBodyProjectsResponseTarget: all fields are null") +} + +type FilterProjectEnvsResponseBodyProjectsResponse200Type string + +const ( + FilterProjectEnvsResponseBodyProjectsResponse200TypeSystem FilterProjectEnvsResponseBodyProjectsResponse200Type = "system" + FilterProjectEnvsResponseBodyProjectsResponse200TypeEncrypted FilterProjectEnvsResponseBodyProjectsResponse200Type = "encrypted" + FilterProjectEnvsResponseBodyProjectsResponse200TypePlain FilterProjectEnvsResponseBodyProjectsResponse200Type = "plain" + FilterProjectEnvsResponseBodyProjectsResponse200TypeSensitive FilterProjectEnvsResponseBodyProjectsResponse200Type = "sensitive" + FilterProjectEnvsResponseBodyProjectsResponse200TypeSecret FilterProjectEnvsResponseBodyProjectsResponse200Type = "secret" +) + +func (e FilterProjectEnvsResponseBodyProjectsResponse200Type) ToPointer() *FilterProjectEnvsResponseBodyProjectsResponse200Type { + return &e +} +func (e *FilterProjectEnvsResponseBodyProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = FilterProjectEnvsResponseBodyProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsResponseBodyProjectsResponse200Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15TypeFlagsConnectionString FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type = "flags-connection-string" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse15 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse15) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs15Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14TypeIntegrationStoreSecret FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type = "integration-store-secret" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse14 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse14) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs14Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *FilterProjectEnvsContentHintProjectsResponse14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *FilterProjectEnvsContentHintProjectsResponse14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *FilterProjectEnvsContentHintProjectsResponse14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13TypePostgresURLNoSsl FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type = "postgres-url-no-ssl" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse13 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse13) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs13Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12TypePostgresDatabase FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type = "postgres-database" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse12 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse12) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs12Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11TypePostgresPassword FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type = "postgres-password" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse11 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse11) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs11Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10TypePostgresHost FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type = "postgres-host" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse10 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse10) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs10Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9TypePostgresUser FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type = "postgres-user" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse9 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse9) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs9Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8TypePostgresPrismaURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type = "postgres-prisma-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse8 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse8) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs8Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7TypePostgresURLNonPooling FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type = "postgres-url-non-pooling" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse7 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse7) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs7Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6TypePostgresURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type = "postgres-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse6 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse6) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs6Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5TypeBlobReadWriteToken FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type = "blob-read-write-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse5 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse5) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs5Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4TypeRedisRestAPIReadOnlyToken FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type = "redis-rest-api-read-only-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse4 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse4) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs4Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3TypeRedisRestAPIToken FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type = "redis-rest-api-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse3 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse3) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Envs3Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsTypeRedisRestAPIURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType = "redis-rest-api-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse2 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse2) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3EnvsType("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3TypeRedisURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type = "redis-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse1 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjectsResponse1) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody3Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjectsResponse1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsResponseBodyProjectsContentHintType string + +const ( + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse1 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_1" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse2 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_2" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse3 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_3" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse4 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_4" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse5 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_5" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse6 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_6" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse7 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_7" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse8 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_8" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse9 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_9" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse10 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_10" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse11 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_11" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse12 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_12" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse13 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_13" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse14 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_14" + FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse15 FilterProjectEnvsResponseBodyProjectsContentHintType = "filterProjectEnvs_contentHint_projects_response_15" +) + +type FilterProjectEnvsResponseBodyProjectsContentHint struct { + FilterProjectEnvsContentHintProjectsResponse1 *FilterProjectEnvsContentHintProjectsResponse1 + FilterProjectEnvsContentHintProjectsResponse2 *FilterProjectEnvsContentHintProjectsResponse2 + FilterProjectEnvsContentHintProjectsResponse3 *FilterProjectEnvsContentHintProjectsResponse3 + FilterProjectEnvsContentHintProjectsResponse4 *FilterProjectEnvsContentHintProjectsResponse4 + FilterProjectEnvsContentHintProjectsResponse5 *FilterProjectEnvsContentHintProjectsResponse5 + FilterProjectEnvsContentHintProjectsResponse6 *FilterProjectEnvsContentHintProjectsResponse6 + FilterProjectEnvsContentHintProjectsResponse7 *FilterProjectEnvsContentHintProjectsResponse7 + FilterProjectEnvsContentHintProjectsResponse8 *FilterProjectEnvsContentHintProjectsResponse8 + FilterProjectEnvsContentHintProjectsResponse9 *FilterProjectEnvsContentHintProjectsResponse9 + FilterProjectEnvsContentHintProjectsResponse10 *FilterProjectEnvsContentHintProjectsResponse10 + FilterProjectEnvsContentHintProjectsResponse11 *FilterProjectEnvsContentHintProjectsResponse11 + FilterProjectEnvsContentHintProjectsResponse12 *FilterProjectEnvsContentHintProjectsResponse12 + FilterProjectEnvsContentHintProjectsResponse13 *FilterProjectEnvsContentHintProjectsResponse13 + FilterProjectEnvsContentHintProjectsResponse14 *FilterProjectEnvsContentHintProjectsResponse14 + FilterProjectEnvsContentHintProjectsResponse15 *FilterProjectEnvsContentHintProjectsResponse15 + + Type FilterProjectEnvsResponseBodyProjectsContentHintType +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse1(filterProjectEnvsContentHintProjectsResponse1 FilterProjectEnvsContentHintProjectsResponse1) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse1 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse1: &filterProjectEnvsContentHintProjectsResponse1, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse2(filterProjectEnvsContentHintProjectsResponse2 FilterProjectEnvsContentHintProjectsResponse2) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse2 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse2: &filterProjectEnvsContentHintProjectsResponse2, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse3(filterProjectEnvsContentHintProjectsResponse3 FilterProjectEnvsContentHintProjectsResponse3) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse3 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse3: &filterProjectEnvsContentHintProjectsResponse3, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse4(filterProjectEnvsContentHintProjectsResponse4 FilterProjectEnvsContentHintProjectsResponse4) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse4 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse4: &filterProjectEnvsContentHintProjectsResponse4, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse5(filterProjectEnvsContentHintProjectsResponse5 FilterProjectEnvsContentHintProjectsResponse5) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse5 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse5: &filterProjectEnvsContentHintProjectsResponse5, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse6(filterProjectEnvsContentHintProjectsResponse6 FilterProjectEnvsContentHintProjectsResponse6) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse6 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse6: &filterProjectEnvsContentHintProjectsResponse6, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse7(filterProjectEnvsContentHintProjectsResponse7 FilterProjectEnvsContentHintProjectsResponse7) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse7 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse7: &filterProjectEnvsContentHintProjectsResponse7, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse8(filterProjectEnvsContentHintProjectsResponse8 FilterProjectEnvsContentHintProjectsResponse8) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse8 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse8: &filterProjectEnvsContentHintProjectsResponse8, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse9(filterProjectEnvsContentHintProjectsResponse9 FilterProjectEnvsContentHintProjectsResponse9) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse9 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse9: &filterProjectEnvsContentHintProjectsResponse9, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse10(filterProjectEnvsContentHintProjectsResponse10 FilterProjectEnvsContentHintProjectsResponse10) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse10 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse10: &filterProjectEnvsContentHintProjectsResponse10, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse11(filterProjectEnvsContentHintProjectsResponse11 FilterProjectEnvsContentHintProjectsResponse11) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse11 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse11: &filterProjectEnvsContentHintProjectsResponse11, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse12(filterProjectEnvsContentHintProjectsResponse12 FilterProjectEnvsContentHintProjectsResponse12) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse12 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse12: &filterProjectEnvsContentHintProjectsResponse12, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse13(filterProjectEnvsContentHintProjectsResponse13 FilterProjectEnvsContentHintProjectsResponse13) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse13 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse13: &filterProjectEnvsContentHintProjectsResponse13, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse14(filterProjectEnvsContentHintProjectsResponse14 FilterProjectEnvsContentHintProjectsResponse14) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse14 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse14: &filterProjectEnvsContentHintProjectsResponse14, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsContentHintFilterProjectEnvsContentHintProjectsResponse15(filterProjectEnvsContentHintProjectsResponse15 FilterProjectEnvsContentHintProjectsResponse15) FilterProjectEnvsResponseBodyProjectsContentHint { + typ := FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse15 + + return FilterProjectEnvsResponseBodyProjectsContentHint{ + FilterProjectEnvsContentHintProjectsResponse15: &filterProjectEnvsContentHintProjectsResponse15, + Type: typ, + } +} + +func (u *FilterProjectEnvsResponseBodyProjectsContentHint) UnmarshalJSON(data []byte) error { + + var filterProjectEnvsContentHintProjectsResponse7 FilterProjectEnvsContentHintProjectsResponse7 = FilterProjectEnvsContentHintProjectsResponse7{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse7, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse7 = &filterProjectEnvsContentHintProjectsResponse7 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse7 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse9 FilterProjectEnvsContentHintProjectsResponse9 = FilterProjectEnvsContentHintProjectsResponse9{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse9, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse9 = &filterProjectEnvsContentHintProjectsResponse9 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse9 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse3 FilterProjectEnvsContentHintProjectsResponse3 = FilterProjectEnvsContentHintProjectsResponse3{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse3, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse3 = &filterProjectEnvsContentHintProjectsResponse3 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse3 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse4 FilterProjectEnvsContentHintProjectsResponse4 = FilterProjectEnvsContentHintProjectsResponse4{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse4, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse4 = &filterProjectEnvsContentHintProjectsResponse4 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse4 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse5 FilterProjectEnvsContentHintProjectsResponse5 = FilterProjectEnvsContentHintProjectsResponse5{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse5, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse5 = &filterProjectEnvsContentHintProjectsResponse5 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse5 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse6 FilterProjectEnvsContentHintProjectsResponse6 = FilterProjectEnvsContentHintProjectsResponse6{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse6, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse6 = &filterProjectEnvsContentHintProjectsResponse6 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse6 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse2 FilterProjectEnvsContentHintProjectsResponse2 = FilterProjectEnvsContentHintProjectsResponse2{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse2, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse2 = &filterProjectEnvsContentHintProjectsResponse2 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse2 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse8 FilterProjectEnvsContentHintProjectsResponse8 = FilterProjectEnvsContentHintProjectsResponse8{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse8, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse8 = &filterProjectEnvsContentHintProjectsResponse8 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse8 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse1 FilterProjectEnvsContentHintProjectsResponse1 = FilterProjectEnvsContentHintProjectsResponse1{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse1, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse1 = &filterProjectEnvsContentHintProjectsResponse1 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse1 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse10 FilterProjectEnvsContentHintProjectsResponse10 = FilterProjectEnvsContentHintProjectsResponse10{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse10, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse10 = &filterProjectEnvsContentHintProjectsResponse10 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse10 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse11 FilterProjectEnvsContentHintProjectsResponse11 = FilterProjectEnvsContentHintProjectsResponse11{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse11, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse11 = &filterProjectEnvsContentHintProjectsResponse11 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse11 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse12 FilterProjectEnvsContentHintProjectsResponse12 = FilterProjectEnvsContentHintProjectsResponse12{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse12, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse12 = &filterProjectEnvsContentHintProjectsResponse12 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse12 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse13 FilterProjectEnvsContentHintProjectsResponse13 = FilterProjectEnvsContentHintProjectsResponse13{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse13, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse13 = &filterProjectEnvsContentHintProjectsResponse13 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse13 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse15 FilterProjectEnvsContentHintProjectsResponse15 = FilterProjectEnvsContentHintProjectsResponse15{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse15, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse15 = &filterProjectEnvsContentHintProjectsResponse15 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse15 + return nil + } + + var filterProjectEnvsContentHintProjectsResponse14 FilterProjectEnvsContentHintProjectsResponse14 = FilterProjectEnvsContentHintProjectsResponse14{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjectsResponse14, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjectsResponse14 = &filterProjectEnvsContentHintProjectsResponse14 + u.Type = FilterProjectEnvsResponseBodyProjectsContentHintTypeFilterProjectEnvsContentHintProjectsResponse14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FilterProjectEnvsResponseBodyProjectsContentHint", string(data)) +} + +func (u FilterProjectEnvsResponseBodyProjectsContentHint) MarshalJSON() ([]byte, error) { + if u.FilterProjectEnvsContentHintProjectsResponse1 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse1, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse2 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse2, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse3 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse3, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse4 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse4, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse5 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse5, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse6 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse6, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse7 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse7, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse8 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse8, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse9 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse9, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse10 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse10, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse11 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse11, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse12 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse12, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse13 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse13, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse14 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse14, "", true) + } + + if u.FilterProjectEnvsContentHintProjectsResponse15 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjectsResponse15, "", true) + } + + return nil, errors.New("could not marshal union type FilterProjectEnvsResponseBodyProjectsContentHint: all fields are null") +} + +type FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type string + +const ( + FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3TypeFlagsSecret FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type = "flags-secret" +) + +func (e FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type) ToPointer() *FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type { + return &e +} +func (e *FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type: %v", v) + } +} + +// FilterProjectEnvsResponseBodyProjectsInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type FilterProjectEnvsResponseBodyProjectsInternalContentHint struct { + Type FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *FilterProjectEnvsResponseBodyProjectsInternalContentHint) GetType() FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type { + if o == nil { + return FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSON3Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsResponseBodyProjectsInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type ResponseBodyEnvs struct { + Target *FilterProjectEnvsResponseBodyProjectsResponseTarget `json:"target,omitempty"` + Type *FilterProjectEnvsResponseBodyProjectsResponse200Type `json:"type,omitempty"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key *string `json:"key,omitempty"` + Value *string `json:"value,omitempty"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *FilterProjectEnvsResponseBodyProjectsContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *FilterProjectEnvsResponseBodyProjectsInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` + System *bool `json:"system,omitempty"` +} + +func (o *ResponseBodyEnvs) GetTarget() *FilterProjectEnvsResponseBodyProjectsResponseTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *ResponseBodyEnvs) GetType() *FilterProjectEnvsResponseBodyProjectsResponse200Type { + if o == nil { + return nil + } + return o.Type +} + +func (o *ResponseBodyEnvs) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *ResponseBodyEnvs) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *ResponseBodyEnvs) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *ResponseBodyEnvs) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *ResponseBodyEnvs) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *ResponseBodyEnvs) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *ResponseBodyEnvs) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *ResponseBodyEnvs) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *ResponseBodyEnvs) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *ResponseBodyEnvs) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *ResponseBodyEnvs) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *ResponseBodyEnvs) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *ResponseBodyEnvs) GetContentHint() *FilterProjectEnvsResponseBodyProjectsContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *ResponseBodyEnvs) GetInternalContentHint() *FilterProjectEnvsResponseBodyProjectsInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *ResponseBodyEnvs) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *ResponseBodyEnvs) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *ResponseBodyEnvs) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *ResponseBodyEnvs) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +func (o *ResponseBodyEnvs) GetSystem() *bool { + if o == nil { + return nil + } + return o.System +} + +// FilterProjectEnvsResponseBody3 - The list of environment variables for the given project +type FilterProjectEnvsResponseBody3 struct { + Envs []ResponseBodyEnvs `json:"envs"` +} + +func (o *FilterProjectEnvsResponseBody3) GetEnvs() []ResponseBodyEnvs { + if o == nil { + return []ResponseBodyEnvs{} + } + return o.Envs +} + +type FilterProjectEnvsTargetProjects2 string + +const ( + FilterProjectEnvsTargetProjects2Production FilterProjectEnvsTargetProjects2 = "production" + FilterProjectEnvsTargetProjects2Preview FilterProjectEnvsTargetProjects2 = "preview" + FilterProjectEnvsTargetProjects2Development FilterProjectEnvsTargetProjects2 = "development" +) + +func (e FilterProjectEnvsTargetProjects2) ToPointer() *FilterProjectEnvsTargetProjects2 { + return &e +} +func (e *FilterProjectEnvsTargetProjects2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = FilterProjectEnvsTargetProjects2(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsTargetProjects2: %v", v) + } +} + +type FilterProjectEnvsTarget1 string + +const ( + FilterProjectEnvsTarget1Production FilterProjectEnvsTarget1 = "production" + FilterProjectEnvsTarget1Preview FilterProjectEnvsTarget1 = "preview" + FilterProjectEnvsTarget1Development FilterProjectEnvsTarget1 = "development" +) + +func (e FilterProjectEnvsTarget1) ToPointer() *FilterProjectEnvsTarget1 { + return &e +} +func (e *FilterProjectEnvsTarget1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = FilterProjectEnvsTarget1(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsTarget1: %v", v) + } +} + +type FilterProjectEnvsResponseBodyProjectsTargetType string + +const ( + FilterProjectEnvsResponseBodyProjectsTargetTypeArrayOfFilterProjectEnvsTarget1 FilterProjectEnvsResponseBodyProjectsTargetType = "arrayOfFilterProjectEnvsTarget1" + FilterProjectEnvsResponseBodyProjectsTargetTypeFilterProjectEnvsTargetProjects2 FilterProjectEnvsResponseBodyProjectsTargetType = "filterProjectEnvs_target_projects_2" +) + +type FilterProjectEnvsResponseBodyProjectsTarget struct { + ArrayOfFilterProjectEnvsTarget1 []FilterProjectEnvsTarget1 + FilterProjectEnvsTargetProjects2 *FilterProjectEnvsTargetProjects2 + + Type FilterProjectEnvsResponseBodyProjectsTargetType +} + +func CreateFilterProjectEnvsResponseBodyProjectsTargetArrayOfFilterProjectEnvsTarget1(arrayOfFilterProjectEnvsTarget1 []FilterProjectEnvsTarget1) FilterProjectEnvsResponseBodyProjectsTarget { + typ := FilterProjectEnvsResponseBodyProjectsTargetTypeArrayOfFilterProjectEnvsTarget1 + + return FilterProjectEnvsResponseBodyProjectsTarget{ + ArrayOfFilterProjectEnvsTarget1: arrayOfFilterProjectEnvsTarget1, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyProjectsTargetFilterProjectEnvsTargetProjects2(filterProjectEnvsTargetProjects2 FilterProjectEnvsTargetProjects2) FilterProjectEnvsResponseBodyProjectsTarget { + typ := FilterProjectEnvsResponseBodyProjectsTargetTypeFilterProjectEnvsTargetProjects2 + + return FilterProjectEnvsResponseBodyProjectsTarget{ + FilterProjectEnvsTargetProjects2: &filterProjectEnvsTargetProjects2, + Type: typ, + } +} + +func (u *FilterProjectEnvsResponseBodyProjectsTarget) UnmarshalJSON(data []byte) error { + + var arrayOfFilterProjectEnvsTarget1 []FilterProjectEnvsTarget1 = []FilterProjectEnvsTarget1{} + if err := utils.UnmarshalJSON(data, &arrayOfFilterProjectEnvsTarget1, "", true, true); err == nil { + u.ArrayOfFilterProjectEnvsTarget1 = arrayOfFilterProjectEnvsTarget1 + u.Type = FilterProjectEnvsResponseBodyProjectsTargetTypeArrayOfFilterProjectEnvsTarget1 + return nil + } + + var filterProjectEnvsTargetProjects2 FilterProjectEnvsTargetProjects2 = FilterProjectEnvsTargetProjects2("") + if err := utils.UnmarshalJSON(data, &filterProjectEnvsTargetProjects2, "", true, true); err == nil { + u.FilterProjectEnvsTargetProjects2 = &filterProjectEnvsTargetProjects2 + u.Type = FilterProjectEnvsResponseBodyProjectsTargetTypeFilterProjectEnvsTargetProjects2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FilterProjectEnvsResponseBodyProjectsTarget", string(data)) +} + +func (u FilterProjectEnvsResponseBodyProjectsTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfFilterProjectEnvsTarget1 != nil { + return utils.MarshalJSON(u.ArrayOfFilterProjectEnvsTarget1, "", true) + } + + if u.FilterProjectEnvsTargetProjects2 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsTargetProjects2, "", true) + } + + return nil, errors.New("could not marshal union type FilterProjectEnvsResponseBodyProjectsTarget: all fields are null") +} + +type FilterProjectEnvsResponseBodyProjectsResponseType string + +const ( + FilterProjectEnvsResponseBodyProjectsResponseTypeSystem FilterProjectEnvsResponseBodyProjectsResponseType = "system" + FilterProjectEnvsResponseBodyProjectsResponseTypeEncrypted FilterProjectEnvsResponseBodyProjectsResponseType = "encrypted" + FilterProjectEnvsResponseBodyProjectsResponseTypePlain FilterProjectEnvsResponseBodyProjectsResponseType = "plain" + FilterProjectEnvsResponseBodyProjectsResponseTypeSensitive FilterProjectEnvsResponseBodyProjectsResponseType = "sensitive" + FilterProjectEnvsResponseBodyProjectsResponseTypeSecret FilterProjectEnvsResponseBodyProjectsResponseType = "secret" +) + +func (e FilterProjectEnvsResponseBodyProjectsResponseType) ToPointer() *FilterProjectEnvsResponseBodyProjectsResponseType { + return &e +} +func (e *FilterProjectEnvsResponseBodyProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = FilterProjectEnvsResponseBodyProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsResponseBodyProjectsResponseType: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15TypeFlagsConnectionString FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type = "flags-connection-string" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects15 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *FilterProjectEnvsContentHintProjects15) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs15Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14TypeIntegrationStoreSecret FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type = "integration-store-secret" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects14 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *FilterProjectEnvsContentHintProjects14) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs14Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *FilterProjectEnvsContentHintProjects14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *FilterProjectEnvsContentHintProjects14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *FilterProjectEnvsContentHintProjects14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13TypePostgresURLNoSsl FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type = "postgres-url-no-ssl" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects13 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects13) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs13Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12TypePostgresDatabase FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type = "postgres-database" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects12 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects12) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs12Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11TypePostgresPassword FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type = "postgres-password" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects11 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects11) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs11Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10TypePostgresHost FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type = "postgres-host" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects10 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects10) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs10Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9TypePostgresUser FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type = "postgres-user" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects9 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects9) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs9Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8TypePostgresPrismaURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type = "postgres-prisma-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects8 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects8) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs8Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7TypePostgresURLNonPooling FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type = "postgres-url-non-pooling" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects7 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects7) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs7Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6TypePostgresURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type = "postgres-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects6 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects6) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs6Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5TypeBlobReadWriteToken FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type = "blob-read-write-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects5 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects5) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs5Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4TypeRedisRestAPIReadOnlyToken FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type = "redis-rest-api-read-only-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects4 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects4) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs4Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3TypeRedisRestAPIToken FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type = "redis-rest-api-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects3 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects3) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Envs3Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsTypeRedisRestAPIURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType = "redis-rest-api-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects2 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects2) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2EnvsType("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2TypeRedisURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type = "redis-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type: %v", v) + } +} + +type FilterProjectEnvsContentHintProjects1 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHintProjects1) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody2Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHintProjects1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsResponseBodyContentHintType string + +const ( + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects1 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_1" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects2 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_2" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects3 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_3" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects4 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_4" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects5 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_5" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects6 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_6" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects7 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_7" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects8 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_8" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects9 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_9" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects10 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_10" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects11 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_11" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects12 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_12" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects13 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_13" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects14 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_14" + FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects15 FilterProjectEnvsResponseBodyContentHintType = "filterProjectEnvs_contentHint_projects_15" +) + +type FilterProjectEnvsResponseBodyContentHint struct { + FilterProjectEnvsContentHintProjects1 *FilterProjectEnvsContentHintProjects1 + FilterProjectEnvsContentHintProjects2 *FilterProjectEnvsContentHintProjects2 + FilterProjectEnvsContentHintProjects3 *FilterProjectEnvsContentHintProjects3 + FilterProjectEnvsContentHintProjects4 *FilterProjectEnvsContentHintProjects4 + FilterProjectEnvsContentHintProjects5 *FilterProjectEnvsContentHintProjects5 + FilterProjectEnvsContentHintProjects6 *FilterProjectEnvsContentHintProjects6 + FilterProjectEnvsContentHintProjects7 *FilterProjectEnvsContentHintProjects7 + FilterProjectEnvsContentHintProjects8 *FilterProjectEnvsContentHintProjects8 + FilterProjectEnvsContentHintProjects9 *FilterProjectEnvsContentHintProjects9 + FilterProjectEnvsContentHintProjects10 *FilterProjectEnvsContentHintProjects10 + FilterProjectEnvsContentHintProjects11 *FilterProjectEnvsContentHintProjects11 + FilterProjectEnvsContentHintProjects12 *FilterProjectEnvsContentHintProjects12 + FilterProjectEnvsContentHintProjects13 *FilterProjectEnvsContentHintProjects13 + FilterProjectEnvsContentHintProjects14 *FilterProjectEnvsContentHintProjects14 + FilterProjectEnvsContentHintProjects15 *FilterProjectEnvsContentHintProjects15 + + Type FilterProjectEnvsResponseBodyContentHintType +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects1(filterProjectEnvsContentHintProjects1 FilterProjectEnvsContentHintProjects1) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects1 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects1: &filterProjectEnvsContentHintProjects1, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects2(filterProjectEnvsContentHintProjects2 FilterProjectEnvsContentHintProjects2) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects2 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects2: &filterProjectEnvsContentHintProjects2, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects3(filterProjectEnvsContentHintProjects3 FilterProjectEnvsContentHintProjects3) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects3 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects3: &filterProjectEnvsContentHintProjects3, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects4(filterProjectEnvsContentHintProjects4 FilterProjectEnvsContentHintProjects4) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects4 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects4: &filterProjectEnvsContentHintProjects4, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects5(filterProjectEnvsContentHintProjects5 FilterProjectEnvsContentHintProjects5) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects5 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects5: &filterProjectEnvsContentHintProjects5, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects6(filterProjectEnvsContentHintProjects6 FilterProjectEnvsContentHintProjects6) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects6 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects6: &filterProjectEnvsContentHintProjects6, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects7(filterProjectEnvsContentHintProjects7 FilterProjectEnvsContentHintProjects7) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects7 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects7: &filterProjectEnvsContentHintProjects7, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects8(filterProjectEnvsContentHintProjects8 FilterProjectEnvsContentHintProjects8) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects8 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects8: &filterProjectEnvsContentHintProjects8, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects9(filterProjectEnvsContentHintProjects9 FilterProjectEnvsContentHintProjects9) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects9 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects9: &filterProjectEnvsContentHintProjects9, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects10(filterProjectEnvsContentHintProjects10 FilterProjectEnvsContentHintProjects10) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects10 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects10: &filterProjectEnvsContentHintProjects10, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects11(filterProjectEnvsContentHintProjects11 FilterProjectEnvsContentHintProjects11) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects11 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects11: &filterProjectEnvsContentHintProjects11, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects12(filterProjectEnvsContentHintProjects12 FilterProjectEnvsContentHintProjects12) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects12 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects12: &filterProjectEnvsContentHintProjects12, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects13(filterProjectEnvsContentHintProjects13 FilterProjectEnvsContentHintProjects13) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects13 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects13: &filterProjectEnvsContentHintProjects13, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects14(filterProjectEnvsContentHintProjects14 FilterProjectEnvsContentHintProjects14) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects14 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects14: &filterProjectEnvsContentHintProjects14, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyContentHintFilterProjectEnvsContentHintProjects15(filterProjectEnvsContentHintProjects15 FilterProjectEnvsContentHintProjects15) FilterProjectEnvsResponseBodyContentHint { + typ := FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects15 + + return FilterProjectEnvsResponseBodyContentHint{ + FilterProjectEnvsContentHintProjects15: &filterProjectEnvsContentHintProjects15, + Type: typ, + } +} + +func (u *FilterProjectEnvsResponseBodyContentHint) UnmarshalJSON(data []byte) error { + + var filterProjectEnvsContentHintProjects7 FilterProjectEnvsContentHintProjects7 = FilterProjectEnvsContentHintProjects7{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects7, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects7 = &filterProjectEnvsContentHintProjects7 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects7 + return nil + } + + var filterProjectEnvsContentHintProjects9 FilterProjectEnvsContentHintProjects9 = FilterProjectEnvsContentHintProjects9{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects9, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects9 = &filterProjectEnvsContentHintProjects9 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects9 + return nil + } + + var filterProjectEnvsContentHintProjects3 FilterProjectEnvsContentHintProjects3 = FilterProjectEnvsContentHintProjects3{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects3, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects3 = &filterProjectEnvsContentHintProjects3 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects3 + return nil + } + + var filterProjectEnvsContentHintProjects4 FilterProjectEnvsContentHintProjects4 = FilterProjectEnvsContentHintProjects4{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects4, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects4 = &filterProjectEnvsContentHintProjects4 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects4 + return nil + } + + var filterProjectEnvsContentHintProjects5 FilterProjectEnvsContentHintProjects5 = FilterProjectEnvsContentHintProjects5{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects5, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects5 = &filterProjectEnvsContentHintProjects5 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects5 + return nil + } + + var filterProjectEnvsContentHintProjects6 FilterProjectEnvsContentHintProjects6 = FilterProjectEnvsContentHintProjects6{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects6, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects6 = &filterProjectEnvsContentHintProjects6 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects6 + return nil + } + + var filterProjectEnvsContentHintProjects2 FilterProjectEnvsContentHintProjects2 = FilterProjectEnvsContentHintProjects2{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects2, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects2 = &filterProjectEnvsContentHintProjects2 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects2 + return nil + } + + var filterProjectEnvsContentHintProjects8 FilterProjectEnvsContentHintProjects8 = FilterProjectEnvsContentHintProjects8{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects8, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects8 = &filterProjectEnvsContentHintProjects8 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects8 + return nil + } + + var filterProjectEnvsContentHintProjects1 FilterProjectEnvsContentHintProjects1 = FilterProjectEnvsContentHintProjects1{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects1, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects1 = &filterProjectEnvsContentHintProjects1 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects1 + return nil + } + + var filterProjectEnvsContentHintProjects10 FilterProjectEnvsContentHintProjects10 = FilterProjectEnvsContentHintProjects10{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects10, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects10 = &filterProjectEnvsContentHintProjects10 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects10 + return nil + } + + var filterProjectEnvsContentHintProjects11 FilterProjectEnvsContentHintProjects11 = FilterProjectEnvsContentHintProjects11{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects11, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects11 = &filterProjectEnvsContentHintProjects11 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects11 + return nil + } + + var filterProjectEnvsContentHintProjects12 FilterProjectEnvsContentHintProjects12 = FilterProjectEnvsContentHintProjects12{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects12, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects12 = &filterProjectEnvsContentHintProjects12 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects12 + return nil + } + + var filterProjectEnvsContentHintProjects13 FilterProjectEnvsContentHintProjects13 = FilterProjectEnvsContentHintProjects13{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects13, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects13 = &filterProjectEnvsContentHintProjects13 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects13 + return nil + } + + var filterProjectEnvsContentHintProjects15 FilterProjectEnvsContentHintProjects15 = FilterProjectEnvsContentHintProjects15{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects15, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects15 = &filterProjectEnvsContentHintProjects15 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects15 + return nil + } + + var filterProjectEnvsContentHintProjects14 FilterProjectEnvsContentHintProjects14 = FilterProjectEnvsContentHintProjects14{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHintProjects14, "", true, true); err == nil { + u.FilterProjectEnvsContentHintProjects14 = &filterProjectEnvsContentHintProjects14 + u.Type = FilterProjectEnvsResponseBodyContentHintTypeFilterProjectEnvsContentHintProjects14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FilterProjectEnvsResponseBodyContentHint", string(data)) +} + +func (u FilterProjectEnvsResponseBodyContentHint) MarshalJSON() ([]byte, error) { + if u.FilterProjectEnvsContentHintProjects1 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects1, "", true) + } + + if u.FilterProjectEnvsContentHintProjects2 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects2, "", true) + } + + if u.FilterProjectEnvsContentHintProjects3 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects3, "", true) + } + + if u.FilterProjectEnvsContentHintProjects4 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects4, "", true) + } + + if u.FilterProjectEnvsContentHintProjects5 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects5, "", true) + } + + if u.FilterProjectEnvsContentHintProjects6 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects6, "", true) + } + + if u.FilterProjectEnvsContentHintProjects7 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects7, "", true) + } + + if u.FilterProjectEnvsContentHintProjects8 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects8, "", true) + } + + if u.FilterProjectEnvsContentHintProjects9 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects9, "", true) + } + + if u.FilterProjectEnvsContentHintProjects10 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects10, "", true) + } + + if u.FilterProjectEnvsContentHintProjects11 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects11, "", true) + } + + if u.FilterProjectEnvsContentHintProjects12 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects12, "", true) + } + + if u.FilterProjectEnvsContentHintProjects13 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects13, "", true) + } + + if u.FilterProjectEnvsContentHintProjects14 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects14, "", true) + } + + if u.FilterProjectEnvsContentHintProjects15 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHintProjects15, "", true) + } + + return nil, errors.New("could not marshal union type FilterProjectEnvsResponseBodyContentHint: all fields are null") +} + +type FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType string + +const ( + FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONTypeFlagsSecret FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType = "flags-secret" +) + +func (e FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType) ToPointer() *FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType { + return &e +} +func (e *FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType: %v", v) + } +} + +// FilterProjectEnvsResponseBodyInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type FilterProjectEnvsResponseBodyInternalContentHint struct { + Type FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *FilterProjectEnvsResponseBodyInternalContentHint) GetType() FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType { + if o == nil { + return FilterProjectEnvsResponseBodyProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *FilterProjectEnvsResponseBodyInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type Envs struct { + Target *FilterProjectEnvsResponseBodyProjectsTarget `json:"target,omitempty"` + Type *FilterProjectEnvsResponseBodyProjectsResponseType `json:"type,omitempty"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key *string `json:"key,omitempty"` + Value *string `json:"value,omitempty"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *FilterProjectEnvsResponseBodyContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *FilterProjectEnvsResponseBodyInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` + System *bool `json:"system,omitempty"` +} + +func (o *Envs) GetTarget() *FilterProjectEnvsResponseBodyProjectsTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *Envs) GetType() *FilterProjectEnvsResponseBodyProjectsResponseType { + if o == nil { + return nil + } + return o.Type +} + +func (o *Envs) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *Envs) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Envs) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *Envs) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *Envs) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *Envs) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Envs) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Envs) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *Envs) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Envs) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *Envs) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *Envs) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *Envs) GetContentHint() *FilterProjectEnvsResponseBodyContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *Envs) GetInternalContentHint() *FilterProjectEnvsResponseBodyInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *Envs) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *Envs) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *Envs) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *Envs) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +func (o *Envs) GetSystem() *bool { + if o == nil { + return nil + } + return o.System +} + +type FilterProjectEnvsResponseBody2 struct { + Envs []Envs `json:"envs"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *FilterProjectEnvsResponseBody2) GetEnvs() []Envs { + if o == nil { + return []Envs{} + } + return o.Envs +} + +func (o *FilterProjectEnvsResponseBody2) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type FilterProjectEnvsTarget2 string + +const ( + FilterProjectEnvsTarget2Production FilterProjectEnvsTarget2 = "production" + FilterProjectEnvsTarget2Preview FilterProjectEnvsTarget2 = "preview" + FilterProjectEnvsTarget2Development FilterProjectEnvsTarget2 = "development" +) + +func (e FilterProjectEnvsTarget2) ToPointer() *FilterProjectEnvsTarget2 { + return &e +} +func (e *FilterProjectEnvsTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = FilterProjectEnvsTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsTarget2: %v", v) + } +} + +type FilterProjectEnvsResponseBodyTargetType string + +const ( + FilterProjectEnvsResponseBodyTargetTypeArrayOfStr FilterProjectEnvsResponseBodyTargetType = "arrayOfStr" + FilterProjectEnvsResponseBodyTargetTypeFilterProjectEnvsTarget2 FilterProjectEnvsResponseBodyTargetType = "filterProjectEnvs_target_2" +) + +type FilterProjectEnvsResponseBodyTarget struct { + ArrayOfStr []string + FilterProjectEnvsTarget2 *FilterProjectEnvsTarget2 + + Type FilterProjectEnvsResponseBodyTargetType +} + +func CreateFilterProjectEnvsResponseBodyTargetArrayOfStr(arrayOfStr []string) FilterProjectEnvsResponseBodyTarget { + typ := FilterProjectEnvsResponseBodyTargetTypeArrayOfStr + + return FilterProjectEnvsResponseBodyTarget{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyTargetFilterProjectEnvsTarget2(filterProjectEnvsTarget2 FilterProjectEnvsTarget2) FilterProjectEnvsResponseBodyTarget { + typ := FilterProjectEnvsResponseBodyTargetTypeFilterProjectEnvsTarget2 + + return FilterProjectEnvsResponseBodyTarget{ + FilterProjectEnvsTarget2: &filterProjectEnvsTarget2, + Type: typ, + } +} + +func (u *FilterProjectEnvsResponseBodyTarget) UnmarshalJSON(data []byte) error { + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = FilterProjectEnvsResponseBodyTargetTypeArrayOfStr + return nil + } + + var filterProjectEnvsTarget2 FilterProjectEnvsTarget2 = FilterProjectEnvsTarget2("") + if err := utils.UnmarshalJSON(data, &filterProjectEnvsTarget2, "", true, true); err == nil { + u.FilterProjectEnvsTarget2 = &filterProjectEnvsTarget2 + u.Type = FilterProjectEnvsResponseBodyTargetTypeFilterProjectEnvsTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FilterProjectEnvsResponseBodyTarget", string(data)) +} + +func (u FilterProjectEnvsResponseBodyTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.FilterProjectEnvsTarget2 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsTarget2, "", true) + } + + return nil, errors.New("could not marshal union type FilterProjectEnvsResponseBodyTarget: all fields are null") +} + +type FilterProjectEnvsResponseBodyType string + +const ( + FilterProjectEnvsResponseBodyTypeSystem FilterProjectEnvsResponseBodyType = "system" + FilterProjectEnvsResponseBodyTypeEncrypted FilterProjectEnvsResponseBodyType = "encrypted" + FilterProjectEnvsResponseBodyTypePlain FilterProjectEnvsResponseBodyType = "plain" + FilterProjectEnvsResponseBodyTypeSensitive FilterProjectEnvsResponseBodyType = "sensitive" + FilterProjectEnvsResponseBodyTypeSecret FilterProjectEnvsResponseBodyType = "secret" +) + +func (e FilterProjectEnvsResponseBodyType) ToPointer() *FilterProjectEnvsResponseBodyType { + return &e +} +func (e *FilterProjectEnvsResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = FilterProjectEnvsResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsResponseBodyType: %v", v) + } +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115TypeFlagsConnectionString FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type = "flags-connection-string" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type: %v", v) + } +} + +type FilterProjectEnvsContentHint15 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *FilterProjectEnvsContentHint15) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody115Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114TypeIntegrationStoreSecret FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type = "integration-store-secret" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type: %v", v) + } +} + +type FilterProjectEnvsContentHint14 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *FilterProjectEnvsContentHint14) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody114Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *FilterProjectEnvsContentHint14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *FilterProjectEnvsContentHint14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *FilterProjectEnvsContentHint14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113TypePostgresURLNoSsl FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type = "postgres-url-no-ssl" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type: %v", v) + } +} + +type FilterProjectEnvsContentHint13 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint13) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody113Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112TypePostgresDatabase FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type = "postgres-database" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type: %v", v) + } +} + +type FilterProjectEnvsContentHint12 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint12) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody112Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111TypePostgresPassword FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type = "postgres-password" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type: %v", v) + } +} + +type FilterProjectEnvsContentHint11 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint11) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody111Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110TypePostgresHost FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type = "postgres-host" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type: %v", v) + } +} + +type FilterProjectEnvsContentHint10 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint10) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody110Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19TypePostgresUser FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type = "postgres-user" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type: %v", v) + } +} + +type FilterProjectEnvsContentHint9 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint9) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody19Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18TypePostgresPrismaURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type = "postgres-prisma-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type: %v", v) + } +} + +type FilterProjectEnvsContentHint8 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint8) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody18Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1TypePostgresURLNonPooling FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type = "postgres-url-non-pooling" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type: %v", v) + } +} + +type FilterProjectEnvsContentHint7 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint7) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBody1Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyTypePostgresURL FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType = "postgres-url" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type FilterProjectEnvsContentHint6 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint6) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType string + +const ( + FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONTypeBlobReadWriteToken FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType = "blob-read-write-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type FilterProjectEnvsContentHint5 struct { + Type FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint5) GetType() FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponse200Type string + +const ( + FilterProjectEnvsContentHintProjectsResponse200TypeRedisRestAPIReadOnlyToken FilterProjectEnvsContentHintProjectsResponse200Type = "redis-rest-api-read-only-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponse200Type) ToPointer() *FilterProjectEnvsContentHintProjectsResponse200Type { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = FilterProjectEnvsContentHintProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponse200Type: %v", v) + } +} + +type FilterProjectEnvsContentHint4 struct { + Type FilterProjectEnvsContentHintProjectsResponse200Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint4) GetType() FilterProjectEnvsContentHintProjectsResponse200Type { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponse200Type("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsResponseType string + +const ( + FilterProjectEnvsContentHintProjectsResponseTypeRedisRestAPIToken FilterProjectEnvsContentHintProjectsResponseType = "redis-rest-api-token" +) + +func (e FilterProjectEnvsContentHintProjectsResponseType) ToPointer() *FilterProjectEnvsContentHintProjectsResponseType { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = FilterProjectEnvsContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsResponseType: %v", v) + } +} + +type FilterProjectEnvsContentHint3 struct { + Type FilterProjectEnvsContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint3) GetType() FilterProjectEnvsContentHintProjectsResponseType { + if o == nil { + return FilterProjectEnvsContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintProjectsType string + +const ( + FilterProjectEnvsContentHintProjectsTypeRedisRestAPIURL FilterProjectEnvsContentHintProjectsType = "redis-rest-api-url" +) + +func (e FilterProjectEnvsContentHintProjectsType) ToPointer() *FilterProjectEnvsContentHintProjectsType { + return &e +} +func (e *FilterProjectEnvsContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = FilterProjectEnvsContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintProjectsType: %v", v) + } +} + +type FilterProjectEnvsContentHint2 struct { + Type FilterProjectEnvsContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint2) GetType() FilterProjectEnvsContentHintProjectsType { + if o == nil { + return FilterProjectEnvsContentHintProjectsType("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type FilterProjectEnvsContentHintType string + +const ( + FilterProjectEnvsContentHintTypeRedisURL FilterProjectEnvsContentHintType = "redis-url" +) + +func (e FilterProjectEnvsContentHintType) ToPointer() *FilterProjectEnvsContentHintType { + return &e +} +func (e *FilterProjectEnvsContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = FilterProjectEnvsContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsContentHintType: %v", v) + } +} + +type FilterProjectEnvsContentHint1 struct { + Type FilterProjectEnvsContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *FilterProjectEnvsContentHint1) GetType() FilterProjectEnvsContentHintType { + if o == nil { + return FilterProjectEnvsContentHintType("") + } + return o.Type +} + +func (o *FilterProjectEnvsContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type ResponseBodyContentHintType string + +const ( + ResponseBodyContentHintTypeFilterProjectEnvsContentHint1 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_1" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint2 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_2" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint3 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_3" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint4 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_4" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint5 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_5" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint6 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_6" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint7 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_7" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint8 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_8" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint9 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_9" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint10 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_10" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint11 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_11" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint12 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_12" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint13 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_13" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint14 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_14" + ResponseBodyContentHintTypeFilterProjectEnvsContentHint15 ResponseBodyContentHintType = "filterProjectEnvs_contentHint_15" +) + +type ResponseBodyContentHint struct { + FilterProjectEnvsContentHint1 *FilterProjectEnvsContentHint1 + FilterProjectEnvsContentHint2 *FilterProjectEnvsContentHint2 + FilterProjectEnvsContentHint3 *FilterProjectEnvsContentHint3 + FilterProjectEnvsContentHint4 *FilterProjectEnvsContentHint4 + FilterProjectEnvsContentHint5 *FilterProjectEnvsContentHint5 + FilterProjectEnvsContentHint6 *FilterProjectEnvsContentHint6 + FilterProjectEnvsContentHint7 *FilterProjectEnvsContentHint7 + FilterProjectEnvsContentHint8 *FilterProjectEnvsContentHint8 + FilterProjectEnvsContentHint9 *FilterProjectEnvsContentHint9 + FilterProjectEnvsContentHint10 *FilterProjectEnvsContentHint10 + FilterProjectEnvsContentHint11 *FilterProjectEnvsContentHint11 + FilterProjectEnvsContentHint12 *FilterProjectEnvsContentHint12 + FilterProjectEnvsContentHint13 *FilterProjectEnvsContentHint13 + FilterProjectEnvsContentHint14 *FilterProjectEnvsContentHint14 + FilterProjectEnvsContentHint15 *FilterProjectEnvsContentHint15 + + Type ResponseBodyContentHintType +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint1(filterProjectEnvsContentHint1 FilterProjectEnvsContentHint1) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint1 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint1: &filterProjectEnvsContentHint1, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint2(filterProjectEnvsContentHint2 FilterProjectEnvsContentHint2) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint2 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint2: &filterProjectEnvsContentHint2, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint3(filterProjectEnvsContentHint3 FilterProjectEnvsContentHint3) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint3 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint3: &filterProjectEnvsContentHint3, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint4(filterProjectEnvsContentHint4 FilterProjectEnvsContentHint4) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint4 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint4: &filterProjectEnvsContentHint4, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint5(filterProjectEnvsContentHint5 FilterProjectEnvsContentHint5) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint5 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint5: &filterProjectEnvsContentHint5, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint6(filterProjectEnvsContentHint6 FilterProjectEnvsContentHint6) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint6 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint6: &filterProjectEnvsContentHint6, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint7(filterProjectEnvsContentHint7 FilterProjectEnvsContentHint7) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint7 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint7: &filterProjectEnvsContentHint7, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint8(filterProjectEnvsContentHint8 FilterProjectEnvsContentHint8) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint8 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint8: &filterProjectEnvsContentHint8, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint9(filterProjectEnvsContentHint9 FilterProjectEnvsContentHint9) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint9 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint9: &filterProjectEnvsContentHint9, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint10(filterProjectEnvsContentHint10 FilterProjectEnvsContentHint10) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint10 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint10: &filterProjectEnvsContentHint10, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint11(filterProjectEnvsContentHint11 FilterProjectEnvsContentHint11) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint11 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint11: &filterProjectEnvsContentHint11, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint12(filterProjectEnvsContentHint12 FilterProjectEnvsContentHint12) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint12 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint12: &filterProjectEnvsContentHint12, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint13(filterProjectEnvsContentHint13 FilterProjectEnvsContentHint13) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint13 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint13: &filterProjectEnvsContentHint13, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint14(filterProjectEnvsContentHint14 FilterProjectEnvsContentHint14) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint14 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint14: &filterProjectEnvsContentHint14, + Type: typ, + } +} + +func CreateResponseBodyContentHintFilterProjectEnvsContentHint15(filterProjectEnvsContentHint15 FilterProjectEnvsContentHint15) ResponseBodyContentHint { + typ := ResponseBodyContentHintTypeFilterProjectEnvsContentHint15 + + return ResponseBodyContentHint{ + FilterProjectEnvsContentHint15: &filterProjectEnvsContentHint15, + Type: typ, + } +} + +func (u *ResponseBodyContentHint) UnmarshalJSON(data []byte) error { + + var filterProjectEnvsContentHint7 FilterProjectEnvsContentHint7 = FilterProjectEnvsContentHint7{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint7, "", true, true); err == nil { + u.FilterProjectEnvsContentHint7 = &filterProjectEnvsContentHint7 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint7 + return nil + } + + var filterProjectEnvsContentHint9 FilterProjectEnvsContentHint9 = FilterProjectEnvsContentHint9{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint9, "", true, true); err == nil { + u.FilterProjectEnvsContentHint9 = &filterProjectEnvsContentHint9 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint9 + return nil + } + + var filterProjectEnvsContentHint3 FilterProjectEnvsContentHint3 = FilterProjectEnvsContentHint3{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint3, "", true, true); err == nil { + u.FilterProjectEnvsContentHint3 = &filterProjectEnvsContentHint3 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint3 + return nil + } + + var filterProjectEnvsContentHint4 FilterProjectEnvsContentHint4 = FilterProjectEnvsContentHint4{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint4, "", true, true); err == nil { + u.FilterProjectEnvsContentHint4 = &filterProjectEnvsContentHint4 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint4 + return nil + } + + var filterProjectEnvsContentHint5 FilterProjectEnvsContentHint5 = FilterProjectEnvsContentHint5{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint5, "", true, true); err == nil { + u.FilterProjectEnvsContentHint5 = &filterProjectEnvsContentHint5 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint5 + return nil + } + + var filterProjectEnvsContentHint6 FilterProjectEnvsContentHint6 = FilterProjectEnvsContentHint6{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint6, "", true, true); err == nil { + u.FilterProjectEnvsContentHint6 = &filterProjectEnvsContentHint6 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint6 + return nil + } + + var filterProjectEnvsContentHint2 FilterProjectEnvsContentHint2 = FilterProjectEnvsContentHint2{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint2, "", true, true); err == nil { + u.FilterProjectEnvsContentHint2 = &filterProjectEnvsContentHint2 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint2 + return nil + } + + var filterProjectEnvsContentHint8 FilterProjectEnvsContentHint8 = FilterProjectEnvsContentHint8{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint8, "", true, true); err == nil { + u.FilterProjectEnvsContentHint8 = &filterProjectEnvsContentHint8 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint8 + return nil + } + + var filterProjectEnvsContentHint1 FilterProjectEnvsContentHint1 = FilterProjectEnvsContentHint1{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint1, "", true, true); err == nil { + u.FilterProjectEnvsContentHint1 = &filterProjectEnvsContentHint1 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint1 + return nil + } + + var filterProjectEnvsContentHint10 FilterProjectEnvsContentHint10 = FilterProjectEnvsContentHint10{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint10, "", true, true); err == nil { + u.FilterProjectEnvsContentHint10 = &filterProjectEnvsContentHint10 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint10 + return nil + } + + var filterProjectEnvsContentHint11 FilterProjectEnvsContentHint11 = FilterProjectEnvsContentHint11{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint11, "", true, true); err == nil { + u.FilterProjectEnvsContentHint11 = &filterProjectEnvsContentHint11 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint11 + return nil + } + + var filterProjectEnvsContentHint12 FilterProjectEnvsContentHint12 = FilterProjectEnvsContentHint12{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint12, "", true, true); err == nil { + u.FilterProjectEnvsContentHint12 = &filterProjectEnvsContentHint12 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint12 + return nil + } + + var filterProjectEnvsContentHint13 FilterProjectEnvsContentHint13 = FilterProjectEnvsContentHint13{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint13, "", true, true); err == nil { + u.FilterProjectEnvsContentHint13 = &filterProjectEnvsContentHint13 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint13 + return nil + } + + var filterProjectEnvsContentHint15 FilterProjectEnvsContentHint15 = FilterProjectEnvsContentHint15{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint15, "", true, true); err == nil { + u.FilterProjectEnvsContentHint15 = &filterProjectEnvsContentHint15 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint15 + return nil + } + + var filterProjectEnvsContentHint14 FilterProjectEnvsContentHint14 = FilterProjectEnvsContentHint14{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsContentHint14, "", true, true); err == nil { + u.FilterProjectEnvsContentHint14 = &filterProjectEnvsContentHint14 + u.Type = ResponseBodyContentHintTypeFilterProjectEnvsContentHint14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyContentHint", string(data)) +} + +func (u ResponseBodyContentHint) MarshalJSON() ([]byte, error) { + if u.FilterProjectEnvsContentHint1 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint1, "", true) + } + + if u.FilterProjectEnvsContentHint2 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint2, "", true) + } + + if u.FilterProjectEnvsContentHint3 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint3, "", true) + } + + if u.FilterProjectEnvsContentHint4 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint4, "", true) + } + + if u.FilterProjectEnvsContentHint5 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint5, "", true) + } + + if u.FilterProjectEnvsContentHint6 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint6, "", true) + } + + if u.FilterProjectEnvsContentHint7 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint7, "", true) + } + + if u.FilterProjectEnvsContentHint8 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint8, "", true) + } + + if u.FilterProjectEnvsContentHint9 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint9, "", true) + } + + if u.FilterProjectEnvsContentHint10 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint10, "", true) + } + + if u.FilterProjectEnvsContentHint11 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint11, "", true) + } + + if u.FilterProjectEnvsContentHint12 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint12, "", true) + } + + if u.FilterProjectEnvsContentHint13 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint13, "", true) + } + + if u.FilterProjectEnvsContentHint14 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint14, "", true) + } + + if u.FilterProjectEnvsContentHint15 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsContentHint15, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyContentHint: all fields are null") +} + +type FilterProjectEnvsResponseBodyProjectsType string + +const ( + FilterProjectEnvsResponseBodyProjectsTypeFlagsSecret FilterProjectEnvsResponseBodyProjectsType = "flags-secret" +) + +func (e FilterProjectEnvsResponseBodyProjectsType) ToPointer() *FilterProjectEnvsResponseBodyProjectsType { + return &e +} +func (e *FilterProjectEnvsResponseBodyProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = FilterProjectEnvsResponseBodyProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for FilterProjectEnvsResponseBodyProjectsType: %v", v) + } +} + +// ResponseBodyInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type ResponseBodyInternalContentHint struct { + Type FilterProjectEnvsResponseBodyProjectsType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *ResponseBodyInternalContentHint) GetType() FilterProjectEnvsResponseBodyProjectsType { + if o == nil { + return FilterProjectEnvsResponseBodyProjectsType("") + } + return o.Type +} + +func (o *ResponseBodyInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type FilterProjectEnvsResponseBody1 struct { + Target *FilterProjectEnvsResponseBodyTarget `json:"target,omitempty"` + Type *FilterProjectEnvsResponseBodyType `json:"type,omitempty"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key *string `json:"key,omitempty"` + Value *string `json:"value,omitempty"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *ResponseBodyContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *ResponseBodyInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` + System *bool `json:"system,omitempty"` +} + +func (o *FilterProjectEnvsResponseBody1) GetTarget() *FilterProjectEnvsResponseBodyTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *FilterProjectEnvsResponseBody1) GetType() *FilterProjectEnvsResponseBodyType { + if o == nil { + return nil + } + return o.Type +} + +func (o *FilterProjectEnvsResponseBody1) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *FilterProjectEnvsResponseBody1) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *FilterProjectEnvsResponseBody1) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *FilterProjectEnvsResponseBody1) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *FilterProjectEnvsResponseBody1) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *FilterProjectEnvsResponseBody1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *FilterProjectEnvsResponseBody1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *FilterProjectEnvsResponseBody1) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *FilterProjectEnvsResponseBody1) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *FilterProjectEnvsResponseBody1) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *FilterProjectEnvsResponseBody1) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *FilterProjectEnvsResponseBody1) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *FilterProjectEnvsResponseBody1) GetContentHint() *ResponseBodyContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *FilterProjectEnvsResponseBody1) GetInternalContentHint() *ResponseBodyInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *FilterProjectEnvsResponseBody1) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *FilterProjectEnvsResponseBody1) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *FilterProjectEnvsResponseBody1) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *FilterProjectEnvsResponseBody1) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +func (o *FilterProjectEnvsResponseBody1) GetSystem() *bool { + if o == nil { + return nil + } + return o.System +} + +type FilterProjectEnvsResponseBodyUnionType string + +const ( + FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody1 FilterProjectEnvsResponseBodyUnionType = "filterProjectEnvs_responseBody_1" + FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody2 FilterProjectEnvsResponseBodyUnionType = "filterProjectEnvs_responseBody_2" + FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody3 FilterProjectEnvsResponseBodyUnionType = "filterProjectEnvs_responseBody_3" +) + +// FilterProjectEnvsResponseBody - The list of environment variables for the given project +type FilterProjectEnvsResponseBody struct { + FilterProjectEnvsResponseBody1 *FilterProjectEnvsResponseBody1 + FilterProjectEnvsResponseBody2 *FilterProjectEnvsResponseBody2 + FilterProjectEnvsResponseBody3 *FilterProjectEnvsResponseBody3 + + Type FilterProjectEnvsResponseBodyUnionType +} + +func CreateFilterProjectEnvsResponseBodyFilterProjectEnvsResponseBody1(filterProjectEnvsResponseBody1 FilterProjectEnvsResponseBody1) FilterProjectEnvsResponseBody { + typ := FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody1 + + return FilterProjectEnvsResponseBody{ + FilterProjectEnvsResponseBody1: &filterProjectEnvsResponseBody1, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyFilterProjectEnvsResponseBody2(filterProjectEnvsResponseBody2 FilterProjectEnvsResponseBody2) FilterProjectEnvsResponseBody { + typ := FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody2 + + return FilterProjectEnvsResponseBody{ + FilterProjectEnvsResponseBody2: &filterProjectEnvsResponseBody2, + Type: typ, + } +} + +func CreateFilterProjectEnvsResponseBodyFilterProjectEnvsResponseBody3(filterProjectEnvsResponseBody3 FilterProjectEnvsResponseBody3) FilterProjectEnvsResponseBody { + typ := FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody3 + + return FilterProjectEnvsResponseBody{ + FilterProjectEnvsResponseBody3: &filterProjectEnvsResponseBody3, + Type: typ, + } +} + +func (u *FilterProjectEnvsResponseBody) UnmarshalJSON(data []byte) error { + + var filterProjectEnvsResponseBody3 FilterProjectEnvsResponseBody3 = FilterProjectEnvsResponseBody3{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsResponseBody3, "", true, true); err == nil { + u.FilterProjectEnvsResponseBody3 = &filterProjectEnvsResponseBody3 + u.Type = FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody3 + return nil + } + + var filterProjectEnvsResponseBody2 FilterProjectEnvsResponseBody2 = FilterProjectEnvsResponseBody2{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsResponseBody2, "", true, true); err == nil { + u.FilterProjectEnvsResponseBody2 = &filterProjectEnvsResponseBody2 + u.Type = FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody2 + return nil + } + + var filterProjectEnvsResponseBody1 FilterProjectEnvsResponseBody1 = FilterProjectEnvsResponseBody1{} + if err := utils.UnmarshalJSON(data, &filterProjectEnvsResponseBody1, "", true, true); err == nil { + u.FilterProjectEnvsResponseBody1 = &filterProjectEnvsResponseBody1 + u.Type = FilterProjectEnvsResponseBodyUnionTypeFilterProjectEnvsResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FilterProjectEnvsResponseBody", string(data)) +} + +func (u FilterProjectEnvsResponseBody) MarshalJSON() ([]byte, error) { + if u.FilterProjectEnvsResponseBody1 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsResponseBody1, "", true) + } + + if u.FilterProjectEnvsResponseBody2 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsResponseBody2, "", true) + } + + if u.FilterProjectEnvsResponseBody3 != nil { + return utils.MarshalJSON(u.FilterProjectEnvsResponseBody3, "", true) + } + + return nil, errors.New("could not marshal union type FilterProjectEnvsResponseBody: all fields are null") +} + +type FilterProjectEnvsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The list of environment variables for the given project + OneOf *FilterProjectEnvsResponseBody +} + +func (o *FilterProjectEnvsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *FilterProjectEnvsResponse) GetOneOf() *FilterProjectEnvsResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getaccountinfo.go b/src/__tests__/mockserver/internal/sdk/models/operations/getaccountinfo.go new file mode 100644 index 00000000..750ecf26 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getaccountinfo.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetAccountInfoRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` +} + +func (o *GetAccountInfoRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type Contact struct { + Email string `json:"email"` + Name *string `json:"name,omitempty"` +} + +func (o *Contact) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *Contact) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +type GetAccountInfoResponseBody struct { + Name *string `json:"name,omitempty"` + URL string `json:"url"` + Contact *Contact `json:"contact"` +} + +func (o *GetAccountInfoResponseBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *GetAccountInfoResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetAccountInfoResponseBody) GetContact() *Contact { + if o == nil { + return nil + } + return o.Contact +} + +type GetAccountInfoResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetAccountInfoResponseBody +} + +func (o *GetAccountInfoResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetAccountInfoResponse) GetObject() *GetAccountInfoResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getalias.go b/src/__tests__/mockserver/internal/sdk/models/operations/getalias.go new file mode 100644 index 00000000..d99a4ad5 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getalias.go @@ -0,0 +1,653 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "time" +) + +type GetAliasRequest struct { + // Get the alias only if it was created after the provided timestamp + From *float64 `queryParam:"style=form,explode=true,name=from"` + // The alias or alias ID to be retrieved + IDOrAlias string `pathParam:"style=simple,explode=false,name=idOrAlias"` + // Get the alias only if it is assigned to the provided project ID + ProjectID *string `queryParam:"style=form,explode=true,name=projectId"` + // Get the alias only if it was created after this JavaScript timestamp + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Get the alias only if it was created before this JavaScript timestamp + Until *float64 `queryParam:"style=form,explode=true,name=until"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetAliasRequest) GetFrom() *float64 { + if o == nil { + return nil + } + return o.From +} + +func (o *GetAliasRequest) GetIDOrAlias() string { + if o == nil { + return "" + } + return o.IDOrAlias +} + +func (o *GetAliasRequest) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetAliasRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetAliasRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *GetAliasRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetAliasRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetAliasCreator - Information of the user who created the alias +type GetAliasCreator struct { + // ID of the user who created the alias + UID string `json:"uid"` + // Email of the user who created the alias + Email string `json:"email"` + // Username of the user who created the alias + Username string `json:"username"` +} + +func (o *GetAliasCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *GetAliasCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *GetAliasCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +// Deployment - A map with the deployment ID, URL and metadata +type Deployment struct { + // The deployment unique identifier + ID string `json:"id"` + // The deployment unique URL + URL string `json:"url"` + // The deployment metadata + Meta *string `json:"meta,omitempty"` +} + +func (o *Deployment) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Deployment) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *Deployment) GetMeta() *string { + if o == nil { + return nil + } + return o.Meta +} + +type GetAliasProtectionBypassAliasesResponseScope string + +const ( + GetAliasProtectionBypassAliasesResponseScopeEmailInvite GetAliasProtectionBypassAliasesResponseScope = "email_invite" +) + +func (e GetAliasProtectionBypassAliasesResponseScope) ToPointer() *GetAliasProtectionBypassAliasesResponseScope { + return &e +} +func (e *GetAliasProtectionBypassAliasesResponseScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "email_invite": + *e = GetAliasProtectionBypassAliasesResponseScope(v) + return nil + default: + return fmt.Errorf("invalid value for GetAliasProtectionBypassAliasesResponseScope: %v", v) + } +} + +// ProtectionBypass4 - The protection bypass for the alias +type ProtectionBypass4 struct { + CreatedAt float64 `json:"createdAt"` + LastUpdatedAt float64 `json:"lastUpdatedAt"` + LastUpdatedBy string `json:"lastUpdatedBy"` + Scope GetAliasProtectionBypassAliasesResponseScope `json:"scope"` +} + +func (o *ProtectionBypass4) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ProtectionBypass4) GetLastUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.LastUpdatedAt +} + +func (o *ProtectionBypass4) GetLastUpdatedBy() string { + if o == nil { + return "" + } + return o.LastUpdatedBy +} + +func (o *ProtectionBypass4) GetScope() GetAliasProtectionBypassAliasesResponseScope { + if o == nil { + return GetAliasProtectionBypassAliasesResponseScope("") + } + return o.Scope +} + +type GetAliasProtectionBypassAliasesScope string + +const ( + GetAliasProtectionBypassAliasesScopeAliasProtectionOverride GetAliasProtectionBypassAliasesScope = "alias-protection-override" +) + +func (e GetAliasProtectionBypassAliasesScope) ToPointer() *GetAliasProtectionBypassAliasesScope { + return &e +} +func (e *GetAliasProtectionBypassAliasesScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "alias-protection-override": + *e = GetAliasProtectionBypassAliasesScope(v) + return nil + default: + return fmt.Errorf("invalid value for GetAliasProtectionBypassAliasesScope: %v", v) + } +} + +// ProtectionBypass3 - The protection bypass for the alias +type ProtectionBypass3 struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope GetAliasProtectionBypassAliasesScope `json:"scope"` +} + +func (o *ProtectionBypass3) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ProtectionBypass3) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *ProtectionBypass3) GetScope() GetAliasProtectionBypassAliasesScope { + if o == nil { + return GetAliasProtectionBypassAliasesScope("") + } + return o.Scope +} + +type Access string + +const ( + AccessRequested Access = "requested" + AccessGranted Access = "granted" +) + +func (e Access) ToPointer() *Access { + return &e +} +func (e *Access) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "requested": + fallthrough + case "granted": + *e = Access(v) + return nil + default: + return fmt.Errorf("invalid value for Access: %v", v) + } +} + +type GetAliasProtectionBypassScope string + +const ( + GetAliasProtectionBypassScopeUser GetAliasProtectionBypassScope = "user" +) + +func (e GetAliasProtectionBypassScope) ToPointer() *GetAliasProtectionBypassScope { + return &e +} +func (e *GetAliasProtectionBypassScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "user": + *e = GetAliasProtectionBypassScope(v) + return nil + default: + return fmt.Errorf("invalid value for GetAliasProtectionBypassScope: %v", v) + } +} + +// ProtectionBypass2 - The protection bypass for the alias +type ProtectionBypass2 struct { + CreatedAt float64 `json:"createdAt"` + LastUpdatedAt float64 `json:"lastUpdatedAt"` + LastUpdatedBy string `json:"lastUpdatedBy"` + Access Access `json:"access"` + Scope GetAliasProtectionBypassScope `json:"scope"` +} + +func (o *ProtectionBypass2) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ProtectionBypass2) GetLastUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.LastUpdatedAt +} + +func (o *ProtectionBypass2) GetLastUpdatedBy() string { + if o == nil { + return "" + } + return o.LastUpdatedBy +} + +func (o *ProtectionBypass2) GetAccess() Access { + if o == nil { + return Access("") + } + return o.Access +} + +func (o *ProtectionBypass2) GetScope() GetAliasProtectionBypassScope { + if o == nil { + return GetAliasProtectionBypassScope("") + } + return o.Scope +} + +type ProtectionBypassScope string + +const ( + ProtectionBypassScopeShareableLink ProtectionBypassScope = "shareable-link" +) + +func (e ProtectionBypassScope) ToPointer() *ProtectionBypassScope { + return &e +} +func (e *ProtectionBypassScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "shareable-link": + *e = ProtectionBypassScope(v) + return nil + default: + return fmt.Errorf("invalid value for ProtectionBypassScope: %v", v) + } +} + +// ProtectionBypass1 - The protection bypass for the alias +type ProtectionBypass1 struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope ProtectionBypassScope `json:"scope"` +} + +func (o *ProtectionBypass1) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ProtectionBypass1) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *ProtectionBypass1) GetScope() ProtectionBypassScope { + if o == nil { + return ProtectionBypassScope("") + } + return o.Scope +} + +type GetAliasProtectionBypassType string + +const ( + GetAliasProtectionBypassTypeProtectionBypass1 GetAliasProtectionBypassType = "protectionBypass_1" + GetAliasProtectionBypassTypeProtectionBypass2 GetAliasProtectionBypassType = "protectionBypass_2" + GetAliasProtectionBypassTypeProtectionBypass3 GetAliasProtectionBypassType = "protectionBypass_3" + GetAliasProtectionBypassTypeProtectionBypass4 GetAliasProtectionBypassType = "protectionBypass_4" +) + +type GetAliasProtectionBypass struct { + ProtectionBypass1 *ProtectionBypass1 + ProtectionBypass2 *ProtectionBypass2 + ProtectionBypass3 *ProtectionBypass3 + ProtectionBypass4 *ProtectionBypass4 + + Type GetAliasProtectionBypassType +} + +func CreateGetAliasProtectionBypassProtectionBypass1(protectionBypass1 ProtectionBypass1) GetAliasProtectionBypass { + typ := GetAliasProtectionBypassTypeProtectionBypass1 + + return GetAliasProtectionBypass{ + ProtectionBypass1: &protectionBypass1, + Type: typ, + } +} + +func CreateGetAliasProtectionBypassProtectionBypass2(protectionBypass2 ProtectionBypass2) GetAliasProtectionBypass { + typ := GetAliasProtectionBypassTypeProtectionBypass2 + + return GetAliasProtectionBypass{ + ProtectionBypass2: &protectionBypass2, + Type: typ, + } +} + +func CreateGetAliasProtectionBypassProtectionBypass3(protectionBypass3 ProtectionBypass3) GetAliasProtectionBypass { + typ := GetAliasProtectionBypassTypeProtectionBypass3 + + return GetAliasProtectionBypass{ + ProtectionBypass3: &protectionBypass3, + Type: typ, + } +} + +func CreateGetAliasProtectionBypassProtectionBypass4(protectionBypass4 ProtectionBypass4) GetAliasProtectionBypass { + typ := GetAliasProtectionBypassTypeProtectionBypass4 + + return GetAliasProtectionBypass{ + ProtectionBypass4: &protectionBypass4, + Type: typ, + } +} + +func (u *GetAliasProtectionBypass) UnmarshalJSON(data []byte) error { + + var protectionBypass1 ProtectionBypass1 = ProtectionBypass1{} + if err := utils.UnmarshalJSON(data, &protectionBypass1, "", true, true); err == nil { + u.ProtectionBypass1 = &protectionBypass1 + u.Type = GetAliasProtectionBypassTypeProtectionBypass1 + return nil + } + + var protectionBypass3 ProtectionBypass3 = ProtectionBypass3{} + if err := utils.UnmarshalJSON(data, &protectionBypass3, "", true, true); err == nil { + u.ProtectionBypass3 = &protectionBypass3 + u.Type = GetAliasProtectionBypassTypeProtectionBypass3 + return nil + } + + var protectionBypass4 ProtectionBypass4 = ProtectionBypass4{} + if err := utils.UnmarshalJSON(data, &protectionBypass4, "", true, true); err == nil { + u.ProtectionBypass4 = &protectionBypass4 + u.Type = GetAliasProtectionBypassTypeProtectionBypass4 + return nil + } + + var protectionBypass2 ProtectionBypass2 = ProtectionBypass2{} + if err := utils.UnmarshalJSON(data, &protectionBypass2, "", true, true); err == nil { + u.ProtectionBypass2 = &protectionBypass2 + u.Type = GetAliasProtectionBypassTypeProtectionBypass2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetAliasProtectionBypass", string(data)) +} + +func (u GetAliasProtectionBypass) MarshalJSON() ([]byte, error) { + if u.ProtectionBypass1 != nil { + return utils.MarshalJSON(u.ProtectionBypass1, "", true) + } + + if u.ProtectionBypass2 != nil { + return utils.MarshalJSON(u.ProtectionBypass2, "", true) + } + + if u.ProtectionBypass3 != nil { + return utils.MarshalJSON(u.ProtectionBypass3, "", true) + } + + if u.ProtectionBypass4 != nil { + return utils.MarshalJSON(u.ProtectionBypass4, "", true) + } + + return nil, errors.New("could not marshal union type GetAliasProtectionBypass: all fields are null") +} + +// GetAliasResponseBody - The alias information +type GetAliasResponseBody struct { + // The alias name, it could be a `.vercel.app` subdomain or a custom domain + Alias string `json:"alias"` + // The date when the alias was created + Created time.Time `json:"created"` + // The date when the alias was created in milliseconds since the UNIX epoch + CreatedAt *float64 `json:"createdAt,omitempty"` + // Information of the user who created the alias + Creator *GetAliasCreator `json:"creator,omitempty"` + // The date when the alias was deleted in milliseconds since the UNIX epoch + DeletedAt *float64 `json:"deletedAt,omitempty"` + // A map with the deployment ID, URL and metadata + Deployment *Deployment `json:"deployment,omitempty"` + // The deployment ID + DeploymentID *string `json:"deploymentId"` + // The unique identifier of the project + ProjectID *string `json:"projectId"` + // Target destination domain for redirect when the alias is a redirect + Redirect *string `json:"redirect,omitempty"` + // Status code to be used on redirect + RedirectStatusCode *float64 `json:"redirectStatusCode,omitempty"` + // The unique identifier of the alias + UID string `json:"uid"` + // The date when the alias was updated in milliseconds since the UNIX epoch + UpdatedAt *float64 `json:"updatedAt,omitempty"` + // The protection bypass for the alias + ProtectionBypass map[string]GetAliasProtectionBypass `json:"protectionBypass,omitempty"` +} + +func (g GetAliasResponseBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetAliasResponseBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetAliasResponseBody) GetAlias() string { + if o == nil { + return "" + } + return o.Alias +} + +func (o *GetAliasResponseBody) GetCreated() time.Time { + if o == nil { + return time.Time{} + } + return o.Created +} + +func (o *GetAliasResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetAliasResponseBody) GetCreator() *GetAliasCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *GetAliasResponseBody) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetAliasResponseBody) GetDeployment() *Deployment { + if o == nil { + return nil + } + return o.Deployment +} + +func (o *GetAliasResponseBody) GetDeploymentID() *string { + if o == nil { + return nil + } + return o.DeploymentID +} + +func (o *GetAliasResponseBody) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetAliasResponseBody) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *GetAliasResponseBody) GetRedirectStatusCode() *float64 { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +func (o *GetAliasResponseBody) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *GetAliasResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetAliasResponseBody) GetProtectionBypass() map[string]GetAliasProtectionBypass { + if o == nil { + return nil + } + return o.ProtectionBypass +} + +type GetAliasResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The alias information + Object *GetAliasResponseBody +} + +func (o *GetAliasResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetAliasResponse) GetObject() *GetAliasResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getallchecks.go b/src/__tests__/mockserver/internal/sdk/models/operations/getallchecks.go new file mode 100644 index 00000000..f03e7b56 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getallchecks.go @@ -0,0 +1,547 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetAllChecksRequest struct { + // The deployment to get all checks for + DeploymentID string `pathParam:"style=simple,explode=false,name=deploymentId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetAllChecksRequest) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *GetAllChecksRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetAllChecksRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetAllChecksConclusion string + +const ( + GetAllChecksConclusionCanceled GetAllChecksConclusion = "canceled" + GetAllChecksConclusionFailed GetAllChecksConclusion = "failed" + GetAllChecksConclusionNeutral GetAllChecksConclusion = "neutral" + GetAllChecksConclusionSucceeded GetAllChecksConclusion = "succeeded" + GetAllChecksConclusionSkipped GetAllChecksConclusion = "skipped" + GetAllChecksConclusionStale GetAllChecksConclusion = "stale" +) + +func (e GetAllChecksConclusion) ToPointer() *GetAllChecksConclusion { + return &e +} +func (e *GetAllChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "canceled": + fallthrough + case "failed": + fallthrough + case "neutral": + fallthrough + case "succeeded": + fallthrough + case "skipped": + fallthrough + case "stale": + *e = GetAllChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllChecksConclusion: %v", v) + } +} + +type GetAllChecksSource string + +const ( + GetAllChecksSourceWebVitals GetAllChecksSource = "web-vitals" +) + +func (e GetAllChecksSource) ToPointer() *GetAllChecksSource { + return &e +} +func (e *GetAllChecksSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetAllChecksSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllChecksSource: %v", v) + } +} + +type GetAllChecksFCP struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetAllChecksSource `json:"source"` +} + +func (o *GetAllChecksFCP) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetAllChecksFCP) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetAllChecksFCP) GetSource() GetAllChecksSource { + if o == nil { + return GetAllChecksSource("") + } + return o.Source +} + +type GetAllChecksChecksSource string + +const ( + GetAllChecksChecksSourceWebVitals GetAllChecksChecksSource = "web-vitals" +) + +func (e GetAllChecksChecksSource) ToPointer() *GetAllChecksChecksSource { + return &e +} +func (e *GetAllChecksChecksSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetAllChecksChecksSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllChecksChecksSource: %v", v) + } +} + +type GetAllChecksLCP struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetAllChecksChecksSource `json:"source"` +} + +func (o *GetAllChecksLCP) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetAllChecksLCP) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetAllChecksLCP) GetSource() GetAllChecksChecksSource { + if o == nil { + return GetAllChecksChecksSource("") + } + return o.Source +} + +type GetAllChecksChecksResponseSource string + +const ( + GetAllChecksChecksResponseSourceWebVitals GetAllChecksChecksResponseSource = "web-vitals" +) + +func (e GetAllChecksChecksResponseSource) ToPointer() *GetAllChecksChecksResponseSource { + return &e +} +func (e *GetAllChecksChecksResponseSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetAllChecksChecksResponseSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllChecksChecksResponseSource: %v", v) + } +} + +type GetAllChecksCLS struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetAllChecksChecksResponseSource `json:"source"` +} + +func (o *GetAllChecksCLS) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetAllChecksCLS) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetAllChecksCLS) GetSource() GetAllChecksChecksResponseSource { + if o == nil { + return GetAllChecksChecksResponseSource("") + } + return o.Source +} + +type GetAllChecksChecksResponse200Source string + +const ( + GetAllChecksChecksResponse200SourceWebVitals GetAllChecksChecksResponse200Source = "web-vitals" +) + +func (e GetAllChecksChecksResponse200Source) ToPointer() *GetAllChecksChecksResponse200Source { + return &e +} +func (e *GetAllChecksChecksResponse200Source) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetAllChecksChecksResponse200Source(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllChecksChecksResponse200Source: %v", v) + } +} + +type GetAllChecksTBT struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetAllChecksChecksResponse200Source `json:"source"` +} + +func (o *GetAllChecksTBT) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetAllChecksTBT) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetAllChecksTBT) GetSource() GetAllChecksChecksResponse200Source { + if o == nil { + return GetAllChecksChecksResponse200Source("") + } + return o.Source +} + +type GetAllChecksChecksResponse200ApplicationJSONSource string + +const ( + GetAllChecksChecksResponse200ApplicationJSONSourceWebVitals GetAllChecksChecksResponse200ApplicationJSONSource = "web-vitals" +) + +func (e GetAllChecksChecksResponse200ApplicationJSONSource) ToPointer() *GetAllChecksChecksResponse200ApplicationJSONSource { + return &e +} +func (e *GetAllChecksChecksResponse200ApplicationJSONSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetAllChecksChecksResponse200ApplicationJSONSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllChecksChecksResponse200ApplicationJSONSource: %v", v) + } +} + +type GetAllChecksVirtualExperienceScore struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetAllChecksChecksResponse200ApplicationJSONSource `json:"source"` +} + +func (o *GetAllChecksVirtualExperienceScore) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetAllChecksVirtualExperienceScore) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetAllChecksVirtualExperienceScore) GetSource() GetAllChecksChecksResponse200ApplicationJSONSource { + if o == nil { + return GetAllChecksChecksResponse200ApplicationJSONSource("") + } + return o.Source +} + +type GetAllChecksMetrics struct { + Fcp GetAllChecksFCP `json:"FCP"` + Lcp GetAllChecksLCP `json:"LCP"` + Cls GetAllChecksCLS `json:"CLS"` + Tbt GetAllChecksTBT `json:"TBT"` + VirtualExperienceScore *GetAllChecksVirtualExperienceScore `json:"virtualExperienceScore,omitempty"` +} + +func (o *GetAllChecksMetrics) GetFcp() GetAllChecksFCP { + if o == nil { + return GetAllChecksFCP{} + } + return o.Fcp +} + +func (o *GetAllChecksMetrics) GetLcp() GetAllChecksLCP { + if o == nil { + return GetAllChecksLCP{} + } + return o.Lcp +} + +func (o *GetAllChecksMetrics) GetCls() GetAllChecksCLS { + if o == nil { + return GetAllChecksCLS{} + } + return o.Cls +} + +func (o *GetAllChecksMetrics) GetTbt() GetAllChecksTBT { + if o == nil { + return GetAllChecksTBT{} + } + return o.Tbt +} + +func (o *GetAllChecksMetrics) GetVirtualExperienceScore() *GetAllChecksVirtualExperienceScore { + if o == nil { + return nil + } + return o.VirtualExperienceScore +} + +type GetAllChecksOutput struct { + Metrics *GetAllChecksMetrics `json:"metrics,omitempty"` +} + +func (o *GetAllChecksOutput) GetMetrics() *GetAllChecksMetrics { + if o == nil { + return nil + } + return o.Metrics +} + +type GetAllChecksStatus string + +const ( + GetAllChecksStatusRegistered GetAllChecksStatus = "registered" + GetAllChecksStatusRunning GetAllChecksStatus = "running" + GetAllChecksStatusCompleted GetAllChecksStatus = "completed" +) + +func (e GetAllChecksStatus) ToPointer() *GetAllChecksStatus { + return &e +} +func (e *GetAllChecksStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = GetAllChecksStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllChecksStatus: %v", v) + } +} + +type Checks struct { + CompletedAt *float64 `json:"completedAt,omitempty"` + Conclusion *GetAllChecksConclusion `json:"conclusion,omitempty"` + CreatedAt float64 `json:"createdAt"` + DetailsURL *string `json:"detailsUrl,omitempty"` + ID string `json:"id"` + IntegrationID string `json:"integrationId"` + Name string `json:"name"` + Output *GetAllChecksOutput `json:"output,omitempty"` + Path *string `json:"path,omitempty"` + Rerequestable bool `json:"rerequestable"` + StartedAt *float64 `json:"startedAt,omitempty"` + Status GetAllChecksStatus `json:"status"` + UpdatedAt float64 `json:"updatedAt"` +} + +func (o *Checks) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *Checks) GetConclusion() *GetAllChecksConclusion { + if o == nil { + return nil + } + return o.Conclusion +} + +func (o *Checks) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *Checks) GetDetailsURL() *string { + if o == nil { + return nil + } + return o.DetailsURL +} + +func (o *Checks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Checks) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *Checks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Checks) GetOutput() *GetAllChecksOutput { + if o == nil { + return nil + } + return o.Output +} + +func (o *Checks) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +func (o *Checks) GetRerequestable() bool { + if o == nil { + return false + } + return o.Rerequestable +} + +func (o *Checks) GetStartedAt() *float64 { + if o == nil { + return nil + } + return o.StartedAt +} + +func (o *Checks) GetStatus() GetAllChecksStatus { + if o == nil { + return GetAllChecksStatus("") + } + return o.Status +} + +func (o *Checks) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +type GetAllChecksResponseBody struct { + Checks []Checks `json:"checks"` +} + +func (o *GetAllChecksResponseBody) GetChecks() []Checks { + if o == nil { + return []Checks{} + } + return o.Checks +} + +type GetAllChecksResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetAllChecksResponseBody +} + +func (o *GetAllChecksResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetAllChecksResponse) GetObject() *GetAllChecksResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getalllogdrains.go b/src/__tests__/mockserver/internal/sdk/models/operations/getalllogdrains.go new file mode 100644 index 00000000..f4448951 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getalllogdrains.go @@ -0,0 +1,432 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetAllLogDrainsRequest struct { + ProjectID *string `queryParam:"style=form,explode=true,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetAllLogDrainsRequest) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetAllLogDrainsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetAllLogDrainsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetAllLogDrainsDeliveryFormat string + +const ( + GetAllLogDrainsDeliveryFormatJSON GetAllLogDrainsDeliveryFormat = "json" + GetAllLogDrainsDeliveryFormatNdjson GetAllLogDrainsDeliveryFormat = "ndjson" + GetAllLogDrainsDeliveryFormatSyslog GetAllLogDrainsDeliveryFormat = "syslog" +) + +func (e GetAllLogDrainsDeliveryFormat) ToPointer() *GetAllLogDrainsDeliveryFormat { + return &e +} +func (e *GetAllLogDrainsDeliveryFormat) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "json": + fallthrough + case "ndjson": + fallthrough + case "syslog": + *e = GetAllLogDrainsDeliveryFormat(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllLogDrainsDeliveryFormat: %v", v) + } +} + +type GetAllLogDrainsSources string + +const ( + GetAllLogDrainsSourcesBuild GetAllLogDrainsSources = "build" + GetAllLogDrainsSourcesEdge GetAllLogDrainsSources = "edge" + GetAllLogDrainsSourcesLambda GetAllLogDrainsSources = "lambda" + GetAllLogDrainsSourcesStatic GetAllLogDrainsSources = "static" + GetAllLogDrainsSourcesExternal GetAllLogDrainsSources = "external" + GetAllLogDrainsSourcesFirewall GetAllLogDrainsSources = "firewall" +) + +func (e GetAllLogDrainsSources) ToPointer() *GetAllLogDrainsSources { + return &e +} +func (e *GetAllLogDrainsSources) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "build": + fallthrough + case "edge": + fallthrough + case "lambda": + fallthrough + case "static": + fallthrough + case "external": + fallthrough + case "firewall": + *e = GetAllLogDrainsSources(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllLogDrainsSources: %v", v) + } +} + +type GetAllLogDrainsEnvironments string + +const ( + GetAllLogDrainsEnvironmentsProduction GetAllLogDrainsEnvironments = "production" + GetAllLogDrainsEnvironmentsPreview GetAllLogDrainsEnvironments = "preview" +) + +func (e GetAllLogDrainsEnvironments) ToPointer() *GetAllLogDrainsEnvironments { + return &e +} +func (e *GetAllLogDrainsEnvironments) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + *e = GetAllLogDrainsEnvironments(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllLogDrainsEnvironments: %v", v) + } +} + +type GetAllLogDrainsStatus string + +const ( + GetAllLogDrainsStatusEnabled GetAllLogDrainsStatus = "enabled" + GetAllLogDrainsStatusDisabled GetAllLogDrainsStatus = "disabled" + GetAllLogDrainsStatusErrored GetAllLogDrainsStatus = "errored" +) + +func (e GetAllLogDrainsStatus) ToPointer() *GetAllLogDrainsStatus { + return &e +} +func (e *GetAllLogDrainsStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "enabled": + fallthrough + case "disabled": + fallthrough + case "errored": + *e = GetAllLogDrainsStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllLogDrainsStatus: %v", v) + } +} + +type GetAllLogDrainsDisabledReason string + +const ( + GetAllLogDrainsDisabledReasonDisabledByOwner GetAllLogDrainsDisabledReason = "disabled-by-owner" + GetAllLogDrainsDisabledReasonFeatureNotAvailable GetAllLogDrainsDisabledReason = "feature-not-available" + GetAllLogDrainsDisabledReasonAccountPlanDowngrade GetAllLogDrainsDisabledReason = "account-plan-downgrade" + GetAllLogDrainsDisabledReasonDisabledByAdmin GetAllLogDrainsDisabledReason = "disabled-by-admin" +) + +func (e GetAllLogDrainsDisabledReason) ToPointer() *GetAllLogDrainsDisabledReason { + return &e +} +func (e *GetAllLogDrainsDisabledReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "disabled-by-owner": + fallthrough + case "feature-not-available": + fallthrough + case "account-plan-downgrade": + fallthrough + case "disabled-by-admin": + *e = GetAllLogDrainsDisabledReason(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllLogDrainsDisabledReason: %v", v) + } +} + +type GetAllLogDrainsCreatedFrom string + +const ( + GetAllLogDrainsCreatedFromSelfServed GetAllLogDrainsCreatedFrom = "self-served" + GetAllLogDrainsCreatedFromIntegration GetAllLogDrainsCreatedFrom = "integration" +) + +func (e GetAllLogDrainsCreatedFrom) ToPointer() *GetAllLogDrainsCreatedFrom { + return &e +} +func (e *GetAllLogDrainsCreatedFrom) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "self-served": + fallthrough + case "integration": + *e = GetAllLogDrainsCreatedFrom(v) + return nil + default: + return fmt.Errorf("invalid value for GetAllLogDrainsCreatedFrom: %v", v) + } +} + +type GetAllLogDrainsResponseBody struct { + ID string `json:"id"` + DeliveryFormat GetAllLogDrainsDeliveryFormat `json:"deliveryFormat"` + URL string `json:"url"` + Name string `json:"name"` + ClientID *string `json:"clientId,omitempty"` + ConfigurationID *string `json:"configurationId,omitempty"` + TeamID *string `json:"teamId,omitempty"` + OwnerID string `json:"ownerId"` + ProjectIds []string `json:"projectIds,omitempty"` + CreatedAt float64 `json:"createdAt"` + DeletedAt *float64 `json:"deletedAt"` + UpdatedAt float64 `json:"updatedAt"` + Sources []GetAllLogDrainsSources `json:"sources,omitempty"` + Headers map[string]string `json:"headers,omitempty"` + Environments []GetAllLogDrainsEnvironments `json:"environments"` + Status *GetAllLogDrainsStatus `json:"status,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + DisabledReason *GetAllLogDrainsDisabledReason `json:"disabledReason,omitempty"` + DisabledBy *string `json:"disabledBy,omitempty"` + FirstErrorTimestamp *float64 `json:"firstErrorTimestamp,omitempty"` + SamplingRate *float64 `json:"samplingRate,omitempty"` + HideIPAddresses *bool `json:"hideIpAddresses,omitempty"` + Secret *string `json:"secret,omitempty"` + CreatedFrom *GetAllLogDrainsCreatedFrom `json:"createdFrom,omitempty"` +} + +func (o *GetAllLogDrainsResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetAllLogDrainsResponseBody) GetDeliveryFormat() GetAllLogDrainsDeliveryFormat { + if o == nil { + return GetAllLogDrainsDeliveryFormat("") + } + return o.DeliveryFormat +} + +func (o *GetAllLogDrainsResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetAllLogDrainsResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetAllLogDrainsResponseBody) GetClientID() *string { + if o == nil { + return nil + } + return o.ClientID +} + +func (o *GetAllLogDrainsResponseBody) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *GetAllLogDrainsResponseBody) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetAllLogDrainsResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetAllLogDrainsResponseBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +func (o *GetAllLogDrainsResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetAllLogDrainsResponseBody) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetAllLogDrainsResponseBody) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetAllLogDrainsResponseBody) GetSources() []GetAllLogDrainsSources { + if o == nil { + return nil + } + return o.Sources +} + +func (o *GetAllLogDrainsResponseBody) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *GetAllLogDrainsResponseBody) GetEnvironments() []GetAllLogDrainsEnvironments { + if o == nil { + return []GetAllLogDrainsEnvironments{} + } + return o.Environments +} + +func (o *GetAllLogDrainsResponseBody) GetStatus() *GetAllLogDrainsStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *GetAllLogDrainsResponseBody) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetAllLogDrainsResponseBody) GetDisabledReason() *GetAllLogDrainsDisabledReason { + if o == nil { + return nil + } + return o.DisabledReason +} + +func (o *GetAllLogDrainsResponseBody) GetDisabledBy() *string { + if o == nil { + return nil + } + return o.DisabledBy +} + +func (o *GetAllLogDrainsResponseBody) GetFirstErrorTimestamp() *float64 { + if o == nil { + return nil + } + return o.FirstErrorTimestamp +} + +func (o *GetAllLogDrainsResponseBody) GetSamplingRate() *float64 { + if o == nil { + return nil + } + return o.SamplingRate +} + +func (o *GetAllLogDrainsResponseBody) GetHideIPAddresses() *bool { + if o == nil { + return nil + } + return o.HideIPAddresses +} + +func (o *GetAllLogDrainsResponseBody) GetSecret() *string { + if o == nil { + return nil + } + return o.Secret +} + +func (o *GetAllLogDrainsResponseBody) GetCreatedFrom() *GetAllLogDrainsCreatedFrom { + if o == nil { + return nil + } + return o.CreatedFrom +} + +type GetAllLogDrainsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + ResponseBodies []GetAllLogDrainsResponseBody +} + +func (o *GetAllLogDrainsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetAllLogDrainsResponse) GetResponseBodies() []GetAllLogDrainsResponseBody { + if o == nil { + return nil + } + return o.ResponseBodies +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getauthtoken.go b/src/__tests__/mockserver/internal/sdk/models/operations/getauthtoken.go new file mode 100644 index 00000000..11f61d89 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getauthtoken.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetAuthTokenRequest struct { + // The identifier of the token to retrieve. The special value \"current\" may be supplied, which returns the metadata for the token that the current HTTP request is authenticated with. + TokenID string `pathParam:"style=simple,explode=false,name=tokenId"` +} + +func (o *GetAuthTokenRequest) GetTokenID() string { + if o == nil { + return "" + } + return o.TokenID +} + +// GetAuthTokenResponseBody - Successful response. +type GetAuthTokenResponseBody struct { + // Authentication token metadata. + Token components.AuthToken `json:"token"` +} + +func (o *GetAuthTokenResponseBody) GetToken() components.AuthToken { + if o == nil { + return components.AuthToken{} + } + return o.Token +} + +type GetAuthTokenResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + Object *GetAuthTokenResponseBody +} + +func (o *GetAuthTokenResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetAuthTokenResponse) GetObject() *GetAuthTokenResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getauthuser.go b/src/__tests__/mockserver/internal/sdk/models/operations/getauthuser.go new file mode 100644 index 00000000..54b94641 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getauthuser.go @@ -0,0 +1,105 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type UserType string + +const ( + UserTypeAuthUser UserType = "AuthUser" + UserTypeAuthUserLimited UserType = "AuthUserLimited" +) + +type User struct { + AuthUser *components.AuthUser + AuthUserLimited *components.AuthUserLimited + + Type UserType +} + +func CreateUserAuthUser(authUser components.AuthUser) User { + typ := UserTypeAuthUser + + return User{ + AuthUser: &authUser, + Type: typ, + } +} + +func CreateUserAuthUserLimited(authUserLimited components.AuthUserLimited) User { + typ := UserTypeAuthUserLimited + + return User{ + AuthUserLimited: &authUserLimited, + Type: typ, + } +} + +func (u *User) UnmarshalJSON(data []byte) error { + + var authUserLimited components.AuthUserLimited = components.AuthUserLimited{} + if err := utils.UnmarshalJSON(data, &authUserLimited, "", true, true); err == nil { + u.AuthUserLimited = &authUserLimited + u.Type = UserTypeAuthUserLimited + return nil + } + + var authUser components.AuthUser = components.AuthUser{} + if err := utils.UnmarshalJSON(data, &authUser, "", true, true); err == nil { + u.AuthUser = &authUser + u.Type = UserTypeAuthUser + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for User", string(data)) +} + +func (u User) MarshalJSON() ([]byte, error) { + if u.AuthUser != nil { + return utils.MarshalJSON(u.AuthUser, "", true) + } + + if u.AuthUserLimited != nil { + return utils.MarshalJSON(u.AuthUserLimited, "", true) + } + + return nil, errors.New("could not marshal union type User: all fields are null") +} + +// GetAuthUserResponseBody - Successful response. +type GetAuthUserResponseBody struct { + User User `json:"user"` +} + +func (o *GetAuthUserResponseBody) GetUser() User { + if o == nil { + return User{} + } + return o.User +} + +type GetAuthUserResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + Object *GetAuthUserResponseBody +} + +func (o *GetAuthUserResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetAuthUserResponse) GetObject() *GetAuthUserResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getbypassip.go b/src/__tests__/mockserver/internal/sdk/models/operations/getbypassip.go new file mode 100644 index 00000000..b0759c51 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getbypassip.go @@ -0,0 +1,415 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetBypassIPRequest struct { + ProjectID string `queryParam:"style=form,explode=true,name=projectId"` + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Filter by source IP + SourceIP *string `queryParam:"style=form,explode=true,name=sourceIp"` + // Filter by domain + Domain *string `queryParam:"style=form,explode=true,name=domain"` + // Filter by project scoped rules + ProjectScope *bool `queryParam:"style=form,explode=true,name=projectScope"` + // Used for pagination. Retrieves results after the provided id + Offset *string `queryParam:"style=form,explode=true,name=offset"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetBypassIPRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *GetBypassIPRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetBypassIPRequest) GetSourceIP() *string { + if o == nil { + return nil + } + return o.SourceIP +} + +func (o *GetBypassIPRequest) GetDomain() *string { + if o == nil { + return nil + } + return o.Domain +} + +func (o *GetBypassIPRequest) GetProjectScope() *bool { + if o == nil { + return nil + } + return o.ProjectScope +} + +func (o *GetBypassIPRequest) GetOffset() *string { + if o == nil { + return nil + } + return o.Offset +} + +func (o *GetBypassIPRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetBypassIPRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ResponseBodyAction string + +const ( + ResponseBodyActionBlock ResponseBodyAction = "block" + ResponseBodyActionBypass ResponseBodyAction = "bypass" +) + +func (e ResponseBodyAction) ToPointer() *ResponseBodyAction { + return &e +} +func (e *ResponseBodyAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "block": + fallthrough + case "bypass": + *e = ResponseBodyAction(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyAction: %v", v) + } +} + +type GetBypassIPResponseBodyResult struct { + OwnerID string `json:"OwnerId"` + ID string `json:"Id"` + Domain string `json:"Domain"` + IP string `json:"Ip"` + Action *ResponseBodyAction `json:"Action,omitempty"` + ProjectID *string `json:"ProjectId,omitempty"` + IsProjectRule *bool `json:"IsProjectRule,omitempty"` + Note *string `json:"Note,omitempty"` + CreatedAt string `json:"CreatedAt"` + ActorID *string `json:"ActorId,omitempty"` + UpdatedAt string `json:"UpdatedAt"` + UpdatedAtHour string `json:"UpdatedAtHour"` + DeletedAt *string `json:"DeletedAt,omitempty"` + ExpiresAt *float64 `json:"ExpiresAt,omitempty"` +} + +func (o *GetBypassIPResponseBodyResult) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetBypassIPResponseBodyResult) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetBypassIPResponseBodyResult) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *GetBypassIPResponseBodyResult) GetIP() string { + if o == nil { + return "" + } + return o.IP +} + +func (o *GetBypassIPResponseBodyResult) GetAction() *ResponseBodyAction { + if o == nil { + return nil + } + return o.Action +} + +func (o *GetBypassIPResponseBodyResult) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetBypassIPResponseBodyResult) GetIsProjectRule() *bool { + if o == nil { + return nil + } + return o.IsProjectRule +} + +func (o *GetBypassIPResponseBodyResult) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +func (o *GetBypassIPResponseBodyResult) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *GetBypassIPResponseBodyResult) GetActorID() *string { + if o == nil { + return nil + } + return o.ActorID +} + +func (o *GetBypassIPResponseBodyResult) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *GetBypassIPResponseBodyResult) GetUpdatedAtHour() string { + if o == nil { + return "" + } + return o.UpdatedAtHour +} + +func (o *GetBypassIPResponseBodyResult) GetDeletedAt() *string { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetBypassIPResponseBodyResult) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +type GetBypassIPResponseBodyPagination struct { + OwnerID string `json:"OwnerId"` + ID string `json:"Id"` +} + +func (o *GetBypassIPResponseBodyPagination) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetBypassIPResponseBodyPagination) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type GetBypassIPResponseBody2 struct { + Result []GetBypassIPResponseBodyResult `json:"result,omitempty"` + Pagination *GetBypassIPResponseBodyPagination `json:"pagination,omitempty"` +} + +func (o *GetBypassIPResponseBody2) GetResult() []GetBypassIPResponseBodyResult { + if o == nil { + return nil + } + return o.Result +} + +func (o *GetBypassIPResponseBody2) GetPagination() *GetBypassIPResponseBodyPagination { + if o == nil { + return nil + } + return o.Pagination +} + +type ResponseBodyResult struct { + OwnerID string `json:"OwnerId"` + ID string `json:"Id"` + Domain string `json:"Domain"` + IP string `json:"Ip"` + ProjectID string `json:"ProjectId"` + IsProjectRule bool `json:"IsProjectRule"` +} + +func (o *ResponseBodyResult) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *ResponseBodyResult) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ResponseBodyResult) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *ResponseBodyResult) GetIP() string { + if o == nil { + return "" + } + return o.IP +} + +func (o *ResponseBodyResult) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *ResponseBodyResult) GetIsProjectRule() bool { + if o == nil { + return false + } + return o.IsProjectRule +} + +type GetBypassIPResponseBody1 struct { + Result []ResponseBodyResult `json:"result"` + Pagination any `json:"pagination"` +} + +func (o *GetBypassIPResponseBody1) GetResult() []ResponseBodyResult { + if o == nil { + return []ResponseBodyResult{} + } + return o.Result +} + +func (o *GetBypassIPResponseBody1) GetPagination() any { + if o == nil { + return nil + } + return o.Pagination +} + +type GetBypassIPResponseBodyType string + +const ( + GetBypassIPResponseBodyTypeGetBypassIPResponseBody1 GetBypassIPResponseBodyType = "getBypassIp_responseBody_1" + GetBypassIPResponseBodyTypeGetBypassIPResponseBody2 GetBypassIPResponseBodyType = "getBypassIp_responseBody_2" +) + +type GetBypassIPResponseBody struct { + GetBypassIPResponseBody1 *GetBypassIPResponseBody1 + GetBypassIPResponseBody2 *GetBypassIPResponseBody2 + + Type GetBypassIPResponseBodyType +} + +func CreateGetBypassIPResponseBodyGetBypassIPResponseBody1(getBypassIPResponseBody1 GetBypassIPResponseBody1) GetBypassIPResponseBody { + typ := GetBypassIPResponseBodyTypeGetBypassIPResponseBody1 + + return GetBypassIPResponseBody{ + GetBypassIPResponseBody1: &getBypassIPResponseBody1, + Type: typ, + } +} + +func CreateGetBypassIPResponseBodyGetBypassIPResponseBody2(getBypassIPResponseBody2 GetBypassIPResponseBody2) GetBypassIPResponseBody { + typ := GetBypassIPResponseBodyTypeGetBypassIPResponseBody2 + + return GetBypassIPResponseBody{ + GetBypassIPResponseBody2: &getBypassIPResponseBody2, + Type: typ, + } +} + +func (u *GetBypassIPResponseBody) UnmarshalJSON(data []byte) error { + + var getBypassIPResponseBody1 GetBypassIPResponseBody1 = GetBypassIPResponseBody1{} + if err := utils.UnmarshalJSON(data, &getBypassIPResponseBody1, "", true, true); err == nil { + u.GetBypassIPResponseBody1 = &getBypassIPResponseBody1 + u.Type = GetBypassIPResponseBodyTypeGetBypassIPResponseBody1 + return nil + } + + var getBypassIPResponseBody2 GetBypassIPResponseBody2 = GetBypassIPResponseBody2{} + if err := utils.UnmarshalJSON(data, &getBypassIPResponseBody2, "", true, true); err == nil { + u.GetBypassIPResponseBody2 = &getBypassIPResponseBody2 + u.Type = GetBypassIPResponseBodyTypeGetBypassIPResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetBypassIPResponseBody", string(data)) +} + +func (u GetBypassIPResponseBody) MarshalJSON() ([]byte, error) { + if u.GetBypassIPResponseBody1 != nil { + return utils.MarshalJSON(u.GetBypassIPResponseBody1, "", true) + } + + if u.GetBypassIPResponseBody2 != nil { + return utils.MarshalJSON(u.GetBypassIPResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type GetBypassIPResponseBody: all fields are null") +} + +type GetBypassIPResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *GetBypassIPResponseBody +} + +func (o *GetBypassIPResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetBypassIPResponse) GetOneOf() *GetBypassIPResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getcertbyid.go b/src/__tests__/mockserver/internal/sdk/models/operations/getcertbyid.go new file mode 100644 index 00000000..49445f3b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getcertbyid.go @@ -0,0 +1,99 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetCertByIDRequest struct { + // The cert id + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetCertByIDRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetCertByIDRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetCertByIDRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetCertByIDResponseBody struct { + ID string `json:"id"` + CreatedAt float64 `json:"createdAt"` + ExpiresAt float64 `json:"expiresAt"` + AutoRenew bool `json:"autoRenew"` + Cns []string `json:"cns"` +} + +func (o *GetCertByIDResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetCertByIDResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetCertByIDResponseBody) GetExpiresAt() float64 { + if o == nil { + return 0.0 + } + return o.ExpiresAt +} + +func (o *GetCertByIDResponseBody) GetAutoRenew() bool { + if o == nil { + return false + } + return o.AutoRenew +} + +func (o *GetCertByIDResponseBody) GetCns() []string { + if o == nil { + return []string{} + } + return o.Cns +} + +type GetCertByIDResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetCertByIDResponseBody +} + +func (o *GetCertByIDResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetCertByIDResponse) GetObject() *GetCertByIDResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getcheck.go b/src/__tests__/mockserver/internal/sdk/models/operations/getcheck.go new file mode 100644 index 00000000..828a949a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getcheck.go @@ -0,0 +1,569 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetCheckRequest struct { + // The deployment to get the check for. + DeploymentID string `pathParam:"style=simple,explode=false,name=deploymentId"` + // The check to fetch + CheckID string `pathParam:"style=simple,explode=false,name=checkId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetCheckRequest) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *GetCheckRequest) GetCheckID() string { + if o == nil { + return "" + } + return o.CheckID +} + +func (o *GetCheckRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetCheckRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetCheckStatus string + +const ( + GetCheckStatusRegistered GetCheckStatus = "registered" + GetCheckStatusRunning GetCheckStatus = "running" + GetCheckStatusCompleted GetCheckStatus = "completed" +) + +func (e GetCheckStatus) ToPointer() *GetCheckStatus { + return &e +} +func (e *GetCheckStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = GetCheckStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GetCheckStatus: %v", v) + } +} + +type GetCheckConclusion string + +const ( + GetCheckConclusionCanceled GetCheckConclusion = "canceled" + GetCheckConclusionFailed GetCheckConclusion = "failed" + GetCheckConclusionNeutral GetCheckConclusion = "neutral" + GetCheckConclusionSucceeded GetCheckConclusion = "succeeded" + GetCheckConclusionSkipped GetCheckConclusion = "skipped" + GetCheckConclusionStale GetCheckConclusion = "stale" +) + +func (e GetCheckConclusion) ToPointer() *GetCheckConclusion { + return &e +} +func (e *GetCheckConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "canceled": + fallthrough + case "failed": + fallthrough + case "neutral": + fallthrough + case "succeeded": + fallthrough + case "skipped": + fallthrough + case "stale": + *e = GetCheckConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for GetCheckConclusion: %v", v) + } +} + +type GetCheckSource string + +const ( + GetCheckSourceWebVitals GetCheckSource = "web-vitals" +) + +func (e GetCheckSource) ToPointer() *GetCheckSource { + return &e +} +func (e *GetCheckSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetCheckSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetCheckSource: %v", v) + } +} + +type GetCheckFCP struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetCheckSource `json:"source"` +} + +func (o *GetCheckFCP) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetCheckFCP) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetCheckFCP) GetSource() GetCheckSource { + if o == nil { + return GetCheckSource("") + } + return o.Source +} + +type GetCheckChecksSource string + +const ( + GetCheckChecksSourceWebVitals GetCheckChecksSource = "web-vitals" +) + +func (e GetCheckChecksSource) ToPointer() *GetCheckChecksSource { + return &e +} +func (e *GetCheckChecksSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetCheckChecksSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetCheckChecksSource: %v", v) + } +} + +type GetCheckLCP struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetCheckChecksSource `json:"source"` +} + +func (o *GetCheckLCP) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetCheckLCP) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetCheckLCP) GetSource() GetCheckChecksSource { + if o == nil { + return GetCheckChecksSource("") + } + return o.Source +} + +type GetCheckChecksResponseSource string + +const ( + GetCheckChecksResponseSourceWebVitals GetCheckChecksResponseSource = "web-vitals" +) + +func (e GetCheckChecksResponseSource) ToPointer() *GetCheckChecksResponseSource { + return &e +} +func (e *GetCheckChecksResponseSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetCheckChecksResponseSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetCheckChecksResponseSource: %v", v) + } +} + +type GetCheckCLS struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetCheckChecksResponseSource `json:"source"` +} + +func (o *GetCheckCLS) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetCheckCLS) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetCheckCLS) GetSource() GetCheckChecksResponseSource { + if o == nil { + return GetCheckChecksResponseSource("") + } + return o.Source +} + +type GetCheckChecksResponse200Source string + +const ( + GetCheckChecksResponse200SourceWebVitals GetCheckChecksResponse200Source = "web-vitals" +) + +func (e GetCheckChecksResponse200Source) ToPointer() *GetCheckChecksResponse200Source { + return &e +} +func (e *GetCheckChecksResponse200Source) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetCheckChecksResponse200Source(v) + return nil + default: + return fmt.Errorf("invalid value for GetCheckChecksResponse200Source: %v", v) + } +} + +type GetCheckTBT struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetCheckChecksResponse200Source `json:"source"` +} + +func (o *GetCheckTBT) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetCheckTBT) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetCheckTBT) GetSource() GetCheckChecksResponse200Source { + if o == nil { + return GetCheckChecksResponse200Source("") + } + return o.Source +} + +type GetCheckChecksResponse200ApplicationJSONSource string + +const ( + GetCheckChecksResponse200ApplicationJSONSourceWebVitals GetCheckChecksResponse200ApplicationJSONSource = "web-vitals" +) + +func (e GetCheckChecksResponse200ApplicationJSONSource) ToPointer() *GetCheckChecksResponse200ApplicationJSONSource { + return &e +} +func (e *GetCheckChecksResponse200ApplicationJSONSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = GetCheckChecksResponse200ApplicationJSONSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetCheckChecksResponse200ApplicationJSONSource: %v", v) + } +} + +type GetCheckVirtualExperienceScore struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source GetCheckChecksResponse200ApplicationJSONSource `json:"source"` +} + +func (o *GetCheckVirtualExperienceScore) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetCheckVirtualExperienceScore) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *GetCheckVirtualExperienceScore) GetSource() GetCheckChecksResponse200ApplicationJSONSource { + if o == nil { + return GetCheckChecksResponse200ApplicationJSONSource("") + } + return o.Source +} + +type GetCheckMetrics struct { + Fcp GetCheckFCP `json:"FCP"` + Lcp GetCheckLCP `json:"LCP"` + Cls GetCheckCLS `json:"CLS"` + Tbt GetCheckTBT `json:"TBT"` + VirtualExperienceScore *GetCheckVirtualExperienceScore `json:"virtualExperienceScore,omitempty"` +} + +func (o *GetCheckMetrics) GetFcp() GetCheckFCP { + if o == nil { + return GetCheckFCP{} + } + return o.Fcp +} + +func (o *GetCheckMetrics) GetLcp() GetCheckLCP { + if o == nil { + return GetCheckLCP{} + } + return o.Lcp +} + +func (o *GetCheckMetrics) GetCls() GetCheckCLS { + if o == nil { + return GetCheckCLS{} + } + return o.Cls +} + +func (o *GetCheckMetrics) GetTbt() GetCheckTBT { + if o == nil { + return GetCheckTBT{} + } + return o.Tbt +} + +func (o *GetCheckMetrics) GetVirtualExperienceScore() *GetCheckVirtualExperienceScore { + if o == nil { + return nil + } + return o.VirtualExperienceScore +} + +type GetCheckOutput struct { + Metrics *GetCheckMetrics `json:"metrics,omitempty"` +} + +func (o *GetCheckOutput) GetMetrics() *GetCheckMetrics { + if o == nil { + return nil + } + return o.Metrics +} + +type GetCheckResponseBody struct { + ID string `json:"id"` + Name string `json:"name"` + Path *string `json:"path,omitempty"` + Status GetCheckStatus `json:"status"` + Conclusion *GetCheckConclusion `json:"conclusion,omitempty"` + Blocking bool `json:"blocking"` + Output *GetCheckOutput `json:"output,omitempty"` + DetailsURL *string `json:"detailsUrl,omitempty"` + IntegrationID string `json:"integrationId"` + DeploymentID string `json:"deploymentId"` + ExternalID *string `json:"externalId,omitempty"` + CreatedAt float64 `json:"createdAt"` + UpdatedAt float64 `json:"updatedAt"` + StartedAt *float64 `json:"startedAt,omitempty"` + CompletedAt *float64 `json:"completedAt,omitempty"` + Rerequestable *bool `json:"rerequestable,omitempty"` +} + +func (o *GetCheckResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetCheckResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetCheckResponseBody) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +func (o *GetCheckResponseBody) GetStatus() GetCheckStatus { + if o == nil { + return GetCheckStatus("") + } + return o.Status +} + +func (o *GetCheckResponseBody) GetConclusion() *GetCheckConclusion { + if o == nil { + return nil + } + return o.Conclusion +} + +func (o *GetCheckResponseBody) GetBlocking() bool { + if o == nil { + return false + } + return o.Blocking +} + +func (o *GetCheckResponseBody) GetOutput() *GetCheckOutput { + if o == nil { + return nil + } + return o.Output +} + +func (o *GetCheckResponseBody) GetDetailsURL() *string { + if o == nil { + return nil + } + return o.DetailsURL +} + +func (o *GetCheckResponseBody) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *GetCheckResponseBody) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *GetCheckResponseBody) GetExternalID() *string { + if o == nil { + return nil + } + return o.ExternalID +} + +func (o *GetCheckResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetCheckResponseBody) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetCheckResponseBody) GetStartedAt() *float64 { + if o == nil { + return nil + } + return o.StartedAt +} + +func (o *GetCheckResponseBody) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *GetCheckResponseBody) GetRerequestable() *bool { + if o == nil { + return nil + } + return o.Rerequestable +} + +type GetCheckResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetCheckResponseBody +} + +func (o *GetCheckResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetCheckResponse) GetObject() *GetCheckResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getconfigurablelogdrain.go b/src/__tests__/mockserver/internal/sdk/models/operations/getconfigurablelogdrain.go new file mode 100644 index 00000000..1471c5e0 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getconfigurablelogdrain.go @@ -0,0 +1,429 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetConfigurableLogDrainRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetConfigurableLogDrainRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetConfigurableLogDrainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetConfigurableLogDrainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetConfigurableLogDrainDeliveryFormat string + +const ( + GetConfigurableLogDrainDeliveryFormatJSON GetConfigurableLogDrainDeliveryFormat = "json" + GetConfigurableLogDrainDeliveryFormatNdjson GetConfigurableLogDrainDeliveryFormat = "ndjson" + GetConfigurableLogDrainDeliveryFormatSyslog GetConfigurableLogDrainDeliveryFormat = "syslog" +) + +func (e GetConfigurableLogDrainDeliveryFormat) ToPointer() *GetConfigurableLogDrainDeliveryFormat { + return &e +} +func (e *GetConfigurableLogDrainDeliveryFormat) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "json": + fallthrough + case "ndjson": + fallthrough + case "syslog": + *e = GetConfigurableLogDrainDeliveryFormat(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurableLogDrainDeliveryFormat: %v", v) + } +} + +type GetConfigurableLogDrainSources string + +const ( + GetConfigurableLogDrainSourcesBuild GetConfigurableLogDrainSources = "build" + GetConfigurableLogDrainSourcesEdge GetConfigurableLogDrainSources = "edge" + GetConfigurableLogDrainSourcesLambda GetConfigurableLogDrainSources = "lambda" + GetConfigurableLogDrainSourcesStatic GetConfigurableLogDrainSources = "static" + GetConfigurableLogDrainSourcesExternal GetConfigurableLogDrainSources = "external" + GetConfigurableLogDrainSourcesFirewall GetConfigurableLogDrainSources = "firewall" +) + +func (e GetConfigurableLogDrainSources) ToPointer() *GetConfigurableLogDrainSources { + return &e +} +func (e *GetConfigurableLogDrainSources) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "build": + fallthrough + case "edge": + fallthrough + case "lambda": + fallthrough + case "static": + fallthrough + case "external": + fallthrough + case "firewall": + *e = GetConfigurableLogDrainSources(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurableLogDrainSources: %v", v) + } +} + +type GetConfigurableLogDrainEnvironments string + +const ( + GetConfigurableLogDrainEnvironmentsProduction GetConfigurableLogDrainEnvironments = "production" + GetConfigurableLogDrainEnvironmentsPreview GetConfigurableLogDrainEnvironments = "preview" +) + +func (e GetConfigurableLogDrainEnvironments) ToPointer() *GetConfigurableLogDrainEnvironments { + return &e +} +func (e *GetConfigurableLogDrainEnvironments) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + *e = GetConfigurableLogDrainEnvironments(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurableLogDrainEnvironments: %v", v) + } +} + +type GetConfigurableLogDrainStatus string + +const ( + GetConfigurableLogDrainStatusEnabled GetConfigurableLogDrainStatus = "enabled" + GetConfigurableLogDrainStatusDisabled GetConfigurableLogDrainStatus = "disabled" + GetConfigurableLogDrainStatusErrored GetConfigurableLogDrainStatus = "errored" +) + +func (e GetConfigurableLogDrainStatus) ToPointer() *GetConfigurableLogDrainStatus { + return &e +} +func (e *GetConfigurableLogDrainStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "enabled": + fallthrough + case "disabled": + fallthrough + case "errored": + *e = GetConfigurableLogDrainStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurableLogDrainStatus: %v", v) + } +} + +type DisabledReason string + +const ( + DisabledReasonDisabledByOwner DisabledReason = "disabled-by-owner" + DisabledReasonFeatureNotAvailable DisabledReason = "feature-not-available" + DisabledReasonAccountPlanDowngrade DisabledReason = "account-plan-downgrade" + DisabledReasonDisabledByAdmin DisabledReason = "disabled-by-admin" +) + +func (e DisabledReason) ToPointer() *DisabledReason { + return &e +} +func (e *DisabledReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "disabled-by-owner": + fallthrough + case "feature-not-available": + fallthrough + case "account-plan-downgrade": + fallthrough + case "disabled-by-admin": + *e = DisabledReason(v) + return nil + default: + return fmt.Errorf("invalid value for DisabledReason: %v", v) + } +} + +type GetConfigurableLogDrainCreatedFrom string + +const ( + GetConfigurableLogDrainCreatedFromSelfServed GetConfigurableLogDrainCreatedFrom = "self-served" +) + +func (e GetConfigurableLogDrainCreatedFrom) ToPointer() *GetConfigurableLogDrainCreatedFrom { + return &e +} +func (e *GetConfigurableLogDrainCreatedFrom) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "self-served": + *e = GetConfigurableLogDrainCreatedFrom(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurableLogDrainCreatedFrom: %v", v) + } +} + +type GetConfigurableLogDrainResponseBody struct { + ID string `json:"id"` + DeliveryFormat GetConfigurableLogDrainDeliveryFormat `json:"deliveryFormat"` + URL string `json:"url"` + Name string `json:"name"` + ClientID *string `json:"clientId,omitempty"` + ConfigurationID *string `json:"configurationId,omitempty"` + TeamID *string `json:"teamId,omitempty"` + OwnerID string `json:"ownerId"` + ProjectIds []string `json:"projectIds,omitempty"` + CreatedAt float64 `json:"createdAt"` + DeletedAt *float64 `json:"deletedAt"` + UpdatedAt float64 `json:"updatedAt"` + Sources []GetConfigurableLogDrainSources `json:"sources,omitempty"` + Headers map[string]string `json:"headers,omitempty"` + Environments []GetConfigurableLogDrainEnvironments `json:"environments"` + Status *GetConfigurableLogDrainStatus `json:"status,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + DisabledReason *DisabledReason `json:"disabledReason,omitempty"` + DisabledBy *string `json:"disabledBy,omitempty"` + FirstErrorTimestamp *float64 `json:"firstErrorTimestamp,omitempty"` + SamplingRate *float64 `json:"samplingRate,omitempty"` + HideIPAddresses *bool `json:"hideIpAddresses,omitempty"` + Secret string `json:"secret"` + CreatedFrom *GetConfigurableLogDrainCreatedFrom `json:"createdFrom,omitempty"` +} + +func (o *GetConfigurableLogDrainResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetConfigurableLogDrainResponseBody) GetDeliveryFormat() GetConfigurableLogDrainDeliveryFormat { + if o == nil { + return GetConfigurableLogDrainDeliveryFormat("") + } + return o.DeliveryFormat +} + +func (o *GetConfigurableLogDrainResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetConfigurableLogDrainResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetConfigurableLogDrainResponseBody) GetClientID() *string { + if o == nil { + return nil + } + return o.ClientID +} + +func (o *GetConfigurableLogDrainResponseBody) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *GetConfigurableLogDrainResponseBody) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetConfigurableLogDrainResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetConfigurableLogDrainResponseBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +func (o *GetConfigurableLogDrainResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetConfigurableLogDrainResponseBody) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetConfigurableLogDrainResponseBody) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetConfigurableLogDrainResponseBody) GetSources() []GetConfigurableLogDrainSources { + if o == nil { + return nil + } + return o.Sources +} + +func (o *GetConfigurableLogDrainResponseBody) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *GetConfigurableLogDrainResponseBody) GetEnvironments() []GetConfigurableLogDrainEnvironments { + if o == nil { + return []GetConfigurableLogDrainEnvironments{} + } + return o.Environments +} + +func (o *GetConfigurableLogDrainResponseBody) GetStatus() *GetConfigurableLogDrainStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *GetConfigurableLogDrainResponseBody) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetConfigurableLogDrainResponseBody) GetDisabledReason() *DisabledReason { + if o == nil { + return nil + } + return o.DisabledReason +} + +func (o *GetConfigurableLogDrainResponseBody) GetDisabledBy() *string { + if o == nil { + return nil + } + return o.DisabledBy +} + +func (o *GetConfigurableLogDrainResponseBody) GetFirstErrorTimestamp() *float64 { + if o == nil { + return nil + } + return o.FirstErrorTimestamp +} + +func (o *GetConfigurableLogDrainResponseBody) GetSamplingRate() *float64 { + if o == nil { + return nil + } + return o.SamplingRate +} + +func (o *GetConfigurableLogDrainResponseBody) GetHideIPAddresses() *bool { + if o == nil { + return nil + } + return o.HideIPAddresses +} + +func (o *GetConfigurableLogDrainResponseBody) GetSecret() string { + if o == nil { + return "" + } + return o.Secret +} + +func (o *GetConfigurableLogDrainResponseBody) GetCreatedFrom() *GetConfigurableLogDrainCreatedFrom { + if o == nil { + return nil + } + return o.CreatedFrom +} + +type GetConfigurableLogDrainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetConfigurableLogDrainResponseBody +} + +func (o *GetConfigurableLogDrainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetConfigurableLogDrainResponse) GetObject() *GetConfigurableLogDrainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getconfiguration.go b/src/__tests__/mockserver/internal/sdk/models/operations/getconfiguration.go new file mode 100644 index 00000000..8ab6fa1d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getconfiguration.go @@ -0,0 +1,972 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetConfigurationRequest struct { + // ID of the configuration to check + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetConfigurationRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetConfigurationRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetConfigurationRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// ProjectSelection - A string representing the permission for projects. Possible values are `all` or `selected`. +type ProjectSelection string + +const ( + ProjectSelectionSelected ProjectSelection = "selected" + ProjectSelectionAll ProjectSelection = "all" +) + +func (e ProjectSelection) ToPointer() *ProjectSelection { + return &e +} +func (e *ProjectSelection) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "selected": + fallthrough + case "all": + *e = ProjectSelection(v) + return nil + default: + return fmt.Errorf("invalid value for ProjectSelection: %v", v) + } +} + +// GetConfigurationResponseBodyIntegrationsSource - Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics. +type GetConfigurationResponseBodyIntegrationsSource string + +const ( + GetConfigurationResponseBodyIntegrationsSourceMarketplace GetConfigurationResponseBodyIntegrationsSource = "marketplace" + GetConfigurationResponseBodyIntegrationsSourceDeployButton GetConfigurationResponseBodyIntegrationsSource = "deploy-button" + GetConfigurationResponseBodyIntegrationsSourceExternal GetConfigurationResponseBodyIntegrationsSource = "external" +) + +func (e GetConfigurationResponseBodyIntegrationsSource) ToPointer() *GetConfigurationResponseBodyIntegrationsSource { + return &e +} +func (e *GetConfigurationResponseBodyIntegrationsSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "deploy-button": + fallthrough + case "external": + *e = GetConfigurationResponseBodyIntegrationsSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyIntegrationsSource: %v", v) + } +} + +type GetConfigurationResponseBodyIntegrationsType string + +const ( + GetConfigurationResponseBodyIntegrationsTypeIntegrationConfiguration GetConfigurationResponseBodyIntegrationsType = "integration-configuration" +) + +func (e GetConfigurationResponseBodyIntegrationsType) ToPointer() *GetConfigurationResponseBodyIntegrationsType { + return &e +} +func (e *GetConfigurationResponseBodyIntegrationsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-configuration": + *e = GetConfigurationResponseBodyIntegrationsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyIntegrationsType: %v", v) + } +} + +type GetConfigurationResponseBodyIntegrationsDisabledReason string + +const ( + GetConfigurationResponseBodyIntegrationsDisabledReasonDisabledByOwner GetConfigurationResponseBodyIntegrationsDisabledReason = "disabled-by-owner" + GetConfigurationResponseBodyIntegrationsDisabledReasonFeatureNotAvailable GetConfigurationResponseBodyIntegrationsDisabledReason = "feature-not-available" + GetConfigurationResponseBodyIntegrationsDisabledReasonDisabledByAdmin GetConfigurationResponseBodyIntegrationsDisabledReason = "disabled-by-admin" + GetConfigurationResponseBodyIntegrationsDisabledReasonOriginalOwnerLeftTheTeam GetConfigurationResponseBodyIntegrationsDisabledReason = "original-owner-left-the-team" + GetConfigurationResponseBodyIntegrationsDisabledReasonAccountPlanDowngrade GetConfigurationResponseBodyIntegrationsDisabledReason = "account-plan-downgrade" + GetConfigurationResponseBodyIntegrationsDisabledReasonOriginalOwnerRoleDowngraded GetConfigurationResponseBodyIntegrationsDisabledReason = "original-owner-role-downgraded" +) + +func (e GetConfigurationResponseBodyIntegrationsDisabledReason) ToPointer() *GetConfigurationResponseBodyIntegrationsDisabledReason { + return &e +} +func (e *GetConfigurationResponseBodyIntegrationsDisabledReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "disabled-by-owner": + fallthrough + case "feature-not-available": + fallthrough + case "disabled-by-admin": + fallthrough + case "original-owner-left-the-team": + fallthrough + case "account-plan-downgrade": + fallthrough + case "original-owner-role-downgraded": + *e = GetConfigurationResponseBodyIntegrationsDisabledReason(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyIntegrationsDisabledReason: %v", v) + } +} + +// GetConfigurationResponseBodyIntegrationsInstallationType - Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external' +type GetConfigurationResponseBodyIntegrationsInstallationType string + +const ( + GetConfigurationResponseBodyIntegrationsInstallationTypeMarketplace GetConfigurationResponseBodyIntegrationsInstallationType = "marketplace" + GetConfigurationResponseBodyIntegrationsInstallationTypeExternal GetConfigurationResponseBodyIntegrationsInstallationType = "external" +) + +func (e GetConfigurationResponseBodyIntegrationsInstallationType) ToPointer() *GetConfigurationResponseBodyIntegrationsInstallationType { + return &e +} +func (e *GetConfigurationResponseBodyIntegrationsInstallationType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "external": + *e = GetConfigurationResponseBodyIntegrationsInstallationType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyIntegrationsInstallationType: %v", v) + } +} + +type GetConfigurationResponseBody2 struct { + // A string representing the permission for projects. Possible values are `all` or `selected`. + ProjectSelection ProjectSelection `json:"projectSelection"` + // When a configuration is limited to access certain projects, this will contain each of the project ID it is allowed to access. If it is not defined, the configuration has full access. + Projects []string `json:"projects,omitempty"` + // A timestamp that tells you when the configuration was installed successfully + CompletedAt *float64 `json:"completedAt,omitempty"` + // A timestamp that tells you when the configuration was created + CreatedAt float64 `json:"createdAt"` + // The unique identifier of the configuration + ID string `json:"id"` + // The unique identifier of the app the configuration was created for + IntegrationID string `json:"integrationId"` + // The user or team ID that owns the configuration + OwnerID string `json:"ownerId"` + // Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics. + Source *GetConfigurationResponseBodyIntegrationsSource `json:"source,omitempty"` + // The slug of the integration the configuration is created for. + Slug string `json:"slug"` + // When the configuration was created for a team, this will show the ID of the team. + TeamID *string `json:"teamId,omitempty"` + Type GetConfigurationResponseBodyIntegrationsType `json:"type"` + // A timestamp that tells you when the configuration was updated. + UpdatedAt float64 `json:"updatedAt"` + // The ID of the user that created the configuration. + UserID string `json:"userId"` + // The resources that are allowed to be accessed by the configuration. + Scopes []string `json:"scopes"` + // A timestamp that tells you when the configuration was disabled. Note: Configurations can be disabled when the associated user loses access to a team. They do not function during this time until the configuration is 'transferred', meaning the associated user is changed to one with access to the team. + DisabledAt *float64 `json:"disabledAt,omitempty"` + // A timestamp that tells you when the configuration was deleted. + DeletedAt *float64 `json:"deletedAt,omitempty"` + // A timestamp that tells you when the configuration deletion has been started for cases when the deletion needs to be settled/approved by partners, such as when marketplace invoices have been paid. + DeleteRequestedAt *float64 `json:"deleteRequestedAt,omitempty"` + DisabledReason *GetConfigurationResponseBodyIntegrationsDisabledReason `json:"disabledReason,omitempty"` + // Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external' + InstallationType *GetConfigurationResponseBodyIntegrationsInstallationType `json:"installationType,omitempty"` + CanConfigureOpenTelemetry *bool `json:"canConfigureOpenTelemetry,omitempty"` +} + +func (o *GetConfigurationResponseBody2) GetProjectSelection() ProjectSelection { + if o == nil { + return ProjectSelection("") + } + return o.ProjectSelection +} + +func (o *GetConfigurationResponseBody2) GetProjects() []string { + if o == nil { + return nil + } + return o.Projects +} + +func (o *GetConfigurationResponseBody2) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *GetConfigurationResponseBody2) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetConfigurationResponseBody2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetConfigurationResponseBody2) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *GetConfigurationResponseBody2) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetConfigurationResponseBody2) GetSource() *GetConfigurationResponseBodyIntegrationsSource { + if o == nil { + return nil + } + return o.Source +} + +func (o *GetConfigurationResponseBody2) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GetConfigurationResponseBody2) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetConfigurationResponseBody2) GetType() GetConfigurationResponseBodyIntegrationsType { + if o == nil { + return GetConfigurationResponseBodyIntegrationsType("") + } + return o.Type +} + +func (o *GetConfigurationResponseBody2) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetConfigurationResponseBody2) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *GetConfigurationResponseBody2) GetScopes() []string { + if o == nil { + return []string{} + } + return o.Scopes +} + +func (o *GetConfigurationResponseBody2) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetConfigurationResponseBody2) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetConfigurationResponseBody2) GetDeleteRequestedAt() *float64 { + if o == nil { + return nil + } + return o.DeleteRequestedAt +} + +func (o *GetConfigurationResponseBody2) GetDisabledReason() *GetConfigurationResponseBodyIntegrationsDisabledReason { + if o == nil { + return nil + } + return o.DisabledReason +} + +func (o *GetConfigurationResponseBody2) GetInstallationType() *GetConfigurationResponseBodyIntegrationsInstallationType { + if o == nil { + return nil + } + return o.InstallationType +} + +func (o *GetConfigurationResponseBody2) GetCanConfigureOpenTelemetry() *bool { + if o == nil { + return nil + } + return o.CanConfigureOpenTelemetry +} + +type GetConfigurationResponseBodyIntegrationsResponseType string + +const ( + GetConfigurationResponseBodyIntegrationsResponseTypePrepayment GetConfigurationResponseBodyIntegrationsResponseType = "prepayment" + GetConfigurationResponseBodyIntegrationsResponseTypeSubscription GetConfigurationResponseBodyIntegrationsResponseType = "subscription" +) + +func (e GetConfigurationResponseBodyIntegrationsResponseType) ToPointer() *GetConfigurationResponseBodyIntegrationsResponseType { + return &e +} +func (e *GetConfigurationResponseBodyIntegrationsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "prepayment": + fallthrough + case "subscription": + *e = GetConfigurationResponseBodyIntegrationsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyIntegrationsResponseType: %v", v) + } +} + +type GetConfigurationResponseBodyScope string + +const ( + GetConfigurationResponseBodyScopeInstallation GetConfigurationResponseBodyScope = "installation" + GetConfigurationResponseBodyScopeResource GetConfigurationResponseBodyScope = "resource" +) + +func (e GetConfigurationResponseBodyScope) ToPointer() *GetConfigurationResponseBodyScope { + return &e +} +func (e *GetConfigurationResponseBodyScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "installation": + fallthrough + case "resource": + *e = GetConfigurationResponseBodyScope(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyScope: %v", v) + } +} + +type GetConfigurationResponseBodyDetails struct { + Label string `json:"label"` + Value *string `json:"value,omitempty"` +} + +func (o *GetConfigurationResponseBodyDetails) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *GetConfigurationResponseBodyDetails) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type GetConfigurationResponseBodyHeightlightedDetails struct { + Label string `json:"label"` + Value *string `json:"value,omitempty"` +} + +func (o *GetConfigurationResponseBodyHeightlightedDetails) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *GetConfigurationResponseBodyHeightlightedDetails) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type GetConfigurationResponseBodyQuote struct { + Line string `json:"line"` + Amount string `json:"amount"` +} + +func (o *GetConfigurationResponseBodyQuote) GetLine() string { + if o == nil { + return "" + } + return o.Line +} + +func (o *GetConfigurationResponseBodyQuote) GetAmount() string { + if o == nil { + return "" + } + return o.Amount +} + +type GetConfigurationResponseBodyBillingPlan struct { + ID string `json:"id"` + Type GetConfigurationResponseBodyIntegrationsResponseType `json:"type"` + Name string `json:"name"` + Scope *GetConfigurationResponseBodyScope `json:"scope,omitempty"` + Description string `json:"description"` + PaymentMethodRequired *bool `json:"paymentMethodRequired,omitempty"` + PreauthorizationAmount *float64 `json:"preauthorizationAmount,omitempty"` + Cost *string `json:"cost,omitempty"` + Details []GetConfigurationResponseBodyDetails `json:"details,omitempty"` + HeightlightedDetails []GetConfigurationResponseBodyHeightlightedDetails `json:"heightlightedDetails,omitempty"` + Quote []GetConfigurationResponseBodyQuote `json:"quote,omitempty"` + EffectiveDate *string `json:"effectiveDate,omitempty"` +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetType() GetConfigurationResponseBodyIntegrationsResponseType { + if o == nil { + return GetConfigurationResponseBodyIntegrationsResponseType("") + } + return o.Type +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetScope() *GetConfigurationResponseBodyScope { + if o == nil { + return nil + } + return o.Scope +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetPaymentMethodRequired() *bool { + if o == nil { + return nil + } + return o.PaymentMethodRequired +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetPreauthorizationAmount() *float64 { + if o == nil { + return nil + } + return o.PreauthorizationAmount +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetCost() *string { + if o == nil { + return nil + } + return o.Cost +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetDetails() []GetConfigurationResponseBodyDetails { + if o == nil { + return nil + } + return o.Details +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetHeightlightedDetails() []GetConfigurationResponseBodyHeightlightedDetails { + if o == nil { + return nil + } + return o.HeightlightedDetails +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetQuote() []GetConfigurationResponseBodyQuote { + if o == nil { + return nil + } + return o.Quote +} + +func (o *GetConfigurationResponseBodyBillingPlan) GetEffectiveDate() *string { + if o == nil { + return nil + } + return o.EffectiveDate +} + +// GetConfigurationResponseBodySource - Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics. +type GetConfigurationResponseBodySource string + +const ( + GetConfigurationResponseBodySourceMarketplace GetConfigurationResponseBodySource = "marketplace" + GetConfigurationResponseBodySourceDeployButton GetConfigurationResponseBodySource = "deploy-button" + GetConfigurationResponseBodySourceExternal GetConfigurationResponseBodySource = "external" +) + +func (e GetConfigurationResponseBodySource) ToPointer() *GetConfigurationResponseBodySource { + return &e +} +func (e *GetConfigurationResponseBodySource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "deploy-button": + fallthrough + case "external": + *e = GetConfigurationResponseBodySource(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodySource: %v", v) + } +} + +type GetConfigurationResponseBodyType string + +const ( + GetConfigurationResponseBodyTypeIntegrationConfiguration GetConfigurationResponseBodyType = "integration-configuration" +) + +func (e GetConfigurationResponseBodyType) ToPointer() *GetConfigurationResponseBodyType { + return &e +} +func (e *GetConfigurationResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-configuration": + *e = GetConfigurationResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyType: %v", v) + } +} + +type GetConfigurationResponseBodyDisabledReason string + +const ( + GetConfigurationResponseBodyDisabledReasonDisabledByOwner GetConfigurationResponseBodyDisabledReason = "disabled-by-owner" + GetConfigurationResponseBodyDisabledReasonFeatureNotAvailable GetConfigurationResponseBodyDisabledReason = "feature-not-available" + GetConfigurationResponseBodyDisabledReasonDisabledByAdmin GetConfigurationResponseBodyDisabledReason = "disabled-by-admin" + GetConfigurationResponseBodyDisabledReasonOriginalOwnerLeftTheTeam GetConfigurationResponseBodyDisabledReason = "original-owner-left-the-team" + GetConfigurationResponseBodyDisabledReasonAccountPlanDowngrade GetConfigurationResponseBodyDisabledReason = "account-plan-downgrade" + GetConfigurationResponseBodyDisabledReasonOriginalOwnerRoleDowngraded GetConfigurationResponseBodyDisabledReason = "original-owner-role-downgraded" +) + +func (e GetConfigurationResponseBodyDisabledReason) ToPointer() *GetConfigurationResponseBodyDisabledReason { + return &e +} +func (e *GetConfigurationResponseBodyDisabledReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "disabled-by-owner": + fallthrough + case "feature-not-available": + fallthrough + case "disabled-by-admin": + fallthrough + case "original-owner-left-the-team": + fallthrough + case "account-plan-downgrade": + fallthrough + case "original-owner-role-downgraded": + *e = GetConfigurationResponseBodyDisabledReason(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyDisabledReason: %v", v) + } +} + +// GetConfigurationResponseBodyInstallationType - Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external' +type GetConfigurationResponseBodyInstallationType string + +const ( + GetConfigurationResponseBodyInstallationTypeMarketplace GetConfigurationResponseBodyInstallationType = "marketplace" + GetConfigurationResponseBodyInstallationTypeExternal GetConfigurationResponseBodyInstallationType = "external" +) + +func (e GetConfigurationResponseBodyInstallationType) ToPointer() *GetConfigurationResponseBodyInstallationType { + return &e +} +func (e *GetConfigurationResponseBodyInstallationType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "external": + *e = GetConfigurationResponseBodyInstallationType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationResponseBodyInstallationType: %v", v) + } +} + +// GetConfigurationResponseBody1 - The configuration with the provided id +type GetConfigurationResponseBody1 struct { + BillingPlan *GetConfigurationResponseBodyBillingPlan `json:"billingPlan,omitempty"` + BillingTotal *string `json:"billingTotal,omitempty"` + PeriodStart *string `json:"periodStart,omitempty"` + PeriodEnd *string `json:"periodEnd,omitempty"` + // A timestamp that tells you when the configuration was installed successfully + CompletedAt *float64 `json:"completedAt,omitempty"` + // A timestamp that tells you when the configuration was created + CreatedAt float64 `json:"createdAt"` + // The unique identifier of the configuration + ID string `json:"id"` + // The unique identifier of the app the configuration was created for + IntegrationID string `json:"integrationId"` + // The user or team ID that owns the configuration + OwnerID string `json:"ownerId"` + // When a configuration is limited to access certain projects, this will contain each of the project ID it is allowed to access. If it is not defined, the configuration has full access. + Projects []string `json:"projects,omitempty"` + // Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics. + Source *GetConfigurationResponseBodySource `json:"source,omitempty"` + // The slug of the integration the configuration is created for. + Slug string `json:"slug"` + // When the configuration was created for a team, this will show the ID of the team. + TeamID *string `json:"teamId,omitempty"` + Type GetConfigurationResponseBodyType `json:"type"` + // A timestamp that tells you when the configuration was updated. + UpdatedAt float64 `json:"updatedAt"` + // The ID of the user that created the configuration. + UserID string `json:"userId"` + // The resources that are allowed to be accessed by the configuration. + Scopes []string `json:"scopes"` + // A timestamp that tells you when the configuration was disabled. Note: Configurations can be disabled when the associated user loses access to a team. They do not function during this time until the configuration is 'transferred', meaning the associated user is changed to one with access to the team. + DisabledAt *float64 `json:"disabledAt,omitempty"` + // A timestamp that tells you when the configuration was deleted. + DeletedAt *float64 `json:"deletedAt,omitempty"` + // A timestamp that tells you when the configuration deletion has been started for cases when the deletion needs to be settled/approved by partners, such as when marketplace invoices have been paid. + DeleteRequestedAt *float64 `json:"deleteRequestedAt,omitempty"` + DisabledReason *GetConfigurationResponseBodyDisabledReason `json:"disabledReason,omitempty"` + // Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external' + InstallationType *GetConfigurationResponseBodyInstallationType `json:"installationType,omitempty"` +} + +func (o *GetConfigurationResponseBody1) GetBillingPlan() *GetConfigurationResponseBodyBillingPlan { + if o == nil { + return nil + } + return o.BillingPlan +} + +func (o *GetConfigurationResponseBody1) GetBillingTotal() *string { + if o == nil { + return nil + } + return o.BillingTotal +} + +func (o *GetConfigurationResponseBody1) GetPeriodStart() *string { + if o == nil { + return nil + } + return o.PeriodStart +} + +func (o *GetConfigurationResponseBody1) GetPeriodEnd() *string { + if o == nil { + return nil + } + return o.PeriodEnd +} + +func (o *GetConfigurationResponseBody1) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *GetConfigurationResponseBody1) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetConfigurationResponseBody1) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetConfigurationResponseBody1) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *GetConfigurationResponseBody1) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetConfigurationResponseBody1) GetProjects() []string { + if o == nil { + return nil + } + return o.Projects +} + +func (o *GetConfigurationResponseBody1) GetSource() *GetConfigurationResponseBodySource { + if o == nil { + return nil + } + return o.Source +} + +func (o *GetConfigurationResponseBody1) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GetConfigurationResponseBody1) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetConfigurationResponseBody1) GetType() GetConfigurationResponseBodyType { + if o == nil { + return GetConfigurationResponseBodyType("") + } + return o.Type +} + +func (o *GetConfigurationResponseBody1) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetConfigurationResponseBody1) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *GetConfigurationResponseBody1) GetScopes() []string { + if o == nil { + return []string{} + } + return o.Scopes +} + +func (o *GetConfigurationResponseBody1) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetConfigurationResponseBody1) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetConfigurationResponseBody1) GetDeleteRequestedAt() *float64 { + if o == nil { + return nil + } + return o.DeleteRequestedAt +} + +func (o *GetConfigurationResponseBody1) GetDisabledReason() *GetConfigurationResponseBodyDisabledReason { + if o == nil { + return nil + } + return o.DisabledReason +} + +func (o *GetConfigurationResponseBody1) GetInstallationType() *GetConfigurationResponseBodyInstallationType { + if o == nil { + return nil + } + return o.InstallationType +} + +type GetConfigurationResponseBodyUnionType string + +const ( + GetConfigurationResponseBodyUnionTypeGetConfigurationResponseBody1 GetConfigurationResponseBodyUnionType = "getConfiguration_responseBody_1" + GetConfigurationResponseBodyUnionTypeGetConfigurationResponseBody2 GetConfigurationResponseBodyUnionType = "getConfiguration_responseBody_2" +) + +// GetConfigurationResponseBody - The configuration with the provided id +type GetConfigurationResponseBody struct { + GetConfigurationResponseBody1 *GetConfigurationResponseBody1 + GetConfigurationResponseBody2 *GetConfigurationResponseBody2 + + Type GetConfigurationResponseBodyUnionType +} + +func CreateGetConfigurationResponseBodyGetConfigurationResponseBody1(getConfigurationResponseBody1 GetConfigurationResponseBody1) GetConfigurationResponseBody { + typ := GetConfigurationResponseBodyUnionTypeGetConfigurationResponseBody1 + + return GetConfigurationResponseBody{ + GetConfigurationResponseBody1: &getConfigurationResponseBody1, + Type: typ, + } +} + +func CreateGetConfigurationResponseBodyGetConfigurationResponseBody2(getConfigurationResponseBody2 GetConfigurationResponseBody2) GetConfigurationResponseBody { + typ := GetConfigurationResponseBodyUnionTypeGetConfigurationResponseBody2 + + return GetConfigurationResponseBody{ + GetConfigurationResponseBody2: &getConfigurationResponseBody2, + Type: typ, + } +} + +func (u *GetConfigurationResponseBody) UnmarshalJSON(data []byte) error { + + var getConfigurationResponseBody2 GetConfigurationResponseBody2 = GetConfigurationResponseBody2{} + if err := utils.UnmarshalJSON(data, &getConfigurationResponseBody2, "", true, true); err == nil { + u.GetConfigurationResponseBody2 = &getConfigurationResponseBody2 + u.Type = GetConfigurationResponseBodyUnionTypeGetConfigurationResponseBody2 + return nil + } + + var getConfigurationResponseBody1 GetConfigurationResponseBody1 = GetConfigurationResponseBody1{} + if err := utils.UnmarshalJSON(data, &getConfigurationResponseBody1, "", true, true); err == nil { + u.GetConfigurationResponseBody1 = &getConfigurationResponseBody1 + u.Type = GetConfigurationResponseBodyUnionTypeGetConfigurationResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetConfigurationResponseBody", string(data)) +} + +func (u GetConfigurationResponseBody) MarshalJSON() ([]byte, error) { + if u.GetConfigurationResponseBody1 != nil { + return utils.MarshalJSON(u.GetConfigurationResponseBody1, "", true) + } + + if u.GetConfigurationResponseBody2 != nil { + return utils.MarshalJSON(u.GetConfigurationResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type GetConfigurationResponseBody: all fields are null") +} + +type GetConfigurationResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The configuration with the provided id + OneOf *GetConfigurationResponseBody +} + +func (o *GetConfigurationResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetConfigurationResponse) GetOneOf() *GetConfigurationResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getconfigurations.go b/src/__tests__/mockserver/internal/sdk/models/operations/getconfigurations.go new file mode 100644 index 00000000..5ec5f327 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getconfigurations.go @@ -0,0 +1,1380 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type View string + +const ( + ViewAccount View = "account" + ViewProject View = "project" +) + +func (e View) ToPointer() *View { + return &e +} +func (e *View) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "account": + fallthrough + case "project": + *e = View(v) + return nil + default: + return fmt.Errorf("invalid value for View: %v", v) + } +} + +type InstallationType string + +const ( + InstallationTypeMarketplace InstallationType = "marketplace" + InstallationTypeExternal InstallationType = "external" +) + +func (e InstallationType) ToPointer() *InstallationType { + return &e +} +func (e *InstallationType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "external": + *e = InstallationType(v) + return nil + default: + return fmt.Errorf("invalid value for InstallationType: %v", v) + } +} + +type GetConfigurationsRequest struct { + View View `queryParam:"style=form,explode=true,name=view"` + InstallationType *InstallationType `queryParam:"style=form,explode=true,name=installationType"` + // ID of the integration + IntegrationIDOrSlug *string `queryParam:"style=form,explode=true,name=integrationIdOrSlug"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetConfigurationsRequest) GetView() View { + if o == nil { + return View("") + } + return o.View +} + +func (o *GetConfigurationsRequest) GetInstallationType() *InstallationType { + if o == nil { + return nil + } + return o.InstallationType +} + +func (o *GetConfigurationsRequest) GetIntegrationIDOrSlug() *string { + if o == nil { + return nil + } + return o.IntegrationIDOrSlug +} + +func (o *GetConfigurationsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetConfigurationsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type TagIds string + +const ( + TagIdsTagAi TagIds = "tag_ai" + TagIdsTagAnalytics TagIds = "tag_analytics" + TagIdsTagAuthentication TagIds = "tag_authentication" + TagIdsTagCms TagIds = "tag_cms" + TagIdsTagCodeRepository TagIds = "tag_code_repository" + TagIdsTagCommerce TagIds = "tag_commerce" + TagIdsTagDatabases TagIds = "tag_databases" + TagIdsTagDevTools TagIds = "tag_dev_tools" + TagIdsTagExperiments TagIds = "tag_experiments" + TagIdsTagLogging TagIds = "tag_logging" + TagIdsTagMessaging TagIds = "tag_messaging" + TagIdsTagMonitoring TagIds = "tag_monitoring" + TagIdsTagObservability TagIds = "tag_observability" + TagIdsTagPerformance TagIds = "tag_performance" + TagIdsTagProductivity TagIds = "tag_productivity" + TagIdsTagSearching TagIds = "tag_searching" + TagIdsTagSecurity TagIds = "tag_security" + TagIdsTagTesting TagIds = "tag_testing" + TagIdsTagVideo TagIds = "tag_video" +) + +func (e TagIds) ToPointer() *TagIds { + return &e +} +func (e *TagIds) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "tag_ai": + fallthrough + case "tag_analytics": + fallthrough + case "tag_authentication": + fallthrough + case "tag_cms": + fallthrough + case "tag_code_repository": + fallthrough + case "tag_commerce": + fallthrough + case "tag_databases": + fallthrough + case "tag_dev_tools": + fallthrough + case "tag_experiments": + fallthrough + case "tag_logging": + fallthrough + case "tag_messaging": + fallthrough + case "tag_monitoring": + fallthrough + case "tag_observability": + fallthrough + case "tag_performance": + fallthrough + case "tag_productivity": + fallthrough + case "tag_searching": + fallthrough + case "tag_security": + fallthrough + case "tag_testing": + fallthrough + case "tag_video": + *e = TagIds(v) + return nil + default: + return fmt.Errorf("invalid value for TagIds: %v", v) + } +} + +type Integration struct { + Name string `json:"name"` + Icon string `json:"icon"` + Category string `json:"category"` + IsLegacy bool `json:"isLegacy"` + Flags []string `json:"flags,omitempty"` + AssignedBetaLabelAt *float64 `json:"assignedBetaLabelAt,omitempty"` + TagIds []TagIds `json:"tagIds,omitempty"` +} + +func (o *Integration) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Integration) GetIcon() string { + if o == nil { + return "" + } + return o.Icon +} + +func (o *Integration) GetCategory() string { + if o == nil { + return "" + } + return o.Category +} + +func (o *Integration) GetIsLegacy() bool { + if o == nil { + return false + } + return o.IsLegacy +} + +func (o *Integration) GetFlags() []string { + if o == nil { + return nil + } + return o.Flags +} + +func (o *Integration) GetAssignedBetaLabelAt() *float64 { + if o == nil { + return nil + } + return o.AssignedBetaLabelAt +} + +func (o *Integration) GetTagIds() []TagIds { + if o == nil { + return nil + } + return o.TagIds +} + +// GetConfigurationsResponseBodyIntegrationsSource - Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics. +type GetConfigurationsResponseBodyIntegrationsSource string + +const ( + GetConfigurationsResponseBodyIntegrationsSourceMarketplace GetConfigurationsResponseBodyIntegrationsSource = "marketplace" + GetConfigurationsResponseBodyIntegrationsSourceDeployButton GetConfigurationsResponseBodyIntegrationsSource = "deploy-button" + GetConfigurationsResponseBodyIntegrationsSourceExternal GetConfigurationsResponseBodyIntegrationsSource = "external" +) + +func (e GetConfigurationsResponseBodyIntegrationsSource) ToPointer() *GetConfigurationsResponseBodyIntegrationsSource { + return &e +} +func (e *GetConfigurationsResponseBodyIntegrationsSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "deploy-button": + fallthrough + case "external": + *e = GetConfigurationsResponseBodyIntegrationsSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodyIntegrationsSource: %v", v) + } +} + +type GetConfigurationsResponseBodyIntegrationsType string + +const ( + GetConfigurationsResponseBodyIntegrationsTypeIntegrationConfiguration GetConfigurationsResponseBodyIntegrationsType = "integration-configuration" +) + +func (e GetConfigurationsResponseBodyIntegrationsType) ToPointer() *GetConfigurationsResponseBodyIntegrationsType { + return &e +} +func (e *GetConfigurationsResponseBodyIntegrationsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-configuration": + *e = GetConfigurationsResponseBodyIntegrationsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodyIntegrationsType: %v", v) + } +} + +type ResponseBodyDisabledReason string + +const ( + ResponseBodyDisabledReasonDisabledByOwner ResponseBodyDisabledReason = "disabled-by-owner" + ResponseBodyDisabledReasonFeatureNotAvailable ResponseBodyDisabledReason = "feature-not-available" + ResponseBodyDisabledReasonDisabledByAdmin ResponseBodyDisabledReason = "disabled-by-admin" + ResponseBodyDisabledReasonOriginalOwnerLeftTheTeam ResponseBodyDisabledReason = "original-owner-left-the-team" + ResponseBodyDisabledReasonAccountPlanDowngrade ResponseBodyDisabledReason = "account-plan-downgrade" + ResponseBodyDisabledReasonOriginalOwnerRoleDowngraded ResponseBodyDisabledReason = "original-owner-role-downgraded" +) + +func (e ResponseBodyDisabledReason) ToPointer() *ResponseBodyDisabledReason { + return &e +} +func (e *ResponseBodyDisabledReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "disabled-by-owner": + fallthrough + case "feature-not-available": + fallthrough + case "disabled-by-admin": + fallthrough + case "original-owner-left-the-team": + fallthrough + case "account-plan-downgrade": + fallthrough + case "original-owner-role-downgraded": + *e = ResponseBodyDisabledReason(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyDisabledReason: %v", v) + } +} + +// GetConfigurationsResponseBodyInstallationType - Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external' +type GetConfigurationsResponseBodyInstallationType string + +const ( + GetConfigurationsResponseBodyInstallationTypeMarketplace GetConfigurationsResponseBodyInstallationType = "marketplace" + GetConfigurationsResponseBodyInstallationTypeExternal GetConfigurationsResponseBodyInstallationType = "external" +) + +func (e GetConfigurationsResponseBodyInstallationType) ToPointer() *GetConfigurationsResponseBodyInstallationType { + return &e +} +func (e *GetConfigurationsResponseBodyInstallationType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "external": + *e = GetConfigurationsResponseBodyInstallationType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodyInstallationType: %v", v) + } +} + +type GetConfigurationsResponseBodyIntegrationsResponse200Type string + +const ( + GetConfigurationsResponseBodyIntegrationsResponse200TypePrepayment GetConfigurationsResponseBodyIntegrationsResponse200Type = "prepayment" + GetConfigurationsResponseBodyIntegrationsResponse200TypeSubscription GetConfigurationsResponseBodyIntegrationsResponse200Type = "subscription" +) + +func (e GetConfigurationsResponseBodyIntegrationsResponse200Type) ToPointer() *GetConfigurationsResponseBodyIntegrationsResponse200Type { + return &e +} +func (e *GetConfigurationsResponseBodyIntegrationsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "prepayment": + fallthrough + case "subscription": + *e = GetConfigurationsResponseBodyIntegrationsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodyIntegrationsResponse200Type: %v", v) + } +} + +type GetConfigurationsResponseBodyScope string + +const ( + GetConfigurationsResponseBodyScopeInstallation GetConfigurationsResponseBodyScope = "installation" + GetConfigurationsResponseBodyScopeResource GetConfigurationsResponseBodyScope = "resource" +) + +func (e GetConfigurationsResponseBodyScope) ToPointer() *GetConfigurationsResponseBodyScope { + return &e +} +func (e *GetConfigurationsResponseBodyScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "installation": + fallthrough + case "resource": + *e = GetConfigurationsResponseBodyScope(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodyScope: %v", v) + } +} + +type ResponseBodyDetails struct { + Label string `json:"label"` + Value *string `json:"value,omitempty"` +} + +func (o *ResponseBodyDetails) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *ResponseBodyDetails) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type ResponseBodyHeightlightedDetails struct { + Label string `json:"label"` + Value *string `json:"value,omitempty"` +} + +func (o *ResponseBodyHeightlightedDetails) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *ResponseBodyHeightlightedDetails) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type ResponseBodyQuote struct { + Line string `json:"line"` + Amount string `json:"amount"` +} + +func (o *ResponseBodyQuote) GetLine() string { + if o == nil { + return "" + } + return o.Line +} + +func (o *ResponseBodyQuote) GetAmount() string { + if o == nil { + return "" + } + return o.Amount +} + +type ResponseBodyBillingPlan struct { + ID string `json:"id"` + Type GetConfigurationsResponseBodyIntegrationsResponse200Type `json:"type"` + Name string `json:"name"` + Scope *GetConfigurationsResponseBodyScope `json:"scope,omitempty"` + Description string `json:"description"` + PaymentMethodRequired *bool `json:"paymentMethodRequired,omitempty"` + PreauthorizationAmount *float64 `json:"preauthorizationAmount,omitempty"` + Cost *string `json:"cost,omitempty"` + Details []ResponseBodyDetails `json:"details,omitempty"` + HeightlightedDetails []ResponseBodyHeightlightedDetails `json:"heightlightedDetails,omitempty"` + Quote []ResponseBodyQuote `json:"quote,omitempty"` + EffectiveDate *string `json:"effectiveDate,omitempty"` +} + +func (o *ResponseBodyBillingPlan) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ResponseBodyBillingPlan) GetType() GetConfigurationsResponseBodyIntegrationsResponse200Type { + if o == nil { + return GetConfigurationsResponseBodyIntegrationsResponse200Type("") + } + return o.Type +} + +func (o *ResponseBodyBillingPlan) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ResponseBodyBillingPlan) GetScope() *GetConfigurationsResponseBodyScope { + if o == nil { + return nil + } + return o.Scope +} + +func (o *ResponseBodyBillingPlan) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *ResponseBodyBillingPlan) GetPaymentMethodRequired() *bool { + if o == nil { + return nil + } + return o.PaymentMethodRequired +} + +func (o *ResponseBodyBillingPlan) GetPreauthorizationAmount() *float64 { + if o == nil { + return nil + } + return o.PreauthorizationAmount +} + +func (o *ResponseBodyBillingPlan) GetCost() *string { + if o == nil { + return nil + } + return o.Cost +} + +func (o *ResponseBodyBillingPlan) GetDetails() []ResponseBodyDetails { + if o == nil { + return nil + } + return o.Details +} + +func (o *ResponseBodyBillingPlan) GetHeightlightedDetails() []ResponseBodyHeightlightedDetails { + if o == nil { + return nil + } + return o.HeightlightedDetails +} + +func (o *ResponseBodyBillingPlan) GetQuote() []ResponseBodyQuote { + if o == nil { + return nil + } + return o.Quote +} + +func (o *ResponseBodyBillingPlan) GetEffectiveDate() *string { + if o == nil { + return nil + } + return o.EffectiveDate +} + +type GetConfigurationsResponseBody2 struct { + Integration Integration `json:"integration"` + // A timestamp that tells you when the configuration was installed successfully + CompletedAt *float64 `json:"completedAt,omitempty"` + // A timestamp that tells you when the configuration was created + CreatedAt float64 `json:"createdAt"` + // The unique identifier of the configuration + ID string `json:"id"` + // The unique identifier of the app the configuration was created for + IntegrationID string `json:"integrationId"` + // The user or team ID that owns the configuration + OwnerID string `json:"ownerId"` + // When a configuration is limited to access certain projects, this will contain each of the project ID it is allowed to access. If it is not defined, the configuration has full access. + Projects []string `json:"projects,omitempty"` + // Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics. + Source *GetConfigurationsResponseBodyIntegrationsSource `json:"source,omitempty"` + // The slug of the integration the configuration is created for. + Slug string `json:"slug"` + // When the configuration was created for a team, this will show the ID of the team. + TeamID *string `json:"teamId,omitempty"` + Type GetConfigurationsResponseBodyIntegrationsType `json:"type"` + // A timestamp that tells you when the configuration was updated. + UpdatedAt float64 `json:"updatedAt"` + // The ID of the user that created the configuration. + UserID string `json:"userId"` + // The resources that are allowed to be accessed by the configuration. + Scopes []string `json:"scopes"` + // A timestamp that tells you when the configuration was disabled. Note: Configurations can be disabled when the associated user loses access to a team. They do not function during this time until the configuration is 'transferred', meaning the associated user is changed to one with access to the team. + DisabledAt *float64 `json:"disabledAt,omitempty"` + // A timestamp that tells you when the configuration was deleted. + DeletedAt *float64 `json:"deletedAt,omitempty"` + // A timestamp that tells you when the configuration deletion has been started for cases when the deletion needs to be settled/approved by partners, such as when marketplace invoices have been paid. + DeleteRequestedAt *float64 `json:"deleteRequestedAt,omitempty"` + DisabledReason *ResponseBodyDisabledReason `json:"disabledReason,omitempty"` + // Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external' + InstallationType *GetConfigurationsResponseBodyInstallationType `json:"installationType,omitempty"` + BillingPlan *ResponseBodyBillingPlan `json:"billingPlan,omitempty"` + BillingTotal *string `json:"billingTotal,omitempty"` + PeriodStart *string `json:"periodStart,omitempty"` + PeriodEnd *string `json:"periodEnd,omitempty"` +} + +func (o *GetConfigurationsResponseBody2) GetIntegration() Integration { + if o == nil { + return Integration{} + } + return o.Integration +} + +func (o *GetConfigurationsResponseBody2) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *GetConfigurationsResponseBody2) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetConfigurationsResponseBody2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetConfigurationsResponseBody2) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *GetConfigurationsResponseBody2) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetConfigurationsResponseBody2) GetProjects() []string { + if o == nil { + return nil + } + return o.Projects +} + +func (o *GetConfigurationsResponseBody2) GetSource() *GetConfigurationsResponseBodyIntegrationsSource { + if o == nil { + return nil + } + return o.Source +} + +func (o *GetConfigurationsResponseBody2) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GetConfigurationsResponseBody2) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetConfigurationsResponseBody2) GetType() GetConfigurationsResponseBodyIntegrationsType { + if o == nil { + return GetConfigurationsResponseBodyIntegrationsType("") + } + return o.Type +} + +func (o *GetConfigurationsResponseBody2) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetConfigurationsResponseBody2) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *GetConfigurationsResponseBody2) GetScopes() []string { + if o == nil { + return []string{} + } + return o.Scopes +} + +func (o *GetConfigurationsResponseBody2) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetConfigurationsResponseBody2) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetConfigurationsResponseBody2) GetDeleteRequestedAt() *float64 { + if o == nil { + return nil + } + return o.DeleteRequestedAt +} + +func (o *GetConfigurationsResponseBody2) GetDisabledReason() *ResponseBodyDisabledReason { + if o == nil { + return nil + } + return o.DisabledReason +} + +func (o *GetConfigurationsResponseBody2) GetInstallationType() *GetConfigurationsResponseBodyInstallationType { + if o == nil { + return nil + } + return o.InstallationType +} + +func (o *GetConfigurationsResponseBody2) GetBillingPlan() *ResponseBodyBillingPlan { + if o == nil { + return nil + } + return o.BillingPlan +} + +func (o *GetConfigurationsResponseBody2) GetBillingTotal() *string { + if o == nil { + return nil + } + return o.BillingTotal +} + +func (o *GetConfigurationsResponseBody2) GetPeriodStart() *string { + if o == nil { + return nil + } + return o.PeriodStart +} + +func (o *GetConfigurationsResponseBody2) GetPeriodEnd() *string { + if o == nil { + return nil + } + return o.PeriodEnd +} + +// GetConfigurationsResponseBodySource - Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics. +type GetConfigurationsResponseBodySource string + +const ( + GetConfigurationsResponseBodySourceMarketplace GetConfigurationsResponseBodySource = "marketplace" + GetConfigurationsResponseBodySourceDeployButton GetConfigurationsResponseBodySource = "deploy-button" + GetConfigurationsResponseBodySourceExternal GetConfigurationsResponseBodySource = "external" +) + +func (e GetConfigurationsResponseBodySource) ToPointer() *GetConfigurationsResponseBodySource { + return &e +} +func (e *GetConfigurationsResponseBodySource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "deploy-button": + fallthrough + case "external": + *e = GetConfigurationsResponseBodySource(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodySource: %v", v) + } +} + +type GetConfigurationsResponseBodyType string + +const ( + GetConfigurationsResponseBodyTypeIntegrationConfiguration GetConfigurationsResponseBodyType = "integration-configuration" +) + +func (e GetConfigurationsResponseBodyType) ToPointer() *GetConfigurationsResponseBodyType { + return &e +} +func (e *GetConfigurationsResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-configuration": + *e = GetConfigurationsResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodyType: %v", v) + } +} + +type GetConfigurationsResponseBodyDisabledReason string + +const ( + GetConfigurationsResponseBodyDisabledReasonDisabledByOwner GetConfigurationsResponseBodyDisabledReason = "disabled-by-owner" + GetConfigurationsResponseBodyDisabledReasonFeatureNotAvailable GetConfigurationsResponseBodyDisabledReason = "feature-not-available" + GetConfigurationsResponseBodyDisabledReasonDisabledByAdmin GetConfigurationsResponseBodyDisabledReason = "disabled-by-admin" + GetConfigurationsResponseBodyDisabledReasonOriginalOwnerLeftTheTeam GetConfigurationsResponseBodyDisabledReason = "original-owner-left-the-team" + GetConfigurationsResponseBodyDisabledReasonAccountPlanDowngrade GetConfigurationsResponseBodyDisabledReason = "account-plan-downgrade" + GetConfigurationsResponseBodyDisabledReasonOriginalOwnerRoleDowngraded GetConfigurationsResponseBodyDisabledReason = "original-owner-role-downgraded" +) + +func (e GetConfigurationsResponseBodyDisabledReason) ToPointer() *GetConfigurationsResponseBodyDisabledReason { + return &e +} +func (e *GetConfigurationsResponseBodyDisabledReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "disabled-by-owner": + fallthrough + case "feature-not-available": + fallthrough + case "disabled-by-admin": + fallthrough + case "original-owner-left-the-team": + fallthrough + case "account-plan-downgrade": + fallthrough + case "original-owner-role-downgraded": + *e = GetConfigurationsResponseBodyDisabledReason(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodyDisabledReason: %v", v) + } +} + +// ResponseBodyInstallationType - Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external' +type ResponseBodyInstallationType string + +const ( + ResponseBodyInstallationTypeMarketplace ResponseBodyInstallationType = "marketplace" + ResponseBodyInstallationTypeExternal ResponseBodyInstallationType = "external" +) + +func (e ResponseBodyInstallationType) ToPointer() *ResponseBodyInstallationType { + return &e +} +func (e *ResponseBodyInstallationType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "marketplace": + fallthrough + case "external": + *e = ResponseBodyInstallationType(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyInstallationType: %v", v) + } +} + +type GetConfigurationsResponseBodyIntegrationsResponseType string + +const ( + GetConfigurationsResponseBodyIntegrationsResponseTypePrepayment GetConfigurationsResponseBodyIntegrationsResponseType = "prepayment" + GetConfigurationsResponseBodyIntegrationsResponseTypeSubscription GetConfigurationsResponseBodyIntegrationsResponseType = "subscription" +) + +func (e GetConfigurationsResponseBodyIntegrationsResponseType) ToPointer() *GetConfigurationsResponseBodyIntegrationsResponseType { + return &e +} +func (e *GetConfigurationsResponseBodyIntegrationsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "prepayment": + fallthrough + case "subscription": + *e = GetConfigurationsResponseBodyIntegrationsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetConfigurationsResponseBodyIntegrationsResponseType: %v", v) + } +} + +type ResponseBodyScope string + +const ( + ResponseBodyScopeInstallation ResponseBodyScope = "installation" + ResponseBodyScopeResource ResponseBodyScope = "resource" +) + +func (e ResponseBodyScope) ToPointer() *ResponseBodyScope { + return &e +} +func (e *ResponseBodyScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "installation": + fallthrough + case "resource": + *e = ResponseBodyScope(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyScope: %v", v) + } +} + +type Details struct { + Label string `json:"label"` + Value *string `json:"value,omitempty"` +} + +func (o *Details) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *Details) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type HeightlightedDetails struct { + Label string `json:"label"` + Value *string `json:"value,omitempty"` +} + +func (o *HeightlightedDetails) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *HeightlightedDetails) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type Quote struct { + Line string `json:"line"` + Amount string `json:"amount"` +} + +func (o *Quote) GetLine() string { + if o == nil { + return "" + } + return o.Line +} + +func (o *Quote) GetAmount() string { + if o == nil { + return "" + } + return o.Amount +} + +type BillingPlan struct { + ID string `json:"id"` + Type GetConfigurationsResponseBodyIntegrationsResponseType `json:"type"` + Name string `json:"name"` + Scope *ResponseBodyScope `json:"scope,omitempty"` + Description string `json:"description"` + PaymentMethodRequired *bool `json:"paymentMethodRequired,omitempty"` + PreauthorizationAmount *float64 `json:"preauthorizationAmount,omitempty"` + Cost *string `json:"cost,omitempty"` + Details []Details `json:"details,omitempty"` + HeightlightedDetails []HeightlightedDetails `json:"heightlightedDetails,omitempty"` + Quote []Quote `json:"quote,omitempty"` + EffectiveDate *string `json:"effectiveDate,omitempty"` +} + +func (o *BillingPlan) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *BillingPlan) GetType() GetConfigurationsResponseBodyIntegrationsResponseType { + if o == nil { + return GetConfigurationsResponseBodyIntegrationsResponseType("") + } + return o.Type +} + +func (o *BillingPlan) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *BillingPlan) GetScope() *ResponseBodyScope { + if o == nil { + return nil + } + return o.Scope +} + +func (o *BillingPlan) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *BillingPlan) GetPaymentMethodRequired() *bool { + if o == nil { + return nil + } + return o.PaymentMethodRequired +} + +func (o *BillingPlan) GetPreauthorizationAmount() *float64 { + if o == nil { + return nil + } + return o.PreauthorizationAmount +} + +func (o *BillingPlan) GetCost() *string { + if o == nil { + return nil + } + return o.Cost +} + +func (o *BillingPlan) GetDetails() []Details { + if o == nil { + return nil + } + return o.Details +} + +func (o *BillingPlan) GetHeightlightedDetails() []HeightlightedDetails { + if o == nil { + return nil + } + return o.HeightlightedDetails +} + +func (o *BillingPlan) GetQuote() []Quote { + if o == nil { + return nil + } + return o.Quote +} + +func (o *BillingPlan) GetEffectiveDate() *string { + if o == nil { + return nil + } + return o.EffectiveDate +} + +// GetConfigurationsResponseBody1 - The list of configurations for the authenticated user +type GetConfigurationsResponseBody1 struct { + // A timestamp that tells you when the configuration was installed successfully + CompletedAt *float64 `json:"completedAt,omitempty"` + // A timestamp that tells you when the configuration was created + CreatedAt *float64 `json:"createdAt,omitempty"` + // The unique identifier of the configuration + ID *string `json:"id,omitempty"` + // The unique identifier of the app the configuration was created for + IntegrationID *string `json:"integrationId,omitempty"` + // The user or team ID that owns the configuration + OwnerID *string `json:"ownerId,omitempty"` + // When a configuration is limited to access certain projects, this will contain each of the project ID it is allowed to access. If it is not defined, the configuration has full access. + Projects []string `json:"projects,omitempty"` + // Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics. + Source *GetConfigurationsResponseBodySource `json:"source,omitempty"` + // The slug of the integration the configuration is created for. + Slug *string `json:"slug,omitempty"` + // When the configuration was created for a team, this will show the ID of the team. + TeamID *string `json:"teamId,omitempty"` + Type *GetConfigurationsResponseBodyType `json:"type,omitempty"` + // A timestamp that tells you when the configuration was updated. + UpdatedAt *float64 `json:"updatedAt,omitempty"` + // The ID of the user that created the configuration. + UserID *string `json:"userId,omitempty"` + // The resources that are allowed to be accessed by the configuration. + Scopes []string `json:"scopes,omitempty"` + // A timestamp that tells you when the configuration was disabled. Note: Configurations can be disabled when the associated user loses access to a team. They do not function during this time until the configuration is 'transferred', meaning the associated user is changed to one with access to the team. + DisabledAt *float64 `json:"disabledAt,omitempty"` + // A timestamp that tells you when the configuration was deleted. + DeletedAt *float64 `json:"deletedAt,omitempty"` + // A timestamp that tells you when the configuration deletion has been started for cases when the deletion needs to be settled/approved by partners, such as when marketplace invoices have been paid. + DeleteRequestedAt *float64 `json:"deleteRequestedAt,omitempty"` + DisabledReason *GetConfigurationsResponseBodyDisabledReason `json:"disabledReason,omitempty"` + // Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external' + InstallationType *ResponseBodyInstallationType `json:"installationType,omitempty"` + BillingPlan *BillingPlan `json:"billingPlan,omitempty"` + BillingTotal *string `json:"billingTotal,omitempty"` + PeriodStart *string `json:"periodStart,omitempty"` + PeriodEnd *string `json:"periodEnd,omitempty"` +} + +func (o *GetConfigurationsResponseBody1) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *GetConfigurationsResponseBody1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetConfigurationsResponseBody1) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetConfigurationsResponseBody1) GetIntegrationID() *string { + if o == nil { + return nil + } + return o.IntegrationID +} + +func (o *GetConfigurationsResponseBody1) GetOwnerID() *string { + if o == nil { + return nil + } + return o.OwnerID +} + +func (o *GetConfigurationsResponseBody1) GetProjects() []string { + if o == nil { + return nil + } + return o.Projects +} + +func (o *GetConfigurationsResponseBody1) GetSource() *GetConfigurationsResponseBodySource { + if o == nil { + return nil + } + return o.Source +} + +func (o *GetConfigurationsResponseBody1) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetConfigurationsResponseBody1) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetConfigurationsResponseBody1) GetType() *GetConfigurationsResponseBodyType { + if o == nil { + return nil + } + return o.Type +} + +func (o *GetConfigurationsResponseBody1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetConfigurationsResponseBody1) GetUserID() *string { + if o == nil { + return nil + } + return o.UserID +} + +func (o *GetConfigurationsResponseBody1) GetScopes() []string { + if o == nil { + return nil + } + return o.Scopes +} + +func (o *GetConfigurationsResponseBody1) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetConfigurationsResponseBody1) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetConfigurationsResponseBody1) GetDeleteRequestedAt() *float64 { + if o == nil { + return nil + } + return o.DeleteRequestedAt +} + +func (o *GetConfigurationsResponseBody1) GetDisabledReason() *GetConfigurationsResponseBodyDisabledReason { + if o == nil { + return nil + } + return o.DisabledReason +} + +func (o *GetConfigurationsResponseBody1) GetInstallationType() *ResponseBodyInstallationType { + if o == nil { + return nil + } + return o.InstallationType +} + +func (o *GetConfigurationsResponseBody1) GetBillingPlan() *BillingPlan { + if o == nil { + return nil + } + return o.BillingPlan +} + +func (o *GetConfigurationsResponseBody1) GetBillingTotal() *string { + if o == nil { + return nil + } + return o.BillingTotal +} + +func (o *GetConfigurationsResponseBody1) GetPeriodStart() *string { + if o == nil { + return nil + } + return o.PeriodStart +} + +func (o *GetConfigurationsResponseBody1) GetPeriodEnd() *string { + if o == nil { + return nil + } + return o.PeriodEnd +} + +type GetConfigurationsResponseBodyUnionType string + +const ( + GetConfigurationsResponseBodyUnionTypeArrayOfGetConfigurationsResponseBody1 GetConfigurationsResponseBodyUnionType = "arrayOfGetConfigurationsResponseBody1" + GetConfigurationsResponseBodyUnionTypeArrayOfGetConfigurationsResponseBody2 GetConfigurationsResponseBodyUnionType = "arrayOfGetConfigurationsResponseBody2" +) + +// GetConfigurationsResponseBody - The list of configurations for the authenticated user +type GetConfigurationsResponseBody struct { + ArrayOfGetConfigurationsResponseBody1 []GetConfigurationsResponseBody1 + ArrayOfGetConfigurationsResponseBody2 []GetConfigurationsResponseBody2 + + Type GetConfigurationsResponseBodyUnionType +} + +func CreateGetConfigurationsResponseBodyArrayOfGetConfigurationsResponseBody1(arrayOfGetConfigurationsResponseBody1 []GetConfigurationsResponseBody1) GetConfigurationsResponseBody { + typ := GetConfigurationsResponseBodyUnionTypeArrayOfGetConfigurationsResponseBody1 + + return GetConfigurationsResponseBody{ + ArrayOfGetConfigurationsResponseBody1: arrayOfGetConfigurationsResponseBody1, + Type: typ, + } +} + +func CreateGetConfigurationsResponseBodyArrayOfGetConfigurationsResponseBody2(arrayOfGetConfigurationsResponseBody2 []GetConfigurationsResponseBody2) GetConfigurationsResponseBody { + typ := GetConfigurationsResponseBodyUnionTypeArrayOfGetConfigurationsResponseBody2 + + return GetConfigurationsResponseBody{ + ArrayOfGetConfigurationsResponseBody2: arrayOfGetConfigurationsResponseBody2, + Type: typ, + } +} + +func (u *GetConfigurationsResponseBody) UnmarshalJSON(data []byte) error { + + var arrayOfGetConfigurationsResponseBody1 []GetConfigurationsResponseBody1 = []GetConfigurationsResponseBody1{} + if err := utils.UnmarshalJSON(data, &arrayOfGetConfigurationsResponseBody1, "", true, true); err == nil { + u.ArrayOfGetConfigurationsResponseBody1 = arrayOfGetConfigurationsResponseBody1 + u.Type = GetConfigurationsResponseBodyUnionTypeArrayOfGetConfigurationsResponseBody1 + return nil + } + + var arrayOfGetConfigurationsResponseBody2 []GetConfigurationsResponseBody2 = []GetConfigurationsResponseBody2{} + if err := utils.UnmarshalJSON(data, &arrayOfGetConfigurationsResponseBody2, "", true, true); err == nil { + u.ArrayOfGetConfigurationsResponseBody2 = arrayOfGetConfigurationsResponseBody2 + u.Type = GetConfigurationsResponseBodyUnionTypeArrayOfGetConfigurationsResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetConfigurationsResponseBody", string(data)) +} + +func (u GetConfigurationsResponseBody) MarshalJSON() ([]byte, error) { + if u.ArrayOfGetConfigurationsResponseBody1 != nil { + return utils.MarshalJSON(u.ArrayOfGetConfigurationsResponseBody1, "", true) + } + + if u.ArrayOfGetConfigurationsResponseBody2 != nil { + return utils.MarshalJSON(u.ArrayOfGetConfigurationsResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type GetConfigurationsResponseBody: all fields are null") +} + +type GetConfigurationsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The list of configurations for the authenticated user + OneOf *GetConfigurationsResponseBody +} + +func (o *GetConfigurationsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetConfigurationsResponse) GetOneOf() *GetConfigurationsResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getdeployment.go b/src/__tests__/mockserver/internal/sdk/models/operations/getdeployment.go new file mode 100644 index 00000000..f5cb32b9 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getdeployment.go @@ -0,0 +1,6647 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetDeploymentRequest struct { + // The unique identifier or hostname of the deployment. + IDOrURL string `pathParam:"style=simple,explode=false,name=idOrUrl"` + // Whether to add in gitRepo information. + WithGitRepoInfo *string `queryParam:"style=form,explode=true,name=withGitRepoInfo"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetDeploymentRequest) GetIDOrURL() string { + if o == nil { + return "" + } + return o.IDOrURL +} + +func (o *GetDeploymentRequest) GetWithGitRepoInfo() *string { + if o == nil { + return nil + } + return o.WithGitRepoInfo +} + +func (o *GetDeploymentRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDeploymentRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetDeploymentResponseBodyCreator struct { + UID string `json:"uid"` + Username *string `json:"username,omitempty"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *GetDeploymentResponseBodyCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *GetDeploymentResponseBodyCreator) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +func (o *GetDeploymentResponseBodyCreator) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +type GetDeploymentResponseBodyDeploymentsReadyState string + +const ( + GetDeploymentResponseBodyDeploymentsReadyStateBuilding GetDeploymentResponseBodyDeploymentsReadyState = "BUILDING" + GetDeploymentResponseBodyDeploymentsReadyStateError GetDeploymentResponseBodyDeploymentsReadyState = "ERROR" + GetDeploymentResponseBodyDeploymentsReadyStateInitializing GetDeploymentResponseBodyDeploymentsReadyState = "INITIALIZING" + GetDeploymentResponseBodyDeploymentsReadyStateReady GetDeploymentResponseBodyDeploymentsReadyState = "READY" +) + +func (e GetDeploymentResponseBodyDeploymentsReadyState) ToPointer() *GetDeploymentResponseBodyDeploymentsReadyState { + return &e +} +func (e *GetDeploymentResponseBodyDeploymentsReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + *e = GetDeploymentResponseBodyDeploymentsReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyDeploymentsReadyState: %v", v) + } +} + +type GetDeploymentResponseBodyOutput struct { + Path string `json:"path"` + FunctionName string `json:"functionName"` +} + +func (o *GetDeploymentResponseBodyOutput) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *GetDeploymentResponseBodyOutput) GetFunctionName() string { + if o == nil { + return "" + } + return o.FunctionName +} + +// ResponseBodyLambdas - A partial representation of a Build used by the deployment endpoint. +type ResponseBodyLambdas struct { + ID *string `json:"id,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + Entrypoint *string `json:"entrypoint,omitempty"` + ReadyState *GetDeploymentResponseBodyDeploymentsReadyState `json:"readyState,omitempty"` + ReadyStateAt *float64 `json:"readyStateAt,omitempty"` + Output []GetDeploymentResponseBodyOutput `json:"output"` +} + +func (o *ResponseBodyLambdas) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *ResponseBodyLambdas) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *ResponseBodyLambdas) GetEntrypoint() *string { + if o == nil { + return nil + } + return o.Entrypoint +} + +func (o *ResponseBodyLambdas) GetReadyState() *GetDeploymentResponseBodyDeploymentsReadyState { + if o == nil { + return nil + } + return o.ReadyState +} + +func (o *ResponseBodyLambdas) GetReadyStateAt() *float64 { + if o == nil { + return nil + } + return o.ReadyStateAt +} + +func (o *ResponseBodyLambdas) GetOutput() []GetDeploymentResponseBodyOutput { + if o == nil { + return []GetDeploymentResponseBodyOutput{} + } + return o.Output +} + +type GetDeploymentResponseBodyStatus string + +const ( + GetDeploymentResponseBodyStatusQueued GetDeploymentResponseBodyStatus = "QUEUED" + GetDeploymentResponseBodyStatusBuilding GetDeploymentResponseBodyStatus = "BUILDING" + GetDeploymentResponseBodyStatusError GetDeploymentResponseBodyStatus = "ERROR" + GetDeploymentResponseBodyStatusInitializing GetDeploymentResponseBodyStatus = "INITIALIZING" + GetDeploymentResponseBodyStatusReady GetDeploymentResponseBodyStatus = "READY" + GetDeploymentResponseBodyStatusCanceled GetDeploymentResponseBodyStatus = "CANCELED" +) + +func (e GetDeploymentResponseBodyStatus) ToPointer() *GetDeploymentResponseBodyStatus { + return &e +} +func (e *GetDeploymentResponseBodyStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "QUEUED": + fallthrough + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = GetDeploymentResponseBodyStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyStatus: %v", v) + } +} + +type ResponseBodyTeam struct { + ID string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *ResponseBodyTeam) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ResponseBodyTeam) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ResponseBodyTeam) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *ResponseBodyTeam) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +type GetDeploymentCustomEnvironment2 struct { + ID string `json:"id"` +} + +func (o *GetDeploymentCustomEnvironment2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type GetDeploymentCustomEnvironment1 struct { +} + +type ResponseBodyCustomEnvironmentType string + +const ( + ResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironment1 ResponseBodyCustomEnvironmentType = "getDeployment_customEnvironment_1" + ResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironment2 ResponseBodyCustomEnvironmentType = "getDeployment_customEnvironment_2" +) + +type ResponseBodyCustomEnvironment struct { + GetDeploymentCustomEnvironment1 *GetDeploymentCustomEnvironment1 + GetDeploymentCustomEnvironment2 *GetDeploymentCustomEnvironment2 + + Type ResponseBodyCustomEnvironmentType +} + +func CreateResponseBodyCustomEnvironmentGetDeploymentCustomEnvironment1(getDeploymentCustomEnvironment1 GetDeploymentCustomEnvironment1) ResponseBodyCustomEnvironment { + typ := ResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironment1 + + return ResponseBodyCustomEnvironment{ + GetDeploymentCustomEnvironment1: &getDeploymentCustomEnvironment1, + Type: typ, + } +} + +func CreateResponseBodyCustomEnvironmentGetDeploymentCustomEnvironment2(getDeploymentCustomEnvironment2 GetDeploymentCustomEnvironment2) ResponseBodyCustomEnvironment { + typ := ResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironment2 + + return ResponseBodyCustomEnvironment{ + GetDeploymentCustomEnvironment2: &getDeploymentCustomEnvironment2, + Type: typ, + } +} + +func (u *ResponseBodyCustomEnvironment) UnmarshalJSON(data []byte) error { + + var getDeploymentCustomEnvironment1 GetDeploymentCustomEnvironment1 = GetDeploymentCustomEnvironment1{} + if err := utils.UnmarshalJSON(data, &getDeploymentCustomEnvironment1, "", true, true); err == nil { + u.GetDeploymentCustomEnvironment1 = &getDeploymentCustomEnvironment1 + u.Type = ResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironment1 + return nil + } + + var getDeploymentCustomEnvironment2 GetDeploymentCustomEnvironment2 = GetDeploymentCustomEnvironment2{} + if err := utils.UnmarshalJSON(data, &getDeploymentCustomEnvironment2, "", true, true); err == nil { + u.GetDeploymentCustomEnvironment2 = &getDeploymentCustomEnvironment2 + u.Type = ResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironment2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyCustomEnvironment", string(data)) +} + +func (u ResponseBodyCustomEnvironment) MarshalJSON() ([]byte, error) { + if u.GetDeploymentCustomEnvironment1 != nil { + return utils.MarshalJSON(u.GetDeploymentCustomEnvironment1, "", true) + } + + if u.GetDeploymentCustomEnvironment2 != nil { + return utils.MarshalJSON(u.GetDeploymentCustomEnvironment2, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyCustomEnvironment: all fields are null") +} + +type ResponseBodyAliasWarning struct { + Code string `json:"code"` + Message string `json:"message"` + Link *string `json:"link,omitempty"` + Action *string `json:"action,omitempty"` +} + +func (o *ResponseBodyAliasWarning) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *ResponseBodyAliasWarning) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +func (o *ResponseBodyAliasWarning) GetLink() *string { + if o == nil { + return nil + } + return o.Link +} + +func (o *ResponseBodyAliasWarning) GetAction() *string { + if o == nil { + return nil + } + return o.Action +} + +type GetDeploymentResponseBodyType string + +const ( + GetDeploymentResponseBodyTypeLambdas GetDeploymentResponseBodyType = "LAMBDAS" +) + +func (e GetDeploymentResponseBodyType) ToPointer() *GetDeploymentResponseBodyType { + return &e +} +func (e *GetDeploymentResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = GetDeploymentResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyType: %v", v) + } +} + +type GetDeploymentResponseBodyReadyState string + +const ( + GetDeploymentResponseBodyReadyStateQueued GetDeploymentResponseBodyReadyState = "QUEUED" + GetDeploymentResponseBodyReadyStateBuilding GetDeploymentResponseBodyReadyState = "BUILDING" + GetDeploymentResponseBodyReadyStateError GetDeploymentResponseBodyReadyState = "ERROR" + GetDeploymentResponseBodyReadyStateInitializing GetDeploymentResponseBodyReadyState = "INITIALIZING" + GetDeploymentResponseBodyReadyStateReady GetDeploymentResponseBodyReadyState = "READY" + GetDeploymentResponseBodyReadyStateCanceled GetDeploymentResponseBodyReadyState = "CANCELED" +) + +func (e GetDeploymentResponseBodyReadyState) ToPointer() *GetDeploymentResponseBodyReadyState { + return &e +} +func (e *GetDeploymentResponseBodyReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "QUEUED": + fallthrough + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = GetDeploymentResponseBodyReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyReadyState: %v", v) + } +} + +type GetDeploymentResponseBodyAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *GetDeploymentResponseBodyAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *GetDeploymentResponseBodyAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type GetDeploymentResponseBodyChecksState string + +const ( + GetDeploymentResponseBodyChecksStateRegistered GetDeploymentResponseBodyChecksState = "registered" + GetDeploymentResponseBodyChecksStateRunning GetDeploymentResponseBodyChecksState = "running" + GetDeploymentResponseBodyChecksStateCompleted GetDeploymentResponseBodyChecksState = "completed" +) + +func (e GetDeploymentResponseBodyChecksState) ToPointer() *GetDeploymentResponseBodyChecksState { + return &e +} +func (e *GetDeploymentResponseBodyChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = GetDeploymentResponseBodyChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyChecksState: %v", v) + } +} + +type GetDeploymentResponseBodyChecksConclusion string + +const ( + GetDeploymentResponseBodyChecksConclusionSucceeded GetDeploymentResponseBodyChecksConclusion = "succeeded" + GetDeploymentResponseBodyChecksConclusionFailed GetDeploymentResponseBodyChecksConclusion = "failed" + GetDeploymentResponseBodyChecksConclusionSkipped GetDeploymentResponseBodyChecksConclusion = "skipped" + GetDeploymentResponseBodyChecksConclusionCanceled GetDeploymentResponseBodyChecksConclusion = "canceled" +) + +func (e GetDeploymentResponseBodyChecksConclusion) ToPointer() *GetDeploymentResponseBodyChecksConclusion { + return &e +} +func (e *GetDeploymentResponseBodyChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = GetDeploymentResponseBodyChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyChecksConclusion: %v", v) + } +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29TypeBitbucket GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type = "bitbucket" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type: %v", v) + } +} + +type GetDeploymentGitSource9 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + Owner *string `json:"owner,omitempty"` + Slug *string `json:"slug,omitempty"` + WorkspaceUUID string `json:"workspaceUuid"` + RepoUUID string `json:"repoUuid"` +} + +func (o *GetDeploymentGitSource9) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource9) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetDeploymentGitSource9) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GetDeploymentGitSource9) GetOwner() *string { + if o == nil { + return nil + } + return o.Owner +} + +func (o *GetDeploymentGitSource9) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetDeploymentGitSource9) GetWorkspaceUUID() string { + if o == nil { + return "" + } + return o.WorkspaceUUID +} + +func (o *GetDeploymentGitSource9) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28TypeGitlab GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type = "gitlab" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type: %v", v) + } +} + +type GetDeploymentGitSource8 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + ProjectID float64 `json:"projectId"` +} + +func (o *GetDeploymentGitSource8) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource8) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetDeploymentGitSource8) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GetDeploymentGitSource8) GetProjectID() float64 { + if o == nil { + return 0.0 + } + return o.ProjectID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27TypeGithub GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type = "github" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type: %v", v) + } +} + +type GetDeploymentGitSource7 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + RepoID float64 `json:"repoId"` + Org *string `json:"org,omitempty"` + Repo *string `json:"repo,omitempty"` +} + +func (o *GetDeploymentGitSource7) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource7) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetDeploymentGitSource7) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GetDeploymentGitSource7) GetRepoID() float64 { + if o == nil { + return 0.0 + } + return o.RepoID +} + +func (o *GetDeploymentGitSource7) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} + +func (o *GetDeploymentGitSource7) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26TypeCustom GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type = "custom" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "custom": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type: %v", v) + } +} + +// GetDeploymentGitSource6 - Allows custom git sources (local folder mounted to the container) in test mode +type GetDeploymentGitSource6 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + GitURL string `json:"gitUrl"` +} + +func (o *GetDeploymentGitSource6) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource6) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetDeploymentGitSource6) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GetDeploymentGitSource6) GetGitURL() string { + if o == nil { + return "" + } + return o.GitURL +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25TypeBitbucket GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type = "bitbucket" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type: %v", v) + } +} + +type GetDeploymentGitSource5 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type `json:"type"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSource5) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource5) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *GetDeploymentGitSource5) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GetDeploymentGitSource5) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSource5) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSource5) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24TypeBitbucket GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type = "bitbucket" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type: %v", v) + } +} + +type GetDeploymentGitSource4 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type `json:"type"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` + RepoUUID string `json:"repoUuid"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSource4) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource4) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +func (o *GetDeploymentGitSource4) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +func (o *GetDeploymentGitSource4) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSource4) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSource4) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23TypeGitlab GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type = "gitlab" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type: %v", v) + } +} + +type GetDeploymentGitSourceDeploymentsProjectIDType string + +const ( + GetDeploymentGitSourceDeploymentsProjectIDTypeStr GetDeploymentGitSourceDeploymentsProjectIDType = "str" + GetDeploymentGitSourceDeploymentsProjectIDTypeNumber GetDeploymentGitSourceDeploymentsProjectIDType = "number" +) + +type GetDeploymentGitSourceDeploymentsProjectID struct { + Str *string + Number *float64 + + Type GetDeploymentGitSourceDeploymentsProjectIDType +} + +func CreateGetDeploymentGitSourceDeploymentsProjectIDStr(str string) GetDeploymentGitSourceDeploymentsProjectID { + typ := GetDeploymentGitSourceDeploymentsProjectIDTypeStr + + return GetDeploymentGitSourceDeploymentsProjectID{ + Str: &str, + Type: typ, + } +} + +func CreateGetDeploymentGitSourceDeploymentsProjectIDNumber(number float64) GetDeploymentGitSourceDeploymentsProjectID { + typ := GetDeploymentGitSourceDeploymentsProjectIDTypeNumber + + return GetDeploymentGitSourceDeploymentsProjectID{ + Number: &number, + Type: typ, + } +} + +func (u *GetDeploymentGitSourceDeploymentsProjectID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetDeploymentGitSourceDeploymentsProjectIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetDeploymentGitSourceDeploymentsProjectIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentGitSourceDeploymentsProjectID", string(data)) +} + +func (u GetDeploymentGitSourceDeploymentsProjectID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentGitSourceDeploymentsProjectID: all fields are null") +} + +type GetDeploymentGitSource3 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type `json:"type"` + ProjectID GetDeploymentGitSourceDeploymentsProjectID `json:"projectId"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSource3) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource3) GetProjectID() GetDeploymentGitSourceDeploymentsProjectID { + if o == nil { + return GetDeploymentGitSourceDeploymentsProjectID{} + } + return o.ProjectID +} + +func (o *GetDeploymentGitSource3) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSource3) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSource3) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22TypeGithub GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type = "github" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type: %v", v) + } +} + +type GetDeploymentGitSource2 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type `json:"type"` + Org string `json:"org"` + Repo string `json:"repo"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSource2) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource2) GetOrg() string { + if o == nil { + return "" + } + return o.Org +} + +func (o *GetDeploymentGitSource2) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *GetDeploymentGitSource2) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSource2) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSource2) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2TypeGithub GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type = "github" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type: %v", v) + } +} + +type GetDeploymentGitSourceDeploymentsRepoIDType string + +const ( + GetDeploymentGitSourceDeploymentsRepoIDTypeStr GetDeploymentGitSourceDeploymentsRepoIDType = "str" + GetDeploymentGitSourceDeploymentsRepoIDTypeNumber GetDeploymentGitSourceDeploymentsRepoIDType = "number" +) + +type GetDeploymentGitSourceDeploymentsRepoID struct { + Str *string + Number *float64 + + Type GetDeploymentGitSourceDeploymentsRepoIDType +} + +func CreateGetDeploymentGitSourceDeploymentsRepoIDStr(str string) GetDeploymentGitSourceDeploymentsRepoID { + typ := GetDeploymentGitSourceDeploymentsRepoIDTypeStr + + return GetDeploymentGitSourceDeploymentsRepoID{ + Str: &str, + Type: typ, + } +} + +func CreateGetDeploymentGitSourceDeploymentsRepoIDNumber(number float64) GetDeploymentGitSourceDeploymentsRepoID { + typ := GetDeploymentGitSourceDeploymentsRepoIDTypeNumber + + return GetDeploymentGitSourceDeploymentsRepoID{ + Number: &number, + Type: typ, + } +} + +func (u *GetDeploymentGitSourceDeploymentsRepoID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetDeploymentGitSourceDeploymentsRepoIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetDeploymentGitSourceDeploymentsRepoIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentGitSourceDeploymentsRepoID", string(data)) +} + +func (u GetDeploymentGitSourceDeploymentsRepoID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentGitSourceDeploymentsRepoID: all fields are null") +} + +type GetDeploymentGitSource1 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type `json:"type"` + RepoID GetDeploymentGitSourceDeploymentsRepoID `json:"repoId"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSource1) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSource1) GetRepoID() GetDeploymentGitSourceDeploymentsRepoID { + if o == nil { + return GetDeploymentGitSourceDeploymentsRepoID{} + } + return o.RepoID +} + +func (o *GetDeploymentGitSource1) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSource1) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSource1) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type ResponseBodyGitSourceType string + +const ( + ResponseBodyGitSourceTypeGetDeploymentGitSource1 ResponseBodyGitSourceType = "getDeployment_gitSource_1" + ResponseBodyGitSourceTypeGetDeploymentGitSource2 ResponseBodyGitSourceType = "getDeployment_gitSource_2" + ResponseBodyGitSourceTypeGetDeploymentGitSource3 ResponseBodyGitSourceType = "getDeployment_gitSource_3" + ResponseBodyGitSourceTypeGetDeploymentGitSource4 ResponseBodyGitSourceType = "getDeployment_gitSource_4" + ResponseBodyGitSourceTypeGetDeploymentGitSource5 ResponseBodyGitSourceType = "getDeployment_gitSource_5" + ResponseBodyGitSourceTypeGetDeploymentGitSource6 ResponseBodyGitSourceType = "getDeployment_gitSource_6" + ResponseBodyGitSourceTypeGetDeploymentGitSource7 ResponseBodyGitSourceType = "getDeployment_gitSource_7" + ResponseBodyGitSourceTypeGetDeploymentGitSource8 ResponseBodyGitSourceType = "getDeployment_gitSource_8" + ResponseBodyGitSourceTypeGetDeploymentGitSource9 ResponseBodyGitSourceType = "getDeployment_gitSource_9" +) + +type ResponseBodyGitSource struct { + GetDeploymentGitSource1 *GetDeploymentGitSource1 + GetDeploymentGitSource2 *GetDeploymentGitSource2 + GetDeploymentGitSource3 *GetDeploymentGitSource3 + GetDeploymentGitSource4 *GetDeploymentGitSource4 + GetDeploymentGitSource5 *GetDeploymentGitSource5 + GetDeploymentGitSource6 *GetDeploymentGitSource6 + GetDeploymentGitSource7 *GetDeploymentGitSource7 + GetDeploymentGitSource8 *GetDeploymentGitSource8 + GetDeploymentGitSource9 *GetDeploymentGitSource9 + + Type ResponseBodyGitSourceType +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource1(getDeploymentGitSource1 GetDeploymentGitSource1) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource1 + + return ResponseBodyGitSource{ + GetDeploymentGitSource1: &getDeploymentGitSource1, + Type: typ, + } +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource2(getDeploymentGitSource2 GetDeploymentGitSource2) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource2 + + return ResponseBodyGitSource{ + GetDeploymentGitSource2: &getDeploymentGitSource2, + Type: typ, + } +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource3(getDeploymentGitSource3 GetDeploymentGitSource3) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource3 + + return ResponseBodyGitSource{ + GetDeploymentGitSource3: &getDeploymentGitSource3, + Type: typ, + } +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource4(getDeploymentGitSource4 GetDeploymentGitSource4) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource4 + + return ResponseBodyGitSource{ + GetDeploymentGitSource4: &getDeploymentGitSource4, + Type: typ, + } +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource5(getDeploymentGitSource5 GetDeploymentGitSource5) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource5 + + return ResponseBodyGitSource{ + GetDeploymentGitSource5: &getDeploymentGitSource5, + Type: typ, + } +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource6(getDeploymentGitSource6 GetDeploymentGitSource6) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource6 + + return ResponseBodyGitSource{ + GetDeploymentGitSource6: &getDeploymentGitSource6, + Type: typ, + } +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource7(getDeploymentGitSource7 GetDeploymentGitSource7) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource7 + + return ResponseBodyGitSource{ + GetDeploymentGitSource7: &getDeploymentGitSource7, + Type: typ, + } +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource8(getDeploymentGitSource8 GetDeploymentGitSource8) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource8 + + return ResponseBodyGitSource{ + GetDeploymentGitSource8: &getDeploymentGitSource8, + Type: typ, + } +} + +func CreateResponseBodyGitSourceGetDeploymentGitSource9(getDeploymentGitSource9 GetDeploymentGitSource9) ResponseBodyGitSource { + typ := ResponseBodyGitSourceTypeGetDeploymentGitSource9 + + return ResponseBodyGitSource{ + GetDeploymentGitSource9: &getDeploymentGitSource9, + Type: typ, + } +} + +func (u *ResponseBodyGitSource) UnmarshalJSON(data []byte) error { + + var getDeploymentGitSource6 GetDeploymentGitSource6 = GetDeploymentGitSource6{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource6, "", true, true); err == nil { + u.GetDeploymentGitSource6 = &getDeploymentGitSource6 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource6 + return nil + } + + var getDeploymentGitSource8 GetDeploymentGitSource8 = GetDeploymentGitSource8{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource8, "", true, true); err == nil { + u.GetDeploymentGitSource8 = &getDeploymentGitSource8 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource8 + return nil + } + + var getDeploymentGitSource1 GetDeploymentGitSource1 = GetDeploymentGitSource1{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource1, "", true, true); err == nil { + u.GetDeploymentGitSource1 = &getDeploymentGitSource1 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource1 + return nil + } + + var getDeploymentGitSource3 GetDeploymentGitSource3 = GetDeploymentGitSource3{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource3, "", true, true); err == nil { + u.GetDeploymentGitSource3 = &getDeploymentGitSource3 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource3 + return nil + } + + var getDeploymentGitSource2 GetDeploymentGitSource2 = GetDeploymentGitSource2{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource2, "", true, true); err == nil { + u.GetDeploymentGitSource2 = &getDeploymentGitSource2 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource2 + return nil + } + + var getDeploymentGitSource4 GetDeploymentGitSource4 = GetDeploymentGitSource4{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource4, "", true, true); err == nil { + u.GetDeploymentGitSource4 = &getDeploymentGitSource4 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource4 + return nil + } + + var getDeploymentGitSource5 GetDeploymentGitSource5 = GetDeploymentGitSource5{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource5, "", true, true); err == nil { + u.GetDeploymentGitSource5 = &getDeploymentGitSource5 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource5 + return nil + } + + var getDeploymentGitSource7 GetDeploymentGitSource7 = GetDeploymentGitSource7{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource7, "", true, true); err == nil { + u.GetDeploymentGitSource7 = &getDeploymentGitSource7 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource7 + return nil + } + + var getDeploymentGitSource9 GetDeploymentGitSource9 = GetDeploymentGitSource9{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSource9, "", true, true); err == nil { + u.GetDeploymentGitSource9 = &getDeploymentGitSource9 + u.Type = ResponseBodyGitSourceTypeGetDeploymentGitSource9 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyGitSource", string(data)) +} + +func (u ResponseBodyGitSource) MarshalJSON() ([]byte, error) { + if u.GetDeploymentGitSource1 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource1, "", true) + } + + if u.GetDeploymentGitSource2 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource2, "", true) + } + + if u.GetDeploymentGitSource3 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource3, "", true) + } + + if u.GetDeploymentGitSource4 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource4, "", true) + } + + if u.GetDeploymentGitSource5 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource5, "", true) + } + + if u.GetDeploymentGitSource6 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource6, "", true) + } + + if u.GetDeploymentGitSource7 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource7, "", true) + } + + if u.GetDeploymentGitSource8 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource8, "", true) + } + + if u.GetDeploymentGitSource9 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSource9, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyGitSource: all fields are null") +} + +type GetDeploymentResponseBodyProject struct { + ID string `json:"id"` + Name string `json:"name"` + Framework *string `json:"framework,omitempty"` +} + +func (o *GetDeploymentResponseBodyProject) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDeploymentResponseBodyProject) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetDeploymentResponseBodyProject) GetFramework() *string { + if o == nil { + return nil + } + return o.Framework +} + +// GetDeploymentResponseBodyReadySubstate - Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic +type GetDeploymentResponseBodyReadySubstate string + +const ( + GetDeploymentResponseBodyReadySubstateStaged GetDeploymentResponseBodyReadySubstate = "STAGED" + GetDeploymentResponseBodyReadySubstatePromoted GetDeploymentResponseBodyReadySubstate = "PROMOTED" +) + +func (e GetDeploymentResponseBodyReadySubstate) ToPointer() *GetDeploymentResponseBodyReadySubstate { + return &e +} +func (e *GetDeploymentResponseBodyReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = GetDeploymentResponseBodyReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyReadySubstate: %v", v) + } +} + +type GetDeploymentResponseBodySource string + +const ( + GetDeploymentResponseBodySourceAPITriggerGitDeploy GetDeploymentResponseBodySource = "api-trigger-git-deploy" + GetDeploymentResponseBodySourceCli GetDeploymentResponseBodySource = "cli" + GetDeploymentResponseBodySourceCloneRepo GetDeploymentResponseBodySource = "clone/repo" + GetDeploymentResponseBodySourceGit GetDeploymentResponseBodySource = "git" + GetDeploymentResponseBodySourceImport GetDeploymentResponseBodySource = "import" + GetDeploymentResponseBodySourceImportRepo GetDeploymentResponseBodySource = "import/repo" + GetDeploymentResponseBodySourceRedeploy GetDeploymentResponseBodySource = "redeploy" + GetDeploymentResponseBodySourceV0Web GetDeploymentResponseBodySource = "v0-web" +) + +func (e GetDeploymentResponseBodySource) ToPointer() *GetDeploymentResponseBodySource { + return &e +} +func (e *GetDeploymentResponseBodySource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "api-trigger-git-deploy": + fallthrough + case "cli": + fallthrough + case "clone/repo": + fallthrough + case "git": + fallthrough + case "import": + fallthrough + case "import/repo": + fallthrough + case "redeploy": + fallthrough + case "v0-web": + *e = GetDeploymentResponseBodySource(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodySource: %v", v) + } +} + +type GetDeploymentResponseBodyTarget string + +const ( + GetDeploymentResponseBodyTargetStaging GetDeploymentResponseBodyTarget = "staging" + GetDeploymentResponseBodyTargetProduction GetDeploymentResponseBodyTarget = "production" +) + +func (e GetDeploymentResponseBodyTarget) ToPointer() *GetDeploymentResponseBodyTarget { + return &e +} +func (e *GetDeploymentResponseBodyTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "staging": + fallthrough + case "production": + *e = GetDeploymentResponseBodyTarget(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyTarget: %v", v) + } +} + +type GetDeploymentResponseBodyOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *GetDeploymentResponseBodyOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +// GetDeploymentResponseBody2 - The deployment including only public information +type GetDeploymentResponseBody2 struct { + Alias []string `json:"alias,omitempty"` + AliasAssigned bool `json:"aliasAssigned"` + BootedAt float64 `json:"bootedAt"` + BuildingAt float64 `json:"buildingAt"` + BuildSkipped bool `json:"buildSkipped"` + Creator GetDeploymentResponseBodyCreator `json:"creator"` + InitReadyAt *float64 `json:"initReadyAt,omitempty"` + IsFirstBranchDeployment *bool `json:"isFirstBranchDeployment,omitempty"` + Lambdas []ResponseBodyLambdas `json:"lambdas,omitempty"` + Public bool `json:"public"` + Ready *float64 `json:"ready,omitempty"` + Status GetDeploymentResponseBodyStatus `json:"status"` + Team *ResponseBodyTeam `json:"team,omitempty"` + UserAliases []string `json:"userAliases,omitempty"` + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + TtyBuildLogs *bool `json:"ttyBuildLogs,omitempty"` + CustomEnvironment *ResponseBodyCustomEnvironment `json:"customEnvironment,omitempty"` + AliasWarning *ResponseBodyAliasWarning `json:"aliasWarning,omitempty"` + ID string `json:"id"` + Type GetDeploymentResponseBodyType `json:"type"` + CreatedAt float64 `json:"createdAt"` + Name string `json:"name"` + ReadyState GetDeploymentResponseBodyReadyState `json:"readyState"` + AliasError *GetDeploymentResponseBodyAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + // applies to custom domains only, defaults to `true` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BuildErrorAt *float64 `json:"buildErrorAt,omitempty"` + ChecksState *GetDeploymentResponseBodyChecksState `json:"checksState,omitempty"` + ChecksConclusion *GetDeploymentResponseBodyChecksConclusion `json:"checksConclusion,omitempty"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + // Computed field that is only available for deployments with a microfrontend configuration. + DefaultRoute *string `json:"defaultRoute,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorLink *string `json:"errorLink,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ErrorStep *string `json:"errorStep,omitempty"` + // Since November 2023 this field defines a set of regions that we will deploy the lambda to passively Lambdas will be deployed to these regions but only invoked if all of the primary `regions` are marked as out of service + PassiveRegions []string `json:"passiveRegions,omitempty"` + GitSource *ResponseBodyGitSource `json:"gitSource,omitempty"` + Meta map[string]string `json:"meta"` + OriginCacheRegion *string `json:"originCacheRegion,omitempty"` + Project *GetDeploymentResponseBodyProject `json:"project,omitempty"` + // Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic + ReadySubstate *GetDeploymentResponseBodyReadySubstate `json:"readySubstate,omitempty"` + Regions []string `json:"regions"` + SoftDeletedByRetention *bool `json:"softDeletedByRetention,omitempty"` + Source *GetDeploymentResponseBodySource `json:"source,omitempty"` + Target *GetDeploymentResponseBodyTarget `json:"target,omitempty"` + UndeletedAt *float64 `json:"undeletedAt,omitempty"` + URL string `json:"url"` + Version float64 `json:"version"` + OidcTokenClaims *GetDeploymentResponseBodyOidcTokenClaims `json:"oidcTokenClaims,omitempty"` +} + +func (o *GetDeploymentResponseBody2) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *GetDeploymentResponseBody2) GetAliasAssigned() bool { + if o == nil { + return false + } + return o.AliasAssigned +} + +func (o *GetDeploymentResponseBody2) GetBootedAt() float64 { + if o == nil { + return 0.0 + } + return o.BootedAt +} + +func (o *GetDeploymentResponseBody2) GetBuildingAt() float64 { + if o == nil { + return 0.0 + } + return o.BuildingAt +} + +func (o *GetDeploymentResponseBody2) GetBuildSkipped() bool { + if o == nil { + return false + } + return o.BuildSkipped +} + +func (o *GetDeploymentResponseBody2) GetCreator() GetDeploymentResponseBodyCreator { + if o == nil { + return GetDeploymentResponseBodyCreator{} + } + return o.Creator +} + +func (o *GetDeploymentResponseBody2) GetInitReadyAt() *float64 { + if o == nil { + return nil + } + return o.InitReadyAt +} + +func (o *GetDeploymentResponseBody2) GetIsFirstBranchDeployment() *bool { + if o == nil { + return nil + } + return o.IsFirstBranchDeployment +} + +func (o *GetDeploymentResponseBody2) GetLambdas() []ResponseBodyLambdas { + if o == nil { + return nil + } + return o.Lambdas +} + +func (o *GetDeploymentResponseBody2) GetPublic() bool { + if o == nil { + return false + } + return o.Public +} + +func (o *GetDeploymentResponseBody2) GetReady() *float64 { + if o == nil { + return nil + } + return o.Ready +} + +func (o *GetDeploymentResponseBody2) GetStatus() GetDeploymentResponseBodyStatus { + if o == nil { + return GetDeploymentResponseBodyStatus("") + } + return o.Status +} + +func (o *GetDeploymentResponseBody2) GetTeam() *ResponseBodyTeam { + if o == nil { + return nil + } + return o.Team +} + +func (o *GetDeploymentResponseBody2) GetUserAliases() []string { + if o == nil { + return nil + } + return o.UserAliases +} + +func (o *GetDeploymentResponseBody2) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *GetDeploymentResponseBody2) GetTtyBuildLogs() *bool { + if o == nil { + return nil + } + return o.TtyBuildLogs +} + +func (o *GetDeploymentResponseBody2) GetCustomEnvironment() *ResponseBodyCustomEnvironment { + if o == nil { + return nil + } + return o.CustomEnvironment +} + +func (o *GetDeploymentResponseBody2) GetAliasWarning() *ResponseBodyAliasWarning { + if o == nil { + return nil + } + return o.AliasWarning +} + +func (o *GetDeploymentResponseBody2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDeploymentResponseBody2) GetType() GetDeploymentResponseBodyType { + if o == nil { + return GetDeploymentResponseBodyType("") + } + return o.Type +} + +func (o *GetDeploymentResponseBody2) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetDeploymentResponseBody2) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetDeploymentResponseBody2) GetReadyState() GetDeploymentResponseBodyReadyState { + if o == nil { + return GetDeploymentResponseBodyReadyState("") + } + return o.ReadyState +} + +func (o *GetDeploymentResponseBody2) GetAliasError() *GetDeploymentResponseBodyAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *GetDeploymentResponseBody2) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *GetDeploymentResponseBody2) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *GetDeploymentResponseBody2) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *GetDeploymentResponseBody2) GetBuildErrorAt() *float64 { + if o == nil { + return nil + } + return o.BuildErrorAt +} + +func (o *GetDeploymentResponseBody2) GetChecksState() *GetDeploymentResponseBodyChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *GetDeploymentResponseBody2) GetChecksConclusion() *GetDeploymentResponseBodyChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *GetDeploymentResponseBody2) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetDeploymentResponseBody2) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *GetDeploymentResponseBody2) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *GetDeploymentResponseBody2) GetErrorCode() *string { + if o == nil { + return nil + } + return o.ErrorCode +} + +func (o *GetDeploymentResponseBody2) GetErrorLink() *string { + if o == nil { + return nil + } + return o.ErrorLink +} + +func (o *GetDeploymentResponseBody2) GetErrorMessage() *string { + if o == nil { + return nil + } + return o.ErrorMessage +} + +func (o *GetDeploymentResponseBody2) GetErrorStep() *string { + if o == nil { + return nil + } + return o.ErrorStep +} + +func (o *GetDeploymentResponseBody2) GetPassiveRegions() []string { + if o == nil { + return nil + } + return o.PassiveRegions +} + +func (o *GetDeploymentResponseBody2) GetGitSource() *ResponseBodyGitSource { + if o == nil { + return nil + } + return o.GitSource +} + +func (o *GetDeploymentResponseBody2) GetMeta() map[string]string { + if o == nil { + return map[string]string{} + } + return o.Meta +} + +func (o *GetDeploymentResponseBody2) GetOriginCacheRegion() *string { + if o == nil { + return nil + } + return o.OriginCacheRegion +} + +func (o *GetDeploymentResponseBody2) GetProject() *GetDeploymentResponseBodyProject { + if o == nil { + return nil + } + return o.Project +} + +func (o *GetDeploymentResponseBody2) GetReadySubstate() *GetDeploymentResponseBodyReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *GetDeploymentResponseBody2) GetRegions() []string { + if o == nil { + return []string{} + } + return o.Regions +} + +func (o *GetDeploymentResponseBody2) GetSoftDeletedByRetention() *bool { + if o == nil { + return nil + } + return o.SoftDeletedByRetention +} + +func (o *GetDeploymentResponseBody2) GetSource() *GetDeploymentResponseBodySource { + if o == nil { + return nil + } + return o.Source +} + +func (o *GetDeploymentResponseBody2) GetTarget() *GetDeploymentResponseBodyTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetDeploymentResponseBody2) GetUndeletedAt() *float64 { + if o == nil { + return nil + } + return o.UndeletedAt +} + +func (o *GetDeploymentResponseBody2) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetDeploymentResponseBody2) GetVersion() float64 { + if o == nil { + return 0.0 + } + return o.Version +} + +func (o *GetDeploymentResponseBody2) GetOidcTokenClaims() *GetDeploymentResponseBodyOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +type ResponseBodyAliasAssignedAtType string + +const ( + ResponseBodyAliasAssignedAtTypeNumber ResponseBodyAliasAssignedAtType = "number" + ResponseBodyAliasAssignedAtTypeBoolean ResponseBodyAliasAssignedAtType = "boolean" +) + +type ResponseBodyAliasAssignedAt struct { + Number *float64 + Boolean *bool + + Type ResponseBodyAliasAssignedAtType +} + +func CreateResponseBodyAliasAssignedAtNumber(number float64) ResponseBodyAliasAssignedAt { + typ := ResponseBodyAliasAssignedAtTypeNumber + + return ResponseBodyAliasAssignedAt{ + Number: &number, + Type: typ, + } +} + +func CreateResponseBodyAliasAssignedAtBoolean(boolean bool) ResponseBodyAliasAssignedAt { + typ := ResponseBodyAliasAssignedAtTypeBoolean + + return ResponseBodyAliasAssignedAt{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *ResponseBodyAliasAssignedAt) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = ResponseBodyAliasAssignedAtTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = ResponseBodyAliasAssignedAtTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyAliasAssignedAt", string(data)) +} + +func (u ResponseBodyAliasAssignedAt) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyAliasAssignedAt: all fields are null") +} + +type ResponseBodyBuild struct { + Env []string `json:"env"` +} + +func (o *ResponseBodyBuild) GetEnv() []string { + if o == nil { + return []string{} + } + return o.Env +} + +type ResponseBodyBuilds struct { +} + +type ResponseBodyFramework string + +const ( + ResponseBodyFrameworkBlitzjs ResponseBodyFramework = "blitzjs" + ResponseBodyFrameworkNextjs ResponseBodyFramework = "nextjs" + ResponseBodyFrameworkGatsby ResponseBodyFramework = "gatsby" + ResponseBodyFrameworkRemix ResponseBodyFramework = "remix" + ResponseBodyFrameworkAstro ResponseBodyFramework = "astro" + ResponseBodyFrameworkHexo ResponseBodyFramework = "hexo" + ResponseBodyFrameworkEleventy ResponseBodyFramework = "eleventy" + ResponseBodyFrameworkDocusaurus2 ResponseBodyFramework = "docusaurus-2" + ResponseBodyFrameworkDocusaurus ResponseBodyFramework = "docusaurus" + ResponseBodyFrameworkPreact ResponseBodyFramework = "preact" + ResponseBodyFrameworkSolidstart1 ResponseBodyFramework = "solidstart-1" + ResponseBodyFrameworkSolidstart ResponseBodyFramework = "solidstart" + ResponseBodyFrameworkDojo ResponseBodyFramework = "dojo" + ResponseBodyFrameworkEmber ResponseBodyFramework = "ember" + ResponseBodyFrameworkVue ResponseBodyFramework = "vue" + ResponseBodyFrameworkScully ResponseBodyFramework = "scully" + ResponseBodyFrameworkIonicAngular ResponseBodyFramework = "ionic-angular" + ResponseBodyFrameworkAngular ResponseBodyFramework = "angular" + ResponseBodyFrameworkPolymer ResponseBodyFramework = "polymer" + ResponseBodyFrameworkSvelte ResponseBodyFramework = "svelte" + ResponseBodyFrameworkSveltekit ResponseBodyFramework = "sveltekit" + ResponseBodyFrameworkSveltekit1 ResponseBodyFramework = "sveltekit-1" + ResponseBodyFrameworkIonicReact ResponseBodyFramework = "ionic-react" + ResponseBodyFrameworkCreateReactApp ResponseBodyFramework = "create-react-app" + ResponseBodyFrameworkGridsome ResponseBodyFramework = "gridsome" + ResponseBodyFrameworkUmijs ResponseBodyFramework = "umijs" + ResponseBodyFrameworkSapper ResponseBodyFramework = "sapper" + ResponseBodyFrameworkSaber ResponseBodyFramework = "saber" + ResponseBodyFrameworkStencil ResponseBodyFramework = "stencil" + ResponseBodyFrameworkNuxtjs ResponseBodyFramework = "nuxtjs" + ResponseBodyFrameworkRedwoodjs ResponseBodyFramework = "redwoodjs" + ResponseBodyFrameworkHugo ResponseBodyFramework = "hugo" + ResponseBodyFrameworkJekyll ResponseBodyFramework = "jekyll" + ResponseBodyFrameworkBrunch ResponseBodyFramework = "brunch" + ResponseBodyFrameworkMiddleman ResponseBodyFramework = "middleman" + ResponseBodyFrameworkZola ResponseBodyFramework = "zola" + ResponseBodyFrameworkHydrogen ResponseBodyFramework = "hydrogen" + ResponseBodyFrameworkVite ResponseBodyFramework = "vite" + ResponseBodyFrameworkVitepress ResponseBodyFramework = "vitepress" + ResponseBodyFrameworkVuepress ResponseBodyFramework = "vuepress" + ResponseBodyFrameworkParcel ResponseBodyFramework = "parcel" + ResponseBodyFrameworkFasthtml ResponseBodyFramework = "fasthtml" + ResponseBodyFrameworkSanityV3 ResponseBodyFramework = "sanity-v3" + ResponseBodyFrameworkSanity ResponseBodyFramework = "sanity" + ResponseBodyFrameworkStorybook ResponseBodyFramework = "storybook" +) + +func (e ResponseBodyFramework) ToPointer() *ResponseBodyFramework { + return &e +} +func (e *ResponseBodyFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = ResponseBodyFramework(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyFramework: %v", v) + } +} + +type ResponseBodySpeedInsights struct { + ID string `json:"id"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` + PaidAt *float64 `json:"paidAt,omitempty"` +} + +func (o *ResponseBodySpeedInsights) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ResponseBodySpeedInsights) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *ResponseBodySpeedInsights) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *ResponseBodySpeedInsights) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *ResponseBodySpeedInsights) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +func (o *ResponseBodySpeedInsights) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +type ResponseBodyWebAnalytics struct { + ID string `json:"id"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` +} + +func (o *ResponseBodyWebAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ResponseBodyWebAnalytics) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *ResponseBodyWebAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *ResponseBodyWebAnalytics) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *ResponseBodyWebAnalytics) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +type ResponseBodyProjectSettings struct { + BuildCommand *string `json:"buildCommand,omitempty"` + DevCommand *string `json:"devCommand,omitempty"` + Framework *ResponseBodyFramework `json:"framework,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + InstallCommand *string `json:"installCommand,omitempty"` + OutputDirectory *string `json:"outputDirectory,omitempty"` + SpeedInsights *ResponseBodySpeedInsights `json:"speedInsights,omitempty"` + WebAnalytics *ResponseBodyWebAnalytics `json:"webAnalytics,omitempty"` +} + +func (o *ResponseBodyProjectSettings) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *ResponseBodyProjectSettings) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *ResponseBodyProjectSettings) GetFramework() *ResponseBodyFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *ResponseBodyProjectSettings) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *ResponseBodyProjectSettings) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *ResponseBodyProjectSettings) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *ResponseBodyProjectSettings) GetSpeedInsights() *ResponseBodySpeedInsights { + if o == nil { + return nil + } + return o.SpeedInsights +} + +func (o *ResponseBodyProjectSettings) GetWebAnalytics() *ResponseBodyWebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +type GetDeploymentResponseBodyDeploymentsStatus string + +const ( + GetDeploymentResponseBodyDeploymentsStatusError GetDeploymentResponseBodyDeploymentsStatus = "error" + GetDeploymentResponseBodyDeploymentsStatusSkipped GetDeploymentResponseBodyDeploymentsStatus = "skipped" + GetDeploymentResponseBodyDeploymentsStatusPending GetDeploymentResponseBodyDeploymentsStatus = "pending" + GetDeploymentResponseBodyDeploymentsStatusReady GetDeploymentResponseBodyDeploymentsStatus = "ready" + GetDeploymentResponseBodyDeploymentsStatusTimeout GetDeploymentResponseBodyDeploymentsStatus = "timeout" +) + +func (e GetDeploymentResponseBodyDeploymentsStatus) ToPointer() *GetDeploymentResponseBodyDeploymentsStatus { + return &e +} +func (e *GetDeploymentResponseBodyDeploymentsStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "error": + fallthrough + case "skipped": + fallthrough + case "pending": + fallthrough + case "ready": + fallthrough + case "timeout": + *e = GetDeploymentResponseBodyDeploymentsStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyDeploymentsStatus: %v", v) + } +} + +type ResponseBodyIntegrations struct { + Status GetDeploymentResponseBodyDeploymentsStatus `json:"status"` + StartedAt float64 `json:"startedAt"` + CompletedAt *float64 `json:"completedAt,omitempty"` + SkippedAt *float64 `json:"skippedAt,omitempty"` + SkippedBy *string `json:"skippedBy,omitempty"` +} + +func (o *ResponseBodyIntegrations) GetStatus() GetDeploymentResponseBodyDeploymentsStatus { + if o == nil { + return GetDeploymentResponseBodyDeploymentsStatus("") + } + return o.Status +} + +func (o *ResponseBodyIntegrations) GetStartedAt() float64 { + if o == nil { + return 0.0 + } + return o.StartedAt +} + +func (o *ResponseBodyIntegrations) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *ResponseBodyIntegrations) GetSkippedAt() *float64 { + if o == nil { + return nil + } + return o.SkippedAt +} + +func (o *ResponseBodyIntegrations) GetSkippedBy() *string { + if o == nil { + return nil + } + return o.SkippedBy +} + +// ResponseBodyProtocol - Must be `http` or `https`. +type ResponseBodyProtocol string + +const ( + ResponseBodyProtocolHTTP ResponseBodyProtocol = "http" + ResponseBodyProtocolHTTPS ResponseBodyProtocol = "https" +) + +func (e ResponseBodyProtocol) ToPointer() *ResponseBodyProtocol { + return &e +} +func (e *ResponseBodyProtocol) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "http": + fallthrough + case "https": + *e = ResponseBodyProtocol(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyProtocol: %v", v) + } +} + +type ResponseBodyRemotePatterns struct { + // Must be `http` or `https`. + Protocol *ResponseBodyProtocol `json:"protocol,omitempty"` + // Can be literal or wildcard. Single `*` matches a single subdomain. Double `**` matches any number of subdomains. + Hostname string `json:"hostname"` + // Can be literal port such as `8080` or empty string meaning no port. + Port *string `json:"port,omitempty"` + // Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments. + Pathname *string `json:"pathname,omitempty"` + // Can be literal query string such as `?v=1` or empty string meaning no query string. + Search *string `json:"search,omitempty"` +} + +func (o *ResponseBodyRemotePatterns) GetProtocol() *ResponseBodyProtocol { + if o == nil { + return nil + } + return o.Protocol +} + +func (o *ResponseBodyRemotePatterns) GetHostname() string { + if o == nil { + return "" + } + return o.Hostname +} + +func (o *ResponseBodyRemotePatterns) GetPort() *string { + if o == nil { + return nil + } + return o.Port +} + +func (o *ResponseBodyRemotePatterns) GetPathname() *string { + if o == nil { + return nil + } + return o.Pathname +} + +func (o *ResponseBodyRemotePatterns) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +type ResponseBodyLocalPatterns struct { + // Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments. + Pathname *string `json:"pathname,omitempty"` + // Can be literal query string such as `?v=1` or empty string meaning no query string. + Search *string `json:"search,omitempty"` +} + +func (o *ResponseBodyLocalPatterns) GetPathname() *string { + if o == nil { + return nil + } + return o.Pathname +} + +func (o *ResponseBodyLocalPatterns) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +type ResponseBodyFormats string + +const ( + ResponseBodyFormatsImageAvif ResponseBodyFormats = "image/avif" + ResponseBodyFormatsImageWebp ResponseBodyFormats = "image/webp" +) + +func (e ResponseBodyFormats) ToPointer() *ResponseBodyFormats { + return &e +} +func (e *ResponseBodyFormats) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "image/avif": + fallthrough + case "image/webp": + *e = ResponseBodyFormats(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyFormats: %v", v) + } +} + +type ResponseBodyContentDispositionType string + +const ( + ResponseBodyContentDispositionTypeInline ResponseBodyContentDispositionType = "inline" + ResponseBodyContentDispositionTypeAttachment ResponseBodyContentDispositionType = "attachment" +) + +func (e ResponseBodyContentDispositionType) ToPointer() *ResponseBodyContentDispositionType { + return &e +} +func (e *ResponseBodyContentDispositionType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "inline": + fallthrough + case "attachment": + *e = ResponseBodyContentDispositionType(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyContentDispositionType: %v", v) + } +} + +type ResponseBodyImages struct { + Sizes []float64 `json:"sizes,omitempty"` + Qualities []float64 `json:"qualities,omitempty"` + Domains []string `json:"domains,omitempty"` + RemotePatterns []ResponseBodyRemotePatterns `json:"remotePatterns,omitempty"` + LocalPatterns []ResponseBodyLocalPatterns `json:"localPatterns,omitempty"` + MinimumCacheTTL *float64 `json:"minimumCacheTTL,omitempty"` + Formats []ResponseBodyFormats `json:"formats,omitempty"` + DangerouslyAllowSVG *bool `json:"dangerouslyAllowSVG,omitempty"` + ContentSecurityPolicy *string `json:"contentSecurityPolicy,omitempty"` + ContentDispositionType *ResponseBodyContentDispositionType `json:"contentDispositionType,omitempty"` +} + +func (o *ResponseBodyImages) GetSizes() []float64 { + if o == nil { + return nil + } + return o.Sizes +} + +func (o *ResponseBodyImages) GetQualities() []float64 { + if o == nil { + return nil + } + return o.Qualities +} + +func (o *ResponseBodyImages) GetDomains() []string { + if o == nil { + return nil + } + return o.Domains +} + +func (o *ResponseBodyImages) GetRemotePatterns() []ResponseBodyRemotePatterns { + if o == nil { + return nil + } + return o.RemotePatterns +} + +func (o *ResponseBodyImages) GetLocalPatterns() []ResponseBodyLocalPatterns { + if o == nil { + return nil + } + return o.LocalPatterns +} + +func (o *ResponseBodyImages) GetMinimumCacheTTL() *float64 { + if o == nil { + return nil + } + return o.MinimumCacheTTL +} + +func (o *ResponseBodyImages) GetFormats() []ResponseBodyFormats { + if o == nil { + return nil + } + return o.Formats +} + +func (o *ResponseBodyImages) GetDangerouslyAllowSVG() *bool { + if o == nil { + return nil + } + return o.DangerouslyAllowSVG +} + +func (o *ResponseBodyImages) GetContentSecurityPolicy() *string { + if o == nil { + return nil + } + return o.ContentSecurityPolicy +} + +func (o *ResponseBodyImages) GetContentDispositionType() *ResponseBodyContentDispositionType { + if o == nil { + return nil + } + return o.ContentDispositionType +} + +type ResponseBodyCreator struct { + UID string `json:"uid"` + Username *string `json:"username,omitempty"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *ResponseBodyCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *ResponseBodyCreator) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +func (o *ResponseBodyCreator) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +type GetDeploymentResponseBodyDeploymentsResponseReadyState string + +const ( + GetDeploymentResponseBodyDeploymentsResponseReadyStateBuilding GetDeploymentResponseBodyDeploymentsResponseReadyState = "BUILDING" + GetDeploymentResponseBodyDeploymentsResponseReadyStateError GetDeploymentResponseBodyDeploymentsResponseReadyState = "ERROR" + GetDeploymentResponseBodyDeploymentsResponseReadyStateInitializing GetDeploymentResponseBodyDeploymentsResponseReadyState = "INITIALIZING" + GetDeploymentResponseBodyDeploymentsResponseReadyStateReady GetDeploymentResponseBodyDeploymentsResponseReadyState = "READY" +) + +func (e GetDeploymentResponseBodyDeploymentsResponseReadyState) ToPointer() *GetDeploymentResponseBodyDeploymentsResponseReadyState { + return &e +} +func (e *GetDeploymentResponseBodyDeploymentsResponseReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + *e = GetDeploymentResponseBodyDeploymentsResponseReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentResponseBodyDeploymentsResponseReadyState: %v", v) + } +} + +type ResponseBodyOutput struct { + Path string `json:"path"` + FunctionName string `json:"functionName"` +} + +func (o *ResponseBodyOutput) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *ResponseBodyOutput) GetFunctionName() string { + if o == nil { + return "" + } + return o.FunctionName +} + +// GetDeploymentResponseBodyLambdas - A partial representation of a Build used by the deployment endpoint. +type GetDeploymentResponseBodyLambdas struct { + ID *string `json:"id,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + Entrypoint *string `json:"entrypoint,omitempty"` + ReadyState *GetDeploymentResponseBodyDeploymentsResponseReadyState `json:"readyState,omitempty"` + ReadyStateAt *float64 `json:"readyStateAt,omitempty"` + Output []ResponseBodyOutput `json:"output"` +} + +func (o *GetDeploymentResponseBodyLambdas) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetDeploymentResponseBodyLambdas) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetDeploymentResponseBodyLambdas) GetEntrypoint() *string { + if o == nil { + return nil + } + return o.Entrypoint +} + +func (o *GetDeploymentResponseBodyLambdas) GetReadyState() *GetDeploymentResponseBodyDeploymentsResponseReadyState { + if o == nil { + return nil + } + return o.ReadyState +} + +func (o *GetDeploymentResponseBodyLambdas) GetReadyStateAt() *float64 { + if o == nil { + return nil + } + return o.ReadyStateAt +} + +func (o *GetDeploymentResponseBodyLambdas) GetOutput() []ResponseBodyOutput { + if o == nil { + return []ResponseBodyOutput{} + } + return o.Output +} + +type ResponseBodyStatus string + +const ( + ResponseBodyStatusQueued ResponseBodyStatus = "QUEUED" + ResponseBodyStatusBuilding ResponseBodyStatus = "BUILDING" + ResponseBodyStatusError ResponseBodyStatus = "ERROR" + ResponseBodyStatusInitializing ResponseBodyStatus = "INITIALIZING" + ResponseBodyStatusReady ResponseBodyStatus = "READY" + ResponseBodyStatusCanceled ResponseBodyStatus = "CANCELED" +) + +func (e ResponseBodyStatus) ToPointer() *ResponseBodyStatus { + return &e +} +func (e *ResponseBodyStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "QUEUED": + fallthrough + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = ResponseBodyStatus(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyStatus: %v", v) + } +} + +type GetDeploymentResponseBodyTeam struct { + ID string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *GetDeploymentResponseBodyTeam) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDeploymentResponseBodyTeam) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetDeploymentResponseBodyTeam) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GetDeploymentResponseBodyTeam) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +type GetDeploymentCustomEnvironmentDeployments2 struct { + ID string `json:"id"` +} + +func (o *GetDeploymentCustomEnvironmentDeployments2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type GetDeploymentCustomEnvironmentDeployments1 struct { +} + +type GetDeploymentResponseBodyCustomEnvironmentType string + +const ( + GetDeploymentResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironmentDeployments1 GetDeploymentResponseBodyCustomEnvironmentType = "getDeployment_customEnvironment_deployments_1" + GetDeploymentResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironmentDeployments2 GetDeploymentResponseBodyCustomEnvironmentType = "getDeployment_customEnvironment_deployments_2" +) + +type GetDeploymentResponseBodyCustomEnvironment struct { + GetDeploymentCustomEnvironmentDeployments1 *GetDeploymentCustomEnvironmentDeployments1 + GetDeploymentCustomEnvironmentDeployments2 *GetDeploymentCustomEnvironmentDeployments2 + + Type GetDeploymentResponseBodyCustomEnvironmentType +} + +func CreateGetDeploymentResponseBodyCustomEnvironmentGetDeploymentCustomEnvironmentDeployments1(getDeploymentCustomEnvironmentDeployments1 GetDeploymentCustomEnvironmentDeployments1) GetDeploymentResponseBodyCustomEnvironment { + typ := GetDeploymentResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironmentDeployments1 + + return GetDeploymentResponseBodyCustomEnvironment{ + GetDeploymentCustomEnvironmentDeployments1: &getDeploymentCustomEnvironmentDeployments1, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyCustomEnvironmentGetDeploymentCustomEnvironmentDeployments2(getDeploymentCustomEnvironmentDeployments2 GetDeploymentCustomEnvironmentDeployments2) GetDeploymentResponseBodyCustomEnvironment { + typ := GetDeploymentResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironmentDeployments2 + + return GetDeploymentResponseBodyCustomEnvironment{ + GetDeploymentCustomEnvironmentDeployments2: &getDeploymentCustomEnvironmentDeployments2, + Type: typ, + } +} + +func (u *GetDeploymentResponseBodyCustomEnvironment) UnmarshalJSON(data []byte) error { + + var getDeploymentCustomEnvironmentDeployments1 GetDeploymentCustomEnvironmentDeployments1 = GetDeploymentCustomEnvironmentDeployments1{} + if err := utils.UnmarshalJSON(data, &getDeploymentCustomEnvironmentDeployments1, "", true, true); err == nil { + u.GetDeploymentCustomEnvironmentDeployments1 = &getDeploymentCustomEnvironmentDeployments1 + u.Type = GetDeploymentResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironmentDeployments1 + return nil + } + + var getDeploymentCustomEnvironmentDeployments2 GetDeploymentCustomEnvironmentDeployments2 = GetDeploymentCustomEnvironmentDeployments2{} + if err := utils.UnmarshalJSON(data, &getDeploymentCustomEnvironmentDeployments2, "", true, true); err == nil { + u.GetDeploymentCustomEnvironmentDeployments2 = &getDeploymentCustomEnvironmentDeployments2 + u.Type = GetDeploymentResponseBodyCustomEnvironmentTypeGetDeploymentCustomEnvironmentDeployments2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentResponseBodyCustomEnvironment", string(data)) +} + +func (u GetDeploymentResponseBodyCustomEnvironment) MarshalJSON() ([]byte, error) { + if u.GetDeploymentCustomEnvironmentDeployments1 != nil { + return utils.MarshalJSON(u.GetDeploymentCustomEnvironmentDeployments1, "", true) + } + + if u.GetDeploymentCustomEnvironmentDeployments2 != nil { + return utils.MarshalJSON(u.GetDeploymentCustomEnvironmentDeployments2, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentResponseBodyCustomEnvironment: all fields are null") +} + +type GetDeploymentResponseBodyAliasWarning struct { + Code string `json:"code"` + Message string `json:"message"` + Link *string `json:"link,omitempty"` + Action *string `json:"action,omitempty"` +} + +func (o *GetDeploymentResponseBodyAliasWarning) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *GetDeploymentResponseBodyAliasWarning) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +func (o *GetDeploymentResponseBodyAliasWarning) GetLink() *string { + if o == nil { + return nil + } + return o.Link +} + +func (o *GetDeploymentResponseBodyAliasWarning) GetAction() *string { + if o == nil { + return nil + } + return o.Action +} + +type ResponseBodyType string + +const ( + ResponseBodyTypeLambdas ResponseBodyType = "LAMBDAS" +) + +func (e ResponseBodyType) ToPointer() *ResponseBodyType { + return &e +} +func (e *ResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = ResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyType: %v", v) + } +} + +type ResponseBodyReadyState string + +const ( + ResponseBodyReadyStateQueued ResponseBodyReadyState = "QUEUED" + ResponseBodyReadyStateBuilding ResponseBodyReadyState = "BUILDING" + ResponseBodyReadyStateError ResponseBodyReadyState = "ERROR" + ResponseBodyReadyStateInitializing ResponseBodyReadyState = "INITIALIZING" + ResponseBodyReadyStateReady ResponseBodyReadyState = "READY" + ResponseBodyReadyStateCanceled ResponseBodyReadyState = "CANCELED" +) + +func (e ResponseBodyReadyState) ToPointer() *ResponseBodyReadyState { + return &e +} +func (e *ResponseBodyReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "QUEUED": + fallthrough + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = ResponseBodyReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyReadyState: %v", v) + } +} + +type ResponseBodyAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *ResponseBodyAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *ResponseBodyAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type ResponseBodyChecksState string + +const ( + ResponseBodyChecksStateRegistered ResponseBodyChecksState = "registered" + ResponseBodyChecksStateRunning ResponseBodyChecksState = "running" + ResponseBodyChecksStateCompleted ResponseBodyChecksState = "completed" +) + +func (e ResponseBodyChecksState) ToPointer() *ResponseBodyChecksState { + return &e +} +func (e *ResponseBodyChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = ResponseBodyChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyChecksState: %v", v) + } +} + +type ResponseBodyChecksConclusion string + +const ( + ResponseBodyChecksConclusionSucceeded ResponseBodyChecksConclusion = "succeeded" + ResponseBodyChecksConclusionFailed ResponseBodyChecksConclusion = "failed" + ResponseBodyChecksConclusionSkipped ResponseBodyChecksConclusion = "skipped" + ResponseBodyChecksConclusionCanceled ResponseBodyChecksConclusion = "canceled" +) + +func (e ResponseBodyChecksConclusion) ToPointer() *ResponseBodyChecksConclusion { + return &e +} +func (e *ResponseBodyChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = ResponseBodyChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyChecksConclusion: %v", v) + } +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19TypeBitbucket GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type = "bitbucket" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type: %v", v) + } +} + +type GetDeploymentGitSourceDeployments9 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + Owner *string `json:"owner,omitempty"` + Slug *string `json:"slug,omitempty"` + WorkspaceUUID string `json:"workspaceUuid"` + RepoUUID string `json:"repoUuid"` +} + +func (o *GetDeploymentGitSourceDeployments9) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments9) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments9) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments9) GetOwner() *string { + if o == nil { + return nil + } + return o.Owner +} + +func (o *GetDeploymentGitSourceDeployments9) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetDeploymentGitSourceDeployments9) GetWorkspaceUUID() string { + if o == nil { + return "" + } + return o.WorkspaceUUID +} + +func (o *GetDeploymentGitSourceDeployments9) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1TypeGitlab GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type = "gitlab" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type: %v", v) + } +} + +type GetDeploymentGitSourceDeployments8 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + ProjectID float64 `json:"projectId"` +} + +func (o *GetDeploymentGitSourceDeployments8) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments8) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments8) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments8) GetProjectID() float64 { + if o == nil { + return 0.0 + } + return o.ProjectID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyTypeGithub GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType = "github" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type GetDeploymentGitSourceDeployments7 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + RepoID float64 `json:"repoId"` + Org *string `json:"org,omitempty"` + Repo *string `json:"repo,omitempty"` +} + +func (o *GetDeploymentGitSourceDeployments7) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments7) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments7) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments7) GetRepoID() float64 { + if o == nil { + return 0.0 + } + return o.RepoID +} + +func (o *GetDeploymentGitSourceDeployments7) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} + +func (o *GetDeploymentGitSourceDeployments7) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONTypeCustom GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType = "custom" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "custom": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType: %v", v) + } +} + +// GetDeploymentGitSourceDeployments6 - Allows custom git sources (local folder mounted to the container) in test mode +type GetDeploymentGitSourceDeployments6 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType `json:"type"` + Ref string `json:"ref"` + Sha string `json:"sha"` + GitURL string `json:"gitUrl"` +} + +func (o *GetDeploymentGitSourceDeployments6) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments6) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments6) GetSha() string { + if o == nil { + return "" + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments6) GetGitURL() string { + if o == nil { + return "" + } + return o.GitURL +} + +type GetDeploymentGitSourceDeploymentsResponse200Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200TypeBitbucket GetDeploymentGitSourceDeploymentsResponse200Type = "bitbucket" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = GetDeploymentGitSourceDeploymentsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200Type: %v", v) + } +} + +type GetDeploymentGitSourceDeployments5 struct { + Type GetDeploymentGitSourceDeploymentsResponse200Type `json:"type"` + Owner string `json:"owner"` + Slug string `json:"slug"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSourceDeployments5) GetType() GetDeploymentGitSourceDeploymentsResponse200Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments5) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *GetDeploymentGitSourceDeployments5) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GetDeploymentGitSourceDeployments5) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments5) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments5) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentGitSourceDeploymentsResponseType string + +const ( + GetDeploymentGitSourceDeploymentsResponseTypeBitbucket GetDeploymentGitSourceDeploymentsResponseType = "bitbucket" +) + +func (e GetDeploymentGitSourceDeploymentsResponseType) ToPointer() *GetDeploymentGitSourceDeploymentsResponseType { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = GetDeploymentGitSourceDeploymentsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponseType: %v", v) + } +} + +type GetDeploymentGitSourceDeployments4 struct { + Type GetDeploymentGitSourceDeploymentsResponseType `json:"type"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` + RepoUUID string `json:"repoUuid"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSourceDeployments4) GetType() GetDeploymentGitSourceDeploymentsResponseType { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponseType("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments4) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +func (o *GetDeploymentGitSourceDeployments4) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +func (o *GetDeploymentGitSourceDeployments4) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments4) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments4) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentGitSourceDeploymentsType string + +const ( + GetDeploymentGitSourceDeploymentsTypeGitlab GetDeploymentGitSourceDeploymentsType = "gitlab" +) + +func (e GetDeploymentGitSourceDeploymentsType) ToPointer() *GetDeploymentGitSourceDeploymentsType { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = GetDeploymentGitSourceDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsType: %v", v) + } +} + +type GetDeploymentGitSourceProjectIDType string + +const ( + GetDeploymentGitSourceProjectIDTypeStr GetDeploymentGitSourceProjectIDType = "str" + GetDeploymentGitSourceProjectIDTypeNumber GetDeploymentGitSourceProjectIDType = "number" +) + +type GetDeploymentGitSourceProjectID struct { + Str *string + Number *float64 + + Type GetDeploymentGitSourceProjectIDType +} + +func CreateGetDeploymentGitSourceProjectIDStr(str string) GetDeploymentGitSourceProjectID { + typ := GetDeploymentGitSourceProjectIDTypeStr + + return GetDeploymentGitSourceProjectID{ + Str: &str, + Type: typ, + } +} + +func CreateGetDeploymentGitSourceProjectIDNumber(number float64) GetDeploymentGitSourceProjectID { + typ := GetDeploymentGitSourceProjectIDTypeNumber + + return GetDeploymentGitSourceProjectID{ + Number: &number, + Type: typ, + } +} + +func (u *GetDeploymentGitSourceProjectID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetDeploymentGitSourceProjectIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetDeploymentGitSourceProjectIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentGitSourceProjectID", string(data)) +} + +func (u GetDeploymentGitSourceProjectID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentGitSourceProjectID: all fields are null") +} + +type GetDeploymentGitSourceDeployments3 struct { + Type GetDeploymentGitSourceDeploymentsType `json:"type"` + ProjectID GetDeploymentGitSourceProjectID `json:"projectId"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSourceDeployments3) GetType() GetDeploymentGitSourceDeploymentsType { + if o == nil { + return GetDeploymentGitSourceDeploymentsType("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments3) GetProjectID() GetDeploymentGitSourceProjectID { + if o == nil { + return GetDeploymentGitSourceProjectID{} + } + return o.ProjectID +} + +func (o *GetDeploymentGitSourceDeployments3) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments3) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments3) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentGitSourceType string + +const ( + GetDeploymentGitSourceTypeGithub GetDeploymentGitSourceType = "github" +) + +func (e GetDeploymentGitSourceType) ToPointer() *GetDeploymentGitSourceType { + return &e +} +func (e *GetDeploymentGitSourceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GetDeploymentGitSourceType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceType: %v", v) + } +} + +type GetDeploymentGitSourceDeployments2 struct { + Type GetDeploymentGitSourceType `json:"type"` + Org string `json:"org"` + Repo string `json:"repo"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSourceDeployments2) GetType() GetDeploymentGitSourceType { + if o == nil { + return GetDeploymentGitSourceType("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments2) GetOrg() string { + if o == nil { + return "" + } + return o.Org +} + +func (o *GetDeploymentGitSourceDeployments2) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *GetDeploymentGitSourceDeployments2) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments2) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments2) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type string + +const ( + GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11TypeGithub GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type = "github" +) + +func (e GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type) ToPointer() *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type { + return &e +} +func (e *GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type: %v", v) + } +} + +type GetDeploymentGitSourceRepoIDType string + +const ( + GetDeploymentGitSourceRepoIDTypeStr GetDeploymentGitSourceRepoIDType = "str" + GetDeploymentGitSourceRepoIDTypeNumber GetDeploymentGitSourceRepoIDType = "number" +) + +type GetDeploymentGitSourceRepoID struct { + Str *string + Number *float64 + + Type GetDeploymentGitSourceRepoIDType +} + +func CreateGetDeploymentGitSourceRepoIDStr(str string) GetDeploymentGitSourceRepoID { + typ := GetDeploymentGitSourceRepoIDTypeStr + + return GetDeploymentGitSourceRepoID{ + Str: &str, + Type: typ, + } +} + +func CreateGetDeploymentGitSourceRepoIDNumber(number float64) GetDeploymentGitSourceRepoID { + typ := GetDeploymentGitSourceRepoIDTypeNumber + + return GetDeploymentGitSourceRepoID{ + Number: &number, + Type: typ, + } +} + +func (u *GetDeploymentGitSourceRepoID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetDeploymentGitSourceRepoIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetDeploymentGitSourceRepoIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentGitSourceRepoID", string(data)) +} + +func (u GetDeploymentGitSourceRepoID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentGitSourceRepoID: all fields are null") +} + +type GetDeploymentGitSourceDeployments1 struct { + Type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type `json:"type"` + RepoID GetDeploymentGitSourceRepoID `json:"repoId"` + Ref *string `json:"ref,omitempty"` + Sha *string `json:"sha,omitempty"` + PrID *float64 `json:"prId,omitempty"` +} + +func (o *GetDeploymentGitSourceDeployments1) GetType() GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type { + if o == nil { + return GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type("") + } + return o.Type +} + +func (o *GetDeploymentGitSourceDeployments1) GetRepoID() GetDeploymentGitSourceRepoID { + if o == nil { + return GetDeploymentGitSourceRepoID{} + } + return o.RepoID +} + +func (o *GetDeploymentGitSourceDeployments1) GetRef() *string { + if o == nil { + return nil + } + return o.Ref +} + +func (o *GetDeploymentGitSourceDeployments1) GetSha() *string { + if o == nil { + return nil + } + return o.Sha +} + +func (o *GetDeploymentGitSourceDeployments1) GetPrID() *float64 { + if o == nil { + return nil + } + return o.PrID +} + +type GetDeploymentResponseBodyGitSourceType string + +const ( + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments1 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_1" + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments2 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_2" + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments3 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_3" + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments4 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_4" + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments5 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_5" + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments6 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_6" + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments7 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_7" + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments8 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_8" + GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments9 GetDeploymentResponseBodyGitSourceType = "getDeployment_gitSource_deployments_9" +) + +type GetDeploymentResponseBodyGitSource struct { + GetDeploymentGitSourceDeployments1 *GetDeploymentGitSourceDeployments1 + GetDeploymentGitSourceDeployments2 *GetDeploymentGitSourceDeployments2 + GetDeploymentGitSourceDeployments3 *GetDeploymentGitSourceDeployments3 + GetDeploymentGitSourceDeployments4 *GetDeploymentGitSourceDeployments4 + GetDeploymentGitSourceDeployments5 *GetDeploymentGitSourceDeployments5 + GetDeploymentGitSourceDeployments6 *GetDeploymentGitSourceDeployments6 + GetDeploymentGitSourceDeployments7 *GetDeploymentGitSourceDeployments7 + GetDeploymentGitSourceDeployments8 *GetDeploymentGitSourceDeployments8 + GetDeploymentGitSourceDeployments9 *GetDeploymentGitSourceDeployments9 + + Type GetDeploymentResponseBodyGitSourceType +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments1(getDeploymentGitSourceDeployments1 GetDeploymentGitSourceDeployments1) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments1 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments1: &getDeploymentGitSourceDeployments1, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments2(getDeploymentGitSourceDeployments2 GetDeploymentGitSourceDeployments2) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments2 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments2: &getDeploymentGitSourceDeployments2, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments3(getDeploymentGitSourceDeployments3 GetDeploymentGitSourceDeployments3) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments3 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments3: &getDeploymentGitSourceDeployments3, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments4(getDeploymentGitSourceDeployments4 GetDeploymentGitSourceDeployments4) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments4 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments4: &getDeploymentGitSourceDeployments4, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments5(getDeploymentGitSourceDeployments5 GetDeploymentGitSourceDeployments5) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments5 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments5: &getDeploymentGitSourceDeployments5, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments6(getDeploymentGitSourceDeployments6 GetDeploymentGitSourceDeployments6) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments6 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments6: &getDeploymentGitSourceDeployments6, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments7(getDeploymentGitSourceDeployments7 GetDeploymentGitSourceDeployments7) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments7 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments7: &getDeploymentGitSourceDeployments7, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments8(getDeploymentGitSourceDeployments8 GetDeploymentGitSourceDeployments8) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments8 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments8: &getDeploymentGitSourceDeployments8, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGitSourceGetDeploymentGitSourceDeployments9(getDeploymentGitSourceDeployments9 GetDeploymentGitSourceDeployments9) GetDeploymentResponseBodyGitSource { + typ := GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments9 + + return GetDeploymentResponseBodyGitSource{ + GetDeploymentGitSourceDeployments9: &getDeploymentGitSourceDeployments9, + Type: typ, + } +} + +func (u *GetDeploymentResponseBodyGitSource) UnmarshalJSON(data []byte) error { + + var getDeploymentGitSourceDeployments6 GetDeploymentGitSourceDeployments6 = GetDeploymentGitSourceDeployments6{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments6, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments6 = &getDeploymentGitSourceDeployments6 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments6 + return nil + } + + var getDeploymentGitSourceDeployments8 GetDeploymentGitSourceDeployments8 = GetDeploymentGitSourceDeployments8{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments8, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments8 = &getDeploymentGitSourceDeployments8 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments8 + return nil + } + + var getDeploymentGitSourceDeployments1 GetDeploymentGitSourceDeployments1 = GetDeploymentGitSourceDeployments1{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments1, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments1 = &getDeploymentGitSourceDeployments1 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments1 + return nil + } + + var getDeploymentGitSourceDeployments3 GetDeploymentGitSourceDeployments3 = GetDeploymentGitSourceDeployments3{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments3, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments3 = &getDeploymentGitSourceDeployments3 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments3 + return nil + } + + var getDeploymentGitSourceDeployments2 GetDeploymentGitSourceDeployments2 = GetDeploymentGitSourceDeployments2{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments2, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments2 = &getDeploymentGitSourceDeployments2 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments2 + return nil + } + + var getDeploymentGitSourceDeployments4 GetDeploymentGitSourceDeployments4 = GetDeploymentGitSourceDeployments4{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments4, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments4 = &getDeploymentGitSourceDeployments4 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments4 + return nil + } + + var getDeploymentGitSourceDeployments5 GetDeploymentGitSourceDeployments5 = GetDeploymentGitSourceDeployments5{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments5, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments5 = &getDeploymentGitSourceDeployments5 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments5 + return nil + } + + var getDeploymentGitSourceDeployments7 GetDeploymentGitSourceDeployments7 = GetDeploymentGitSourceDeployments7{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments7, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments7 = &getDeploymentGitSourceDeployments7 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments7 + return nil + } + + var getDeploymentGitSourceDeployments9 GetDeploymentGitSourceDeployments9 = GetDeploymentGitSourceDeployments9{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitSourceDeployments9, "", true, true); err == nil { + u.GetDeploymentGitSourceDeployments9 = &getDeploymentGitSourceDeployments9 + u.Type = GetDeploymentResponseBodyGitSourceTypeGetDeploymentGitSourceDeployments9 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentResponseBodyGitSource", string(data)) +} + +func (u GetDeploymentResponseBodyGitSource) MarshalJSON() ([]byte, error) { + if u.GetDeploymentGitSourceDeployments1 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments1, "", true) + } + + if u.GetDeploymentGitSourceDeployments2 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments2, "", true) + } + + if u.GetDeploymentGitSourceDeployments3 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments3, "", true) + } + + if u.GetDeploymentGitSourceDeployments4 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments4, "", true) + } + + if u.GetDeploymentGitSourceDeployments5 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments5, "", true) + } + + if u.GetDeploymentGitSourceDeployments6 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments6, "", true) + } + + if u.GetDeploymentGitSourceDeployments7 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments7, "", true) + } + + if u.GetDeploymentGitSourceDeployments8 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments8, "", true) + } + + if u.GetDeploymentGitSourceDeployments9 != nil { + return utils.MarshalJSON(u.GetDeploymentGitSourceDeployments9, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentResponseBodyGitSource: all fields are null") +} + +type ResponseBodyProject struct { + ID string `json:"id"` + Name string `json:"name"` + Framework *string `json:"framework,omitempty"` +} + +func (o *ResponseBodyProject) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ResponseBodyProject) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ResponseBodyProject) GetFramework() *string { + if o == nil { + return nil + } + return o.Framework +} + +// ResponseBodyReadySubstate - Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic +type ResponseBodyReadySubstate string + +const ( + ResponseBodyReadySubstateStaged ResponseBodyReadySubstate = "STAGED" + ResponseBodyReadySubstatePromoted ResponseBodyReadySubstate = "PROMOTED" +) + +func (e ResponseBodyReadySubstate) ToPointer() *ResponseBodyReadySubstate { + return &e +} +func (e *ResponseBodyReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = ResponseBodyReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyReadySubstate: %v", v) + } +} + +type ResponseBodySource string + +const ( + ResponseBodySourceAPITriggerGitDeploy ResponseBodySource = "api-trigger-git-deploy" + ResponseBodySourceCli ResponseBodySource = "cli" + ResponseBodySourceCloneRepo ResponseBodySource = "clone/repo" + ResponseBodySourceGit ResponseBodySource = "git" + ResponseBodySourceImport ResponseBodySource = "import" + ResponseBodySourceImportRepo ResponseBodySource = "import/repo" + ResponseBodySourceRedeploy ResponseBodySource = "redeploy" + ResponseBodySourceV0Web ResponseBodySource = "v0-web" +) + +func (e ResponseBodySource) ToPointer() *ResponseBodySource { + return &e +} +func (e *ResponseBodySource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "api-trigger-git-deploy": + fallthrough + case "cli": + fallthrough + case "clone/repo": + fallthrough + case "git": + fallthrough + case "import": + fallthrough + case "import/repo": + fallthrough + case "redeploy": + fallthrough + case "v0-web": + *e = ResponseBodySource(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodySource: %v", v) + } +} + +type ResponseBodyTarget string + +const ( + ResponseBodyTargetStaging ResponseBodyTarget = "staging" + ResponseBodyTargetProduction ResponseBodyTarget = "production" +) + +func (e ResponseBodyTarget) ToPointer() *ResponseBodyTarget { + return &e +} +func (e *ResponseBodyTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "staging": + fallthrough + case "production": + *e = ResponseBodyTarget(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyTarget: %v", v) + } +} + +type ResponseBodyOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *ResponseBodyOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *ResponseBodyOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *ResponseBodyOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *ResponseBodyOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *ResponseBodyOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *ResponseBodyOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *ResponseBodyOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *ResponseBodyOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *ResponseBodyOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type ResponseBodyPlan string + +const ( + ResponseBodyPlanPro ResponseBodyPlan = "pro" + ResponseBodyPlanEnterprise ResponseBodyPlan = "enterprise" + ResponseBodyPlanHobby ResponseBodyPlan = "hobby" +) + +func (e ResponseBodyPlan) ToPointer() *ResponseBodyPlan { + return &e +} +func (e *ResponseBodyPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = ResponseBodyPlan(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyPlan: %v", v) + } +} + +type ResponseBodyCrons struct { + Schedule string `json:"schedule"` + Path string `json:"path"` +} + +func (o *ResponseBodyCrons) GetSchedule() string { + if o == nil { + return "" + } + return o.Schedule +} + +func (o *ResponseBodyCrons) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +type ResponseBodyFunctions struct { + Memory *float64 `json:"memory,omitempty"` + MaxDuration *float64 `json:"maxDuration,omitempty"` + Runtime *string `json:"runtime,omitempty"` + IncludeFiles *string `json:"includeFiles,omitempty"` + ExcludeFiles *string `json:"excludeFiles,omitempty"` +} + +func (o *ResponseBodyFunctions) GetMemory() *float64 { + if o == nil { + return nil + } + return o.Memory +} + +func (o *ResponseBodyFunctions) GetMaxDuration() *float64 { + if o == nil { + return nil + } + return o.MaxDuration +} + +func (o *ResponseBodyFunctions) GetRuntime() *string { + if o == nil { + return nil + } + return o.Runtime +} + +func (o *ResponseBodyFunctions) GetIncludeFiles() *string { + if o == nil { + return nil + } + return o.IncludeFiles +} + +func (o *ResponseBodyFunctions) GetExcludeFiles() *string { + if o == nil { + return nil + } + return o.ExcludeFiles +} + +type GetDeploymentRoutes3 struct { + Src string `json:"src"` + Continue bool `json:"continue"` + Middleware float64 `json:"middleware"` +} + +func (o *GetDeploymentRoutes3) GetSrc() string { + if o == nil { + return "" + } + return o.Src +} + +func (o *GetDeploymentRoutes3) GetContinue() bool { + if o == nil { + return false + } + return o.Continue +} + +func (o *GetDeploymentRoutes3) GetMiddleware() float64 { + if o == nil { + return 0.0 + } + return o.Middleware +} + +type GetDeploymentRoutesHandle string + +const ( + GetDeploymentRoutesHandleError GetDeploymentRoutesHandle = "error" + GetDeploymentRoutesHandleFilesystem GetDeploymentRoutesHandle = "filesystem" + GetDeploymentRoutesHandleHit GetDeploymentRoutesHandle = "hit" + GetDeploymentRoutesHandleMiss GetDeploymentRoutesHandle = "miss" + GetDeploymentRoutesHandleRewrite GetDeploymentRoutesHandle = "rewrite" + GetDeploymentRoutesHandleResource GetDeploymentRoutesHandle = "resource" +) + +func (e GetDeploymentRoutesHandle) ToPointer() *GetDeploymentRoutesHandle { + return &e +} +func (e *GetDeploymentRoutesHandle) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "error": + fallthrough + case "filesystem": + fallthrough + case "hit": + fallthrough + case "miss": + fallthrough + case "rewrite": + fallthrough + case "resource": + *e = GetDeploymentRoutesHandle(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentRoutesHandle: %v", v) + } +} + +type GetDeploymentRoutes2 struct { + Handle GetDeploymentRoutesHandle `json:"handle"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` + Status *float64 `json:"status,omitempty"` +} + +func (o *GetDeploymentRoutes2) GetHandle() GetDeploymentRoutesHandle { + if o == nil { + return GetDeploymentRoutesHandle("") + } + return o.Handle +} + +func (o *GetDeploymentRoutes2) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *GetDeploymentRoutes2) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *GetDeploymentRoutes2) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +type GetDeploymentHasType string + +const ( + GetDeploymentHasTypeHeader GetDeploymentHasType = "header" + GetDeploymentHasTypeCookie GetDeploymentHasType = "cookie" + GetDeploymentHasTypeQuery GetDeploymentHasType = "query" +) + +func (e GetDeploymentHasType) ToPointer() *GetDeploymentHasType { + return &e +} +func (e *GetDeploymentHasType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + *e = GetDeploymentHasType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentHasType: %v", v) + } +} + +type GetDeploymentHas2 struct { + Type GetDeploymentHasType `json:"type"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +func (o *GetDeploymentHas2) GetType() GetDeploymentHasType { + if o == nil { + return GetDeploymentHasType("") + } + return o.Type +} + +func (o *GetDeploymentHas2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *GetDeploymentHas2) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type GetDeploymentHasDeploymentsType string + +const ( + GetDeploymentHasDeploymentsTypeHost GetDeploymentHasDeploymentsType = "host" +) + +func (e GetDeploymentHasDeploymentsType) ToPointer() *GetDeploymentHasDeploymentsType { + return &e +} +func (e *GetDeploymentHasDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + *e = GetDeploymentHasDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentHasDeploymentsType: %v", v) + } +} + +type GetDeploymentHas1 struct { + Type GetDeploymentHasDeploymentsType `json:"type"` + Value string `json:"value"` +} + +func (o *GetDeploymentHas1) GetType() GetDeploymentHasDeploymentsType { + if o == nil { + return GetDeploymentHasDeploymentsType("") + } + return o.Type +} + +func (o *GetDeploymentHas1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type GetDeploymentRoutesHasType string + +const ( + GetDeploymentRoutesHasTypeGetDeploymentHas1 GetDeploymentRoutesHasType = "getDeployment_has_1" + GetDeploymentRoutesHasTypeGetDeploymentHas2 GetDeploymentRoutesHasType = "getDeployment_has_2" +) + +type GetDeploymentRoutesHas struct { + GetDeploymentHas1 *GetDeploymentHas1 + GetDeploymentHas2 *GetDeploymentHas2 + + Type GetDeploymentRoutesHasType +} + +func CreateGetDeploymentRoutesHasGetDeploymentHas1(getDeploymentHas1 GetDeploymentHas1) GetDeploymentRoutesHas { + typ := GetDeploymentRoutesHasTypeGetDeploymentHas1 + + return GetDeploymentRoutesHas{ + GetDeploymentHas1: &getDeploymentHas1, + Type: typ, + } +} + +func CreateGetDeploymentRoutesHasGetDeploymentHas2(getDeploymentHas2 GetDeploymentHas2) GetDeploymentRoutesHas { + typ := GetDeploymentRoutesHasTypeGetDeploymentHas2 + + return GetDeploymentRoutesHas{ + GetDeploymentHas2: &getDeploymentHas2, + Type: typ, + } +} + +func (u *GetDeploymentRoutesHas) UnmarshalJSON(data []byte) error { + + var getDeploymentHas1 GetDeploymentHas1 = GetDeploymentHas1{} + if err := utils.UnmarshalJSON(data, &getDeploymentHas1, "", true, true); err == nil { + u.GetDeploymentHas1 = &getDeploymentHas1 + u.Type = GetDeploymentRoutesHasTypeGetDeploymentHas1 + return nil + } + + var getDeploymentHas2 GetDeploymentHas2 = GetDeploymentHas2{} + if err := utils.UnmarshalJSON(data, &getDeploymentHas2, "", true, true); err == nil { + u.GetDeploymentHas2 = &getDeploymentHas2 + u.Type = GetDeploymentRoutesHasTypeGetDeploymentHas2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentRoutesHas", string(data)) +} + +func (u GetDeploymentRoutesHas) MarshalJSON() ([]byte, error) { + if u.GetDeploymentHas1 != nil { + return utils.MarshalJSON(u.GetDeploymentHas1, "", true) + } + + if u.GetDeploymentHas2 != nil { + return utils.MarshalJSON(u.GetDeploymentHas2, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentRoutesHas: all fields are null") +} + +type GetDeploymentMissingType string + +const ( + GetDeploymentMissingTypeHeader GetDeploymentMissingType = "header" + GetDeploymentMissingTypeCookie GetDeploymentMissingType = "cookie" + GetDeploymentMissingTypeQuery GetDeploymentMissingType = "query" +) + +func (e GetDeploymentMissingType) ToPointer() *GetDeploymentMissingType { + return &e +} +func (e *GetDeploymentMissingType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + *e = GetDeploymentMissingType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentMissingType: %v", v) + } +} + +type GetDeploymentMissing2 struct { + Type GetDeploymentMissingType `json:"type"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +func (o *GetDeploymentMissing2) GetType() GetDeploymentMissingType { + if o == nil { + return GetDeploymentMissingType("") + } + return o.Type +} + +func (o *GetDeploymentMissing2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *GetDeploymentMissing2) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +type GetDeploymentMissingDeploymentsType string + +const ( + GetDeploymentMissingDeploymentsTypeHost GetDeploymentMissingDeploymentsType = "host" +) + +func (e GetDeploymentMissingDeploymentsType) ToPointer() *GetDeploymentMissingDeploymentsType { + return &e +} +func (e *GetDeploymentMissingDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + *e = GetDeploymentMissingDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentMissingDeploymentsType: %v", v) + } +} + +type GetDeploymentMissing1 struct { + Type GetDeploymentMissingDeploymentsType `json:"type"` + Value string `json:"value"` +} + +func (o *GetDeploymentMissing1) GetType() GetDeploymentMissingDeploymentsType { + if o == nil { + return GetDeploymentMissingDeploymentsType("") + } + return o.Type +} + +func (o *GetDeploymentMissing1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type GetDeploymentRoutesMissingType string + +const ( + GetDeploymentRoutesMissingTypeGetDeploymentMissing1 GetDeploymentRoutesMissingType = "getDeployment_missing_1" + GetDeploymentRoutesMissingTypeGetDeploymentMissing2 GetDeploymentRoutesMissingType = "getDeployment_missing_2" +) + +type GetDeploymentRoutesMissing struct { + GetDeploymentMissing1 *GetDeploymentMissing1 + GetDeploymentMissing2 *GetDeploymentMissing2 + + Type GetDeploymentRoutesMissingType +} + +func CreateGetDeploymentRoutesMissingGetDeploymentMissing1(getDeploymentMissing1 GetDeploymentMissing1) GetDeploymentRoutesMissing { + typ := GetDeploymentRoutesMissingTypeGetDeploymentMissing1 + + return GetDeploymentRoutesMissing{ + GetDeploymentMissing1: &getDeploymentMissing1, + Type: typ, + } +} + +func CreateGetDeploymentRoutesMissingGetDeploymentMissing2(getDeploymentMissing2 GetDeploymentMissing2) GetDeploymentRoutesMissing { + typ := GetDeploymentRoutesMissingTypeGetDeploymentMissing2 + + return GetDeploymentRoutesMissing{ + GetDeploymentMissing2: &getDeploymentMissing2, + Type: typ, + } +} + +func (u *GetDeploymentRoutesMissing) UnmarshalJSON(data []byte) error { + + var getDeploymentMissing1 GetDeploymentMissing1 = GetDeploymentMissing1{} + if err := utils.UnmarshalJSON(data, &getDeploymentMissing1, "", true, true); err == nil { + u.GetDeploymentMissing1 = &getDeploymentMissing1 + u.Type = GetDeploymentRoutesMissingTypeGetDeploymentMissing1 + return nil + } + + var getDeploymentMissing2 GetDeploymentMissing2 = GetDeploymentMissing2{} + if err := utils.UnmarshalJSON(data, &getDeploymentMissing2, "", true, true); err == nil { + u.GetDeploymentMissing2 = &getDeploymentMissing2 + u.Type = GetDeploymentRoutesMissingTypeGetDeploymentMissing2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentRoutesMissing", string(data)) +} + +func (u GetDeploymentRoutesMissing) MarshalJSON() ([]byte, error) { + if u.GetDeploymentMissing1 != nil { + return utils.MarshalJSON(u.GetDeploymentMissing1, "", true) + } + + if u.GetDeploymentMissing2 != nil { + return utils.MarshalJSON(u.GetDeploymentMissing2, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentRoutesMissing: all fields are null") +} + +type GetDeploymentRoutesLocale struct { + Redirect map[string]string `json:"redirect,omitempty"` + Cookie *string `json:"cookie,omitempty"` +} + +func (o *GetDeploymentRoutesLocale) GetRedirect() map[string]string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *GetDeploymentRoutesLocale) GetCookie() *string { + if o == nil { + return nil + } + return o.Cookie +} + +type GetDeploymentRoutes1 struct { + Src string `json:"src"` + Dest *string `json:"dest,omitempty"` + Headers map[string]string `json:"headers,omitempty"` + Methods []string `json:"methods,omitempty"` + Continue *bool `json:"continue,omitempty"` + Override *bool `json:"override,omitempty"` + CaseSensitive *bool `json:"caseSensitive,omitempty"` + Check *bool `json:"check,omitempty"` + Important *bool `json:"important,omitempty"` + Status *float64 `json:"status,omitempty"` + Has []GetDeploymentRoutesHas `json:"has,omitempty"` + Missing []GetDeploymentRoutesMissing `json:"missing,omitempty"` + Locale *GetDeploymentRoutesLocale `json:"locale,omitempty"` + // A middleware key within the `output` key under the build result. Overrides a `middleware` definition. + MiddlewarePath *string `json:"middlewarePath,omitempty"` + // The original middleware matchers. + MiddlewareRawSrc []string `json:"middlewareRawSrc,omitempty"` + // A middleware index in the `middleware` key under the build result + Middleware *float64 `json:"middleware,omitempty"` +} + +func (o *GetDeploymentRoutes1) GetSrc() string { + if o == nil { + return "" + } + return o.Src +} + +func (o *GetDeploymentRoutes1) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *GetDeploymentRoutes1) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *GetDeploymentRoutes1) GetMethods() []string { + if o == nil { + return nil + } + return o.Methods +} + +func (o *GetDeploymentRoutes1) GetContinue() *bool { + if o == nil { + return nil + } + return o.Continue +} + +func (o *GetDeploymentRoutes1) GetOverride() *bool { + if o == nil { + return nil + } + return o.Override +} + +func (o *GetDeploymentRoutes1) GetCaseSensitive() *bool { + if o == nil { + return nil + } + return o.CaseSensitive +} + +func (o *GetDeploymentRoutes1) GetCheck() *bool { + if o == nil { + return nil + } + return o.Check +} + +func (o *GetDeploymentRoutes1) GetImportant() *bool { + if o == nil { + return nil + } + return o.Important +} + +func (o *GetDeploymentRoutes1) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +func (o *GetDeploymentRoutes1) GetHas() []GetDeploymentRoutesHas { + if o == nil { + return nil + } + return o.Has +} + +func (o *GetDeploymentRoutes1) GetMissing() []GetDeploymentRoutesMissing { + if o == nil { + return nil + } + return o.Missing +} + +func (o *GetDeploymentRoutes1) GetLocale() *GetDeploymentRoutesLocale { + if o == nil { + return nil + } + return o.Locale +} + +func (o *GetDeploymentRoutes1) GetMiddlewarePath() *string { + if o == nil { + return nil + } + return o.MiddlewarePath +} + +func (o *GetDeploymentRoutes1) GetMiddlewareRawSrc() []string { + if o == nil { + return nil + } + return o.MiddlewareRawSrc +} + +func (o *GetDeploymentRoutes1) GetMiddleware() *float64 { + if o == nil { + return nil + } + return o.Middleware +} + +type ResponseBodyRoutesType string + +const ( + ResponseBodyRoutesTypeGetDeploymentRoutes1 ResponseBodyRoutesType = "getDeployment_routes_1" + ResponseBodyRoutesTypeGetDeploymentRoutes2 ResponseBodyRoutesType = "getDeployment_routes_2" + ResponseBodyRoutesTypeGetDeploymentRoutes3 ResponseBodyRoutesType = "getDeployment_routes_3" +) + +type ResponseBodyRoutes struct { + GetDeploymentRoutes1 *GetDeploymentRoutes1 + GetDeploymentRoutes2 *GetDeploymentRoutes2 + GetDeploymentRoutes3 *GetDeploymentRoutes3 + + Type ResponseBodyRoutesType +} + +func CreateResponseBodyRoutesGetDeploymentRoutes1(getDeploymentRoutes1 GetDeploymentRoutes1) ResponseBodyRoutes { + typ := ResponseBodyRoutesTypeGetDeploymentRoutes1 + + return ResponseBodyRoutes{ + GetDeploymentRoutes1: &getDeploymentRoutes1, + Type: typ, + } +} + +func CreateResponseBodyRoutesGetDeploymentRoutes2(getDeploymentRoutes2 GetDeploymentRoutes2) ResponseBodyRoutes { + typ := ResponseBodyRoutesTypeGetDeploymentRoutes2 + + return ResponseBodyRoutes{ + GetDeploymentRoutes2: &getDeploymentRoutes2, + Type: typ, + } +} + +func CreateResponseBodyRoutesGetDeploymentRoutes3(getDeploymentRoutes3 GetDeploymentRoutes3) ResponseBodyRoutes { + typ := ResponseBodyRoutesTypeGetDeploymentRoutes3 + + return ResponseBodyRoutes{ + GetDeploymentRoutes3: &getDeploymentRoutes3, + Type: typ, + } +} + +func (u *ResponseBodyRoutes) UnmarshalJSON(data []byte) error { + + var getDeploymentRoutes3 GetDeploymentRoutes3 = GetDeploymentRoutes3{} + if err := utils.UnmarshalJSON(data, &getDeploymentRoutes3, "", true, true); err == nil { + u.GetDeploymentRoutes3 = &getDeploymentRoutes3 + u.Type = ResponseBodyRoutesTypeGetDeploymentRoutes3 + return nil + } + + var getDeploymentRoutes2 GetDeploymentRoutes2 = GetDeploymentRoutes2{} + if err := utils.UnmarshalJSON(data, &getDeploymentRoutes2, "", true, true); err == nil { + u.GetDeploymentRoutes2 = &getDeploymentRoutes2 + u.Type = ResponseBodyRoutesTypeGetDeploymentRoutes2 + return nil + } + + var getDeploymentRoutes1 GetDeploymentRoutes1 = GetDeploymentRoutes1{} + if err := utils.UnmarshalJSON(data, &getDeploymentRoutes1, "", true, true); err == nil { + u.GetDeploymentRoutes1 = &getDeploymentRoutes1 + u.Type = ResponseBodyRoutesTypeGetDeploymentRoutes1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyRoutes", string(data)) +} + +func (u ResponseBodyRoutes) MarshalJSON() ([]byte, error) { + if u.GetDeploymentRoutes1 != nil { + return utils.MarshalJSON(u.GetDeploymentRoutes1, "", true) + } + + if u.GetDeploymentRoutes2 != nil { + return utils.MarshalJSON(u.GetDeploymentRoutes2, "", true) + } + + if u.GetDeploymentRoutes3 != nil { + return utils.MarshalJSON(u.GetDeploymentRoutes3, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyRoutes: all fields are null") +} + +type GetDeploymentGitRepoDeploymentsType string + +const ( + GetDeploymentGitRepoDeploymentsTypeBitbucket GetDeploymentGitRepoDeploymentsType = "bitbucket" +) + +func (e GetDeploymentGitRepoDeploymentsType) ToPointer() *GetDeploymentGitRepoDeploymentsType { + return &e +} +func (e *GetDeploymentGitRepoDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = GetDeploymentGitRepoDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitRepoDeploymentsType: %v", v) + } +} + +type GetDeploymentGitRepoOwnerType string + +const ( + GetDeploymentGitRepoOwnerTypeTeam GetDeploymentGitRepoOwnerType = "team" + GetDeploymentGitRepoOwnerTypeUser GetDeploymentGitRepoOwnerType = "user" +) + +func (e GetDeploymentGitRepoOwnerType) ToPointer() *GetDeploymentGitRepoOwnerType { + return &e +} +func (e *GetDeploymentGitRepoOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = GetDeploymentGitRepoOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitRepoOwnerType: %v", v) + } +} + +type GetDeploymentGitRepo3 struct { + Owner string `json:"owner"` + RepoUUID string `json:"repoUuid"` + Slug string `json:"slug"` + Type GetDeploymentGitRepoDeploymentsType `json:"type"` + WorkspaceUUID string `json:"workspaceUuid"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType GetDeploymentGitRepoOwnerType `json:"ownerType"` +} + +func (o *GetDeploymentGitRepo3) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *GetDeploymentGitRepo3) GetRepoUUID() string { + if o == nil { + return "" + } + return o.RepoUUID +} + +func (o *GetDeploymentGitRepo3) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GetDeploymentGitRepo3) GetType() GetDeploymentGitRepoDeploymentsType { + if o == nil { + return GetDeploymentGitRepoDeploymentsType("") + } + return o.Type +} + +func (o *GetDeploymentGitRepo3) GetWorkspaceUUID() string { + if o == nil { + return "" + } + return o.WorkspaceUUID +} + +func (o *GetDeploymentGitRepo3) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *GetDeploymentGitRepo3) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *GetDeploymentGitRepo3) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetDeploymentGitRepo3) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *GetDeploymentGitRepo3) GetOwnerType() GetDeploymentGitRepoOwnerType { + if o == nil { + return GetDeploymentGitRepoOwnerType("") + } + return o.OwnerType +} + +type GetDeploymentGitRepoType string + +const ( + GetDeploymentGitRepoTypeGithub GetDeploymentGitRepoType = "github" +) + +func (e GetDeploymentGitRepoType) ToPointer() *GetDeploymentGitRepoType { + return &e +} +func (e *GetDeploymentGitRepoType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GetDeploymentGitRepoType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitRepoType: %v", v) + } +} + +type GetDeploymentGitRepoDeploymentsResponseOwnerType string + +const ( + GetDeploymentGitRepoDeploymentsResponseOwnerTypeTeam GetDeploymentGitRepoDeploymentsResponseOwnerType = "team" + GetDeploymentGitRepoDeploymentsResponseOwnerTypeUser GetDeploymentGitRepoDeploymentsResponseOwnerType = "user" +) + +func (e GetDeploymentGitRepoDeploymentsResponseOwnerType) ToPointer() *GetDeploymentGitRepoDeploymentsResponseOwnerType { + return &e +} +func (e *GetDeploymentGitRepoDeploymentsResponseOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = GetDeploymentGitRepoDeploymentsResponseOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitRepoDeploymentsResponseOwnerType: %v", v) + } +} + +type GetDeploymentGitRepo2 struct { + Org string `json:"org"` + Repo string `json:"repo"` + RepoID float64 `json:"repoId"` + Type GetDeploymentGitRepoType `json:"type"` + RepoOwnerID float64 `json:"repoOwnerId"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType GetDeploymentGitRepoDeploymentsResponseOwnerType `json:"ownerType"` +} + +func (o *GetDeploymentGitRepo2) GetOrg() string { + if o == nil { + return "" + } + return o.Org +} + +func (o *GetDeploymentGitRepo2) GetRepo() string { + if o == nil { + return "" + } + return o.Repo +} + +func (o *GetDeploymentGitRepo2) GetRepoID() float64 { + if o == nil { + return 0.0 + } + return o.RepoID +} + +func (o *GetDeploymentGitRepo2) GetType() GetDeploymentGitRepoType { + if o == nil { + return GetDeploymentGitRepoType("") + } + return o.Type +} + +func (o *GetDeploymentGitRepo2) GetRepoOwnerID() float64 { + if o == nil { + return 0.0 + } + return o.RepoOwnerID +} + +func (o *GetDeploymentGitRepo2) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *GetDeploymentGitRepo2) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *GetDeploymentGitRepo2) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetDeploymentGitRepo2) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *GetDeploymentGitRepo2) GetOwnerType() GetDeploymentGitRepoDeploymentsResponseOwnerType { + if o == nil { + return GetDeploymentGitRepoDeploymentsResponseOwnerType("") + } + return o.OwnerType +} + +type GetDeploymentGitRepoDeploymentsResponseType string + +const ( + GetDeploymentGitRepoDeploymentsResponseTypeGitlab GetDeploymentGitRepoDeploymentsResponseType = "gitlab" +) + +func (e GetDeploymentGitRepoDeploymentsResponseType) ToPointer() *GetDeploymentGitRepoDeploymentsResponseType { + return &e +} +func (e *GetDeploymentGitRepoDeploymentsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = GetDeploymentGitRepoDeploymentsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitRepoDeploymentsResponseType: %v", v) + } +} + +type GetDeploymentGitRepoDeploymentsOwnerType string + +const ( + GetDeploymentGitRepoDeploymentsOwnerTypeTeam GetDeploymentGitRepoDeploymentsOwnerType = "team" + GetDeploymentGitRepoDeploymentsOwnerTypeUser GetDeploymentGitRepoDeploymentsOwnerType = "user" +) + +func (e GetDeploymentGitRepoDeploymentsOwnerType) ToPointer() *GetDeploymentGitRepoDeploymentsOwnerType { + return &e +} +func (e *GetDeploymentGitRepoDeploymentsOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "user": + *e = GetDeploymentGitRepoDeploymentsOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentGitRepoDeploymentsOwnerType: %v", v) + } +} + +type GetDeploymentGitRepo1 struct { + Namespace string `json:"namespace"` + ProjectID float64 `json:"projectId"` + Type GetDeploymentGitRepoDeploymentsResponseType `json:"type"` + URL string `json:"url"` + Path string `json:"path"` + DefaultBranch string `json:"defaultBranch"` + Name string `json:"name"` + Private bool `json:"private"` + OwnerType GetDeploymentGitRepoDeploymentsOwnerType `json:"ownerType"` +} + +func (o *GetDeploymentGitRepo1) GetNamespace() string { + if o == nil { + return "" + } + return o.Namespace +} + +func (o *GetDeploymentGitRepo1) GetProjectID() float64 { + if o == nil { + return 0.0 + } + return o.ProjectID +} + +func (o *GetDeploymentGitRepo1) GetType() GetDeploymentGitRepoDeploymentsResponseType { + if o == nil { + return GetDeploymentGitRepoDeploymentsResponseType("") + } + return o.Type +} + +func (o *GetDeploymentGitRepo1) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetDeploymentGitRepo1) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *GetDeploymentGitRepo1) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *GetDeploymentGitRepo1) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetDeploymentGitRepo1) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *GetDeploymentGitRepo1) GetOwnerType() GetDeploymentGitRepoDeploymentsOwnerType { + if o == nil { + return GetDeploymentGitRepoDeploymentsOwnerType("") + } + return o.OwnerType +} + +type ResponseBodyGitRepoType string + +const ( + ResponseBodyGitRepoTypeGetDeploymentGitRepo1 ResponseBodyGitRepoType = "getDeployment_gitRepo_1" + ResponseBodyGitRepoTypeGetDeploymentGitRepo2 ResponseBodyGitRepoType = "getDeployment_gitRepo_2" + ResponseBodyGitRepoTypeGetDeploymentGitRepo3 ResponseBodyGitRepoType = "getDeployment_gitRepo_3" +) + +type ResponseBodyGitRepo struct { + GetDeploymentGitRepo1 *GetDeploymentGitRepo1 + GetDeploymentGitRepo2 *GetDeploymentGitRepo2 + GetDeploymentGitRepo3 *GetDeploymentGitRepo3 + + Type ResponseBodyGitRepoType +} + +func CreateResponseBodyGitRepoGetDeploymentGitRepo1(getDeploymentGitRepo1 GetDeploymentGitRepo1) ResponseBodyGitRepo { + typ := ResponseBodyGitRepoTypeGetDeploymentGitRepo1 + + return ResponseBodyGitRepo{ + GetDeploymentGitRepo1: &getDeploymentGitRepo1, + Type: typ, + } +} + +func CreateResponseBodyGitRepoGetDeploymentGitRepo2(getDeploymentGitRepo2 GetDeploymentGitRepo2) ResponseBodyGitRepo { + typ := ResponseBodyGitRepoTypeGetDeploymentGitRepo2 + + return ResponseBodyGitRepo{ + GetDeploymentGitRepo2: &getDeploymentGitRepo2, + Type: typ, + } +} + +func CreateResponseBodyGitRepoGetDeploymentGitRepo3(getDeploymentGitRepo3 GetDeploymentGitRepo3) ResponseBodyGitRepo { + typ := ResponseBodyGitRepoTypeGetDeploymentGitRepo3 + + return ResponseBodyGitRepo{ + GetDeploymentGitRepo3: &getDeploymentGitRepo3, + Type: typ, + } +} + +func (u *ResponseBodyGitRepo) UnmarshalJSON(data []byte) error { + + var getDeploymentGitRepo1 GetDeploymentGitRepo1 = GetDeploymentGitRepo1{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitRepo1, "", true, true); err == nil { + u.GetDeploymentGitRepo1 = &getDeploymentGitRepo1 + u.Type = ResponseBodyGitRepoTypeGetDeploymentGitRepo1 + return nil + } + + var getDeploymentGitRepo2 GetDeploymentGitRepo2 = GetDeploymentGitRepo2{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitRepo2, "", true, true); err == nil { + u.GetDeploymentGitRepo2 = &getDeploymentGitRepo2 + u.Type = ResponseBodyGitRepoTypeGetDeploymentGitRepo2 + return nil + } + + var getDeploymentGitRepo3 GetDeploymentGitRepo3 = GetDeploymentGitRepo3{} + if err := utils.UnmarshalJSON(data, &getDeploymentGitRepo3, "", true, true); err == nil { + u.GetDeploymentGitRepo3 = &getDeploymentGitRepo3 + u.Type = ResponseBodyGitRepoTypeGetDeploymentGitRepo3 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyGitRepo", string(data)) +} + +func (u ResponseBodyGitRepo) MarshalJSON() ([]byte, error) { + if u.GetDeploymentGitRepo1 != nil { + return utils.MarshalJSON(u.GetDeploymentGitRepo1, "", true) + } + + if u.GetDeploymentGitRepo2 != nil { + return utils.MarshalJSON(u.GetDeploymentGitRepo2, "", true) + } + + if u.GetDeploymentGitRepo3 != nil { + return utils.MarshalJSON(u.GetDeploymentGitRepo3, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyGitRepo: all fields are null") +} + +// GetDeploymentFlags2 - Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags. +type GetDeploymentFlags2 struct { +} + +type GetDeploymentFlagsOptions struct { + Value *components.FlagJSONValue `json:"value"` + Label *string `json:"label,omitempty"` +} + +func (o *GetDeploymentFlagsOptions) GetValue() *components.FlagJSONValue { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetDeploymentFlagsOptions) GetLabel() *string { + if o == nil { + return nil + } + return o.Label +} + +type GetDeploymentFlagsDefinitions struct { + Options []GetDeploymentFlagsOptions `json:"options,omitempty"` + URL *string `json:"url,omitempty"` + Description *string `json:"description,omitempty"` +} + +func (o *GetDeploymentFlagsDefinitions) GetOptions() []GetDeploymentFlagsOptions { + if o == nil { + return nil + } + return o.Options +} + +func (o *GetDeploymentFlagsDefinitions) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *GetDeploymentFlagsDefinitions) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +// GetDeploymentFlags1 - Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags. +type GetDeploymentFlags1 struct { + Definitions map[string]GetDeploymentFlagsDefinitions `json:"definitions"` +} + +func (o *GetDeploymentFlags1) GetDefinitions() map[string]GetDeploymentFlagsDefinitions { + if o == nil { + return map[string]GetDeploymentFlagsDefinitions{} + } + return o.Definitions +} + +type ResponseBodyFlagsType string + +const ( + ResponseBodyFlagsTypeGetDeploymentFlags1 ResponseBodyFlagsType = "getDeployment_flags_1" + ResponseBodyFlagsTypeArrayOfGetDeploymentFlags2 ResponseBodyFlagsType = "arrayOfGetDeploymentFlags2" +) + +type ResponseBodyFlags struct { + GetDeploymentFlags1 *GetDeploymentFlags1 + ArrayOfGetDeploymentFlags2 []GetDeploymentFlags2 + + Type ResponseBodyFlagsType +} + +func CreateResponseBodyFlagsGetDeploymentFlags1(getDeploymentFlags1 GetDeploymentFlags1) ResponseBodyFlags { + typ := ResponseBodyFlagsTypeGetDeploymentFlags1 + + return ResponseBodyFlags{ + GetDeploymentFlags1: &getDeploymentFlags1, + Type: typ, + } +} + +func CreateResponseBodyFlagsArrayOfGetDeploymentFlags2(arrayOfGetDeploymentFlags2 []GetDeploymentFlags2) ResponseBodyFlags { + typ := ResponseBodyFlagsTypeArrayOfGetDeploymentFlags2 + + return ResponseBodyFlags{ + ArrayOfGetDeploymentFlags2: arrayOfGetDeploymentFlags2, + Type: typ, + } +} + +func (u *ResponseBodyFlags) UnmarshalJSON(data []byte) error { + + var getDeploymentFlags1 GetDeploymentFlags1 = GetDeploymentFlags1{} + if err := utils.UnmarshalJSON(data, &getDeploymentFlags1, "", true, true); err == nil { + u.GetDeploymentFlags1 = &getDeploymentFlags1 + u.Type = ResponseBodyFlagsTypeGetDeploymentFlags1 + return nil + } + + var arrayOfGetDeploymentFlags2 []GetDeploymentFlags2 = []GetDeploymentFlags2{} + if err := utils.UnmarshalJSON(data, &arrayOfGetDeploymentFlags2, "", true, true); err == nil { + u.ArrayOfGetDeploymentFlags2 = arrayOfGetDeploymentFlags2 + u.Type = ResponseBodyFlagsTypeArrayOfGetDeploymentFlags2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyFlags", string(data)) +} + +func (u ResponseBodyFlags) MarshalJSON() ([]byte, error) { + if u.GetDeploymentFlags1 != nil { + return utils.MarshalJSON(u.GetDeploymentFlags1, "", true) + } + + if u.ArrayOfGetDeploymentFlags2 != nil { + return utils.MarshalJSON(u.ArrayOfGetDeploymentFlags2, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyFlags: all fields are null") +} + +// GetDeploymentMicrofrontendsApplications - A map of the other applications that are part of this group. Only defined on the default application. The field is set after deployments have been created, so can be undefined, but should be there for a successful deployment. +type GetDeploymentMicrofrontendsApplications struct { + // This is the production alias, it will always show the most up to date of each application. + ProductionHost string `json:"productionHost"` + // Use the fixed deploymentAlias and deploymentHost so that the microfrontend preview stays in sync with the deployment. These are only present for mono-repos when a single commit creates multiple deployments. If they are not present, productionHost will be used. + DeploymentAlias *string `json:"deploymentAlias,omitempty"` + DeploymentHost *string `json:"deploymentHost,omitempty"` +} + +func (o *GetDeploymentMicrofrontendsApplications) GetProductionHost() string { + if o == nil { + return "" + } + return o.ProductionHost +} + +func (o *GetDeploymentMicrofrontendsApplications) GetDeploymentAlias() *string { + if o == nil { + return nil + } + return o.DeploymentAlias +} + +func (o *GetDeploymentMicrofrontendsApplications) GetDeploymentHost() *string { + if o == nil { + return nil + } + return o.DeploymentHost +} + +type GetDeploymentMicrofrontends2 struct { + // A map of the other applications that are part of this group. Only defined on the default application. The field is set after deployments have been created, so can be undefined, but should be there for a successful deployment. + Applications map[string]GetDeploymentMicrofrontendsApplications `json:"applications,omitempty"` + IsDefaultApp bool `json:"isDefaultApp"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` + // The group of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` +} + +func (o *GetDeploymentMicrofrontends2) GetApplications() map[string]GetDeploymentMicrofrontendsApplications { + if o == nil { + return nil + } + return o.Applications +} + +func (o *GetDeploymentMicrofrontends2) GetIsDefaultApp() bool { + if o == nil { + return false + } + return o.IsDefaultApp +} + +func (o *GetDeploymentMicrofrontends2) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *GetDeploymentMicrofrontends2) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +type GetDeploymentMicrofrontends1 struct { + // Whether this project is the default application for the microfrontends group. The default application is the one that is used as the top level shell for the microfrontends group and hosts the other microfrontends. + IsDefaultApp *bool `json:"isDefaultApp,omitempty"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` + // The group of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` +} + +func (o *GetDeploymentMicrofrontends1) GetIsDefaultApp() *bool { + if o == nil { + return nil + } + return o.IsDefaultApp +} + +func (o *GetDeploymentMicrofrontends1) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *GetDeploymentMicrofrontends1) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +type ResponseBodyMicrofrontendsType string + +const ( + ResponseBodyMicrofrontendsTypeGetDeploymentMicrofrontends1 ResponseBodyMicrofrontendsType = "getDeployment_microfrontends_1" + ResponseBodyMicrofrontendsTypeGetDeploymentMicrofrontends2 ResponseBodyMicrofrontendsType = "getDeployment_microfrontends_2" +) + +type ResponseBodyMicrofrontends struct { + GetDeploymentMicrofrontends1 *GetDeploymentMicrofrontends1 + GetDeploymentMicrofrontends2 *GetDeploymentMicrofrontends2 + + Type ResponseBodyMicrofrontendsType +} + +func CreateResponseBodyMicrofrontendsGetDeploymentMicrofrontends1(getDeploymentMicrofrontends1 GetDeploymentMicrofrontends1) ResponseBodyMicrofrontends { + typ := ResponseBodyMicrofrontendsTypeGetDeploymentMicrofrontends1 + + return ResponseBodyMicrofrontends{ + GetDeploymentMicrofrontends1: &getDeploymentMicrofrontends1, + Type: typ, + } +} + +func CreateResponseBodyMicrofrontendsGetDeploymentMicrofrontends2(getDeploymentMicrofrontends2 GetDeploymentMicrofrontends2) ResponseBodyMicrofrontends { + typ := ResponseBodyMicrofrontendsTypeGetDeploymentMicrofrontends2 + + return ResponseBodyMicrofrontends{ + GetDeploymentMicrofrontends2: &getDeploymentMicrofrontends2, + Type: typ, + } +} + +func (u *ResponseBodyMicrofrontends) UnmarshalJSON(data []byte) error { + + var getDeploymentMicrofrontends1 GetDeploymentMicrofrontends1 = GetDeploymentMicrofrontends1{} + if err := utils.UnmarshalJSON(data, &getDeploymentMicrofrontends1, "", true, true); err == nil { + u.GetDeploymentMicrofrontends1 = &getDeploymentMicrofrontends1 + u.Type = ResponseBodyMicrofrontendsTypeGetDeploymentMicrofrontends1 + return nil + } + + var getDeploymentMicrofrontends2 GetDeploymentMicrofrontends2 = GetDeploymentMicrofrontends2{} + if err := utils.UnmarshalJSON(data, &getDeploymentMicrofrontends2, "", true, true); err == nil { + u.GetDeploymentMicrofrontends2 = &getDeploymentMicrofrontends2 + u.Type = ResponseBodyMicrofrontendsTypeGetDeploymentMicrofrontends2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyMicrofrontends", string(data)) +} + +func (u ResponseBodyMicrofrontends) MarshalJSON() ([]byte, error) { + if u.GetDeploymentMicrofrontends1 != nil { + return utils.MarshalJSON(u.GetDeploymentMicrofrontends1, "", true) + } + + if u.GetDeploymentMicrofrontends2 != nil { + return utils.MarshalJSON(u.GetDeploymentMicrofrontends2, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyMicrofrontends: all fields are null") +} + +// GetDeploymentResponseBody1 - The deployment including both public and private information +type GetDeploymentResponseBody1 struct { + AliasAssignedAt *ResponseBodyAliasAssignedAt `json:"aliasAssignedAt,omitempty"` + AlwaysRefuseToBuild *bool `json:"alwaysRefuseToBuild,omitempty"` + Build ResponseBodyBuild `json:"build"` + BuildArtifactUrls []string `json:"buildArtifactUrls,omitempty"` + Builds []ResponseBodyBuilds `json:"builds,omitempty"` + Env []string `json:"env"` + InspectorURL *string `json:"inspectorUrl"` + IsInConcurrentBuildsQueue bool `json:"isInConcurrentBuildsQueue"` + IsInSystemBuildsQueue bool `json:"isInSystemBuildsQueue"` + ProjectSettings ResponseBodyProjectSettings `json:"projectSettings"` + ReadyStateReason *string `json:"readyStateReason,omitempty"` + Integrations *ResponseBodyIntegrations `json:"integrations,omitempty"` + Images *ResponseBodyImages `json:"images,omitempty"` + Alias []string `json:"alias,omitempty"` + AliasAssigned bool `json:"aliasAssigned"` + BootedAt float64 `json:"bootedAt"` + BuildingAt float64 `json:"buildingAt"` + BuildSkipped bool `json:"buildSkipped"` + Creator ResponseBodyCreator `json:"creator"` + InitReadyAt *float64 `json:"initReadyAt,omitempty"` + IsFirstBranchDeployment *bool `json:"isFirstBranchDeployment,omitempty"` + Lambdas []GetDeploymentResponseBodyLambdas `json:"lambdas,omitempty"` + Public bool `json:"public"` + Ready *float64 `json:"ready,omitempty"` + Status ResponseBodyStatus `json:"status"` + Team *GetDeploymentResponseBodyTeam `json:"team,omitempty"` + UserAliases []string `json:"userAliases,omitempty"` + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + TtyBuildLogs *bool `json:"ttyBuildLogs,omitempty"` + CustomEnvironment *GetDeploymentResponseBodyCustomEnvironment `json:"customEnvironment,omitempty"` + AliasWarning *GetDeploymentResponseBodyAliasWarning `json:"aliasWarning,omitempty"` + ID string `json:"id"` + Type ResponseBodyType `json:"type"` + CreatedAt float64 `json:"createdAt"` + Name string `json:"name"` + ReadyState ResponseBodyReadyState `json:"readyState"` + AliasError *ResponseBodyAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + // applies to custom domains only, defaults to `true` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BuildErrorAt *float64 `json:"buildErrorAt,omitempty"` + ChecksState *ResponseBodyChecksState `json:"checksState,omitempty"` + ChecksConclusion *ResponseBodyChecksConclusion `json:"checksConclusion,omitempty"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + // Computed field that is only available for deployments with a microfrontend configuration. + DefaultRoute *string `json:"defaultRoute,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorLink *string `json:"errorLink,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ErrorStep *string `json:"errorStep,omitempty"` + // Since November 2023 this field defines a set of regions that we will deploy the lambda to passively Lambdas will be deployed to these regions but only invoked if all of the primary `regions` are marked as out of service + PassiveRegions []string `json:"passiveRegions,omitempty"` + GitSource *GetDeploymentResponseBodyGitSource `json:"gitSource,omitempty"` + Meta map[string]string `json:"meta"` + OriginCacheRegion *string `json:"originCacheRegion,omitempty"` + Project *ResponseBodyProject `json:"project,omitempty"` + // Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic + ReadySubstate *ResponseBodyReadySubstate `json:"readySubstate,omitempty"` + Regions []string `json:"regions"` + SoftDeletedByRetention *bool `json:"softDeletedByRetention,omitempty"` + Source *ResponseBodySource `json:"source,omitempty"` + Target *ResponseBodyTarget `json:"target,omitempty"` + UndeletedAt *float64 `json:"undeletedAt,omitempty"` + URL string `json:"url"` + Version float64 `json:"version"` + OidcTokenClaims *ResponseBodyOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + ProjectID string `json:"projectId"` + Plan ResponseBodyPlan `json:"plan"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedIn string `json:"createdIn"` + Crons []ResponseBodyCrons `json:"crons,omitempty"` + Functions map[string]ResponseBodyFunctions `json:"functions,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OwnerID string `json:"ownerId"` + // Since November 2023 this field defines a Secure Compute network that will only be used to deploy passive lambdas to (as in passiveRegions) + PassiveConnectConfigurationID *string `json:"passiveConnectConfigurationId,omitempty"` + Routes []ResponseBodyRoutes `json:"routes"` + GitRepo *ResponseBodyGitRepo `json:"gitRepo,omitempty"` + Flags *ResponseBodyFlags `json:"flags,omitempty"` + Microfrontends *ResponseBodyMicrofrontends `json:"microfrontends,omitempty"` +} + +func (o *GetDeploymentResponseBody1) GetAliasAssignedAt() *ResponseBodyAliasAssignedAt { + if o == nil { + return nil + } + return o.AliasAssignedAt +} + +func (o *GetDeploymentResponseBody1) GetAlwaysRefuseToBuild() *bool { + if o == nil { + return nil + } + return o.AlwaysRefuseToBuild +} + +func (o *GetDeploymentResponseBody1) GetBuild() ResponseBodyBuild { + if o == nil { + return ResponseBodyBuild{} + } + return o.Build +} + +func (o *GetDeploymentResponseBody1) GetBuildArtifactUrls() []string { + if o == nil { + return nil + } + return o.BuildArtifactUrls +} + +func (o *GetDeploymentResponseBody1) GetBuilds() []ResponseBodyBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *GetDeploymentResponseBody1) GetEnv() []string { + if o == nil { + return []string{} + } + return o.Env +} + +func (o *GetDeploymentResponseBody1) GetInspectorURL() *string { + if o == nil { + return nil + } + return o.InspectorURL +} + +func (o *GetDeploymentResponseBody1) GetIsInConcurrentBuildsQueue() bool { + if o == nil { + return false + } + return o.IsInConcurrentBuildsQueue +} + +func (o *GetDeploymentResponseBody1) GetIsInSystemBuildsQueue() bool { + if o == nil { + return false + } + return o.IsInSystemBuildsQueue +} + +func (o *GetDeploymentResponseBody1) GetProjectSettings() ResponseBodyProjectSettings { + if o == nil { + return ResponseBodyProjectSettings{} + } + return o.ProjectSettings +} + +func (o *GetDeploymentResponseBody1) GetReadyStateReason() *string { + if o == nil { + return nil + } + return o.ReadyStateReason +} + +func (o *GetDeploymentResponseBody1) GetIntegrations() *ResponseBodyIntegrations { + if o == nil { + return nil + } + return o.Integrations +} + +func (o *GetDeploymentResponseBody1) GetImages() *ResponseBodyImages { + if o == nil { + return nil + } + return o.Images +} + +func (o *GetDeploymentResponseBody1) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *GetDeploymentResponseBody1) GetAliasAssigned() bool { + if o == nil { + return false + } + return o.AliasAssigned +} + +func (o *GetDeploymentResponseBody1) GetBootedAt() float64 { + if o == nil { + return 0.0 + } + return o.BootedAt +} + +func (o *GetDeploymentResponseBody1) GetBuildingAt() float64 { + if o == nil { + return 0.0 + } + return o.BuildingAt +} + +func (o *GetDeploymentResponseBody1) GetBuildSkipped() bool { + if o == nil { + return false + } + return o.BuildSkipped +} + +func (o *GetDeploymentResponseBody1) GetCreator() ResponseBodyCreator { + if o == nil { + return ResponseBodyCreator{} + } + return o.Creator +} + +func (o *GetDeploymentResponseBody1) GetInitReadyAt() *float64 { + if o == nil { + return nil + } + return o.InitReadyAt +} + +func (o *GetDeploymentResponseBody1) GetIsFirstBranchDeployment() *bool { + if o == nil { + return nil + } + return o.IsFirstBranchDeployment +} + +func (o *GetDeploymentResponseBody1) GetLambdas() []GetDeploymentResponseBodyLambdas { + if o == nil { + return nil + } + return o.Lambdas +} + +func (o *GetDeploymentResponseBody1) GetPublic() bool { + if o == nil { + return false + } + return o.Public +} + +func (o *GetDeploymentResponseBody1) GetReady() *float64 { + if o == nil { + return nil + } + return o.Ready +} + +func (o *GetDeploymentResponseBody1) GetStatus() ResponseBodyStatus { + if o == nil { + return ResponseBodyStatus("") + } + return o.Status +} + +func (o *GetDeploymentResponseBody1) GetTeam() *GetDeploymentResponseBodyTeam { + if o == nil { + return nil + } + return o.Team +} + +func (o *GetDeploymentResponseBody1) GetUserAliases() []string { + if o == nil { + return nil + } + return o.UserAliases +} + +func (o *GetDeploymentResponseBody1) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *GetDeploymentResponseBody1) GetTtyBuildLogs() *bool { + if o == nil { + return nil + } + return o.TtyBuildLogs +} + +func (o *GetDeploymentResponseBody1) GetCustomEnvironment() *GetDeploymentResponseBodyCustomEnvironment { + if o == nil { + return nil + } + return o.CustomEnvironment +} + +func (o *GetDeploymentResponseBody1) GetAliasWarning() *GetDeploymentResponseBodyAliasWarning { + if o == nil { + return nil + } + return o.AliasWarning +} + +func (o *GetDeploymentResponseBody1) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDeploymentResponseBody1) GetType() ResponseBodyType { + if o == nil { + return ResponseBodyType("") + } + return o.Type +} + +func (o *GetDeploymentResponseBody1) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetDeploymentResponseBody1) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetDeploymentResponseBody1) GetReadyState() ResponseBodyReadyState { + if o == nil { + return ResponseBodyReadyState("") + } + return o.ReadyState +} + +func (o *GetDeploymentResponseBody1) GetAliasError() *ResponseBodyAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *GetDeploymentResponseBody1) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *GetDeploymentResponseBody1) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *GetDeploymentResponseBody1) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *GetDeploymentResponseBody1) GetBuildErrorAt() *float64 { + if o == nil { + return nil + } + return o.BuildErrorAt +} + +func (o *GetDeploymentResponseBody1) GetChecksState() *ResponseBodyChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *GetDeploymentResponseBody1) GetChecksConclusion() *ResponseBodyChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *GetDeploymentResponseBody1) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetDeploymentResponseBody1) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *GetDeploymentResponseBody1) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *GetDeploymentResponseBody1) GetErrorCode() *string { + if o == nil { + return nil + } + return o.ErrorCode +} + +func (o *GetDeploymentResponseBody1) GetErrorLink() *string { + if o == nil { + return nil + } + return o.ErrorLink +} + +func (o *GetDeploymentResponseBody1) GetErrorMessage() *string { + if o == nil { + return nil + } + return o.ErrorMessage +} + +func (o *GetDeploymentResponseBody1) GetErrorStep() *string { + if o == nil { + return nil + } + return o.ErrorStep +} + +func (o *GetDeploymentResponseBody1) GetPassiveRegions() []string { + if o == nil { + return nil + } + return o.PassiveRegions +} + +func (o *GetDeploymentResponseBody1) GetGitSource() *GetDeploymentResponseBodyGitSource { + if o == nil { + return nil + } + return o.GitSource +} + +func (o *GetDeploymentResponseBody1) GetMeta() map[string]string { + if o == nil { + return map[string]string{} + } + return o.Meta +} + +func (o *GetDeploymentResponseBody1) GetOriginCacheRegion() *string { + if o == nil { + return nil + } + return o.OriginCacheRegion +} + +func (o *GetDeploymentResponseBody1) GetProject() *ResponseBodyProject { + if o == nil { + return nil + } + return o.Project +} + +func (o *GetDeploymentResponseBody1) GetReadySubstate() *ResponseBodyReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *GetDeploymentResponseBody1) GetRegions() []string { + if o == nil { + return []string{} + } + return o.Regions +} + +func (o *GetDeploymentResponseBody1) GetSoftDeletedByRetention() *bool { + if o == nil { + return nil + } + return o.SoftDeletedByRetention +} + +func (o *GetDeploymentResponseBody1) GetSource() *ResponseBodySource { + if o == nil { + return nil + } + return o.Source +} + +func (o *GetDeploymentResponseBody1) GetTarget() *ResponseBodyTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetDeploymentResponseBody1) GetUndeletedAt() *float64 { + if o == nil { + return nil + } + return o.UndeletedAt +} + +func (o *GetDeploymentResponseBody1) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetDeploymentResponseBody1) GetVersion() float64 { + if o == nil { + return 0.0 + } + return o.Version +} + +func (o *GetDeploymentResponseBody1) GetOidcTokenClaims() *ResponseBodyOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *GetDeploymentResponseBody1) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *GetDeploymentResponseBody1) GetPlan() ResponseBodyPlan { + if o == nil { + return ResponseBodyPlan("") + } + return o.Plan +} + +func (o *GetDeploymentResponseBody1) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *GetDeploymentResponseBody1) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *GetDeploymentResponseBody1) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *GetDeploymentResponseBody1) GetCrons() []ResponseBodyCrons { + if o == nil { + return nil + } + return o.Crons +} + +func (o *GetDeploymentResponseBody1) GetFunctions() map[string]ResponseBodyFunctions { + if o == nil { + return nil + } + return o.Functions +} + +func (o *GetDeploymentResponseBody1) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *GetDeploymentResponseBody1) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetDeploymentResponseBody1) GetPassiveConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.PassiveConnectConfigurationID +} + +func (o *GetDeploymentResponseBody1) GetRoutes() []ResponseBodyRoutes { + if o == nil { + return nil + } + return o.Routes +} + +func (o *GetDeploymentResponseBody1) GetGitRepo() *ResponseBodyGitRepo { + if o == nil { + return nil + } + return o.GitRepo +} + +func (o *GetDeploymentResponseBody1) GetFlags() *ResponseBodyFlags { + if o == nil { + return nil + } + return o.Flags +} + +func (o *GetDeploymentResponseBody1) GetMicrofrontends() *ResponseBodyMicrofrontends { + if o == nil { + return nil + } + return o.Microfrontends +} + +type GetDeploymentResponseBodyUnionType string + +const ( + GetDeploymentResponseBodyUnionTypeGetDeploymentResponseBody1 GetDeploymentResponseBodyUnionType = "getDeployment_responseBody_1" + GetDeploymentResponseBodyUnionTypeGetDeploymentResponseBody2 GetDeploymentResponseBodyUnionType = "getDeployment_responseBody_2" +) + +// GetDeploymentResponseBody - The deployment including only public information +// The deployment including both public and private information +type GetDeploymentResponseBody struct { + GetDeploymentResponseBody1 *GetDeploymentResponseBody1 + GetDeploymentResponseBody2 *GetDeploymentResponseBody2 + + Type GetDeploymentResponseBodyUnionType +} + +func CreateGetDeploymentResponseBodyGetDeploymentResponseBody1(getDeploymentResponseBody1 GetDeploymentResponseBody1) GetDeploymentResponseBody { + typ := GetDeploymentResponseBodyUnionTypeGetDeploymentResponseBody1 + + return GetDeploymentResponseBody{ + GetDeploymentResponseBody1: &getDeploymentResponseBody1, + Type: typ, + } +} + +func CreateGetDeploymentResponseBodyGetDeploymentResponseBody2(getDeploymentResponseBody2 GetDeploymentResponseBody2) GetDeploymentResponseBody { + typ := GetDeploymentResponseBodyUnionTypeGetDeploymentResponseBody2 + + return GetDeploymentResponseBody{ + GetDeploymentResponseBody2: &getDeploymentResponseBody2, + Type: typ, + } +} + +func (u *GetDeploymentResponseBody) UnmarshalJSON(data []byte) error { + + var getDeploymentResponseBody2 GetDeploymentResponseBody2 = GetDeploymentResponseBody2{} + if err := utils.UnmarshalJSON(data, &getDeploymentResponseBody2, "", true, true); err == nil { + u.GetDeploymentResponseBody2 = &getDeploymentResponseBody2 + u.Type = GetDeploymentResponseBodyUnionTypeGetDeploymentResponseBody2 + return nil + } + + var getDeploymentResponseBody1 GetDeploymentResponseBody1 = GetDeploymentResponseBody1{} + if err := utils.UnmarshalJSON(data, &getDeploymentResponseBody1, "", true, true); err == nil { + u.GetDeploymentResponseBody1 = &getDeploymentResponseBody1 + u.Type = GetDeploymentResponseBodyUnionTypeGetDeploymentResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentResponseBody", string(data)) +} + +func (u GetDeploymentResponseBody) MarshalJSON() ([]byte, error) { + if u.GetDeploymentResponseBody1 != nil { + return utils.MarshalJSON(u.GetDeploymentResponseBody1, "", true) + } + + if u.GetDeploymentResponseBody2 != nil { + return utils.MarshalJSON(u.GetDeploymentResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentResponseBody: all fields are null") +} + +type GetDeploymentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The deployment including only public information + // The deployment including both public and private information + OneOf *GetDeploymentResponseBody +} + +func (o *GetDeploymentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetDeploymentResponse) GetOneOf() *GetDeploymentResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getdeploymentevents.go b/src/__tests__/mockserver/internal/sdk/models/operations/getdeploymentevents.go new file mode 100644 index 00000000..84cc1085 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getdeploymentevents.go @@ -0,0 +1,233 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// Direction - Order of the returned events based on the timestamp. +type Direction string + +const ( + DirectionBackward Direction = "backward" + DirectionForward Direction = "forward" +) + +func (e Direction) ToPointer() *Direction { + return &e +} +func (e *Direction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "backward": + fallthrough + case "forward": + *e = Direction(v) + return nil + default: + return fmt.Errorf("invalid value for Direction: %v", v) + } +} + +type StatusCodeType string + +const ( + StatusCodeTypeNumber StatusCodeType = "number" + StatusCodeTypeStr StatusCodeType = "str" +) + +// StatusCode - HTTP status code range to filter events by. +type StatusCode struct { + Number *float64 + Str *string + + Type StatusCodeType +} + +func CreateStatusCodeNumber(number float64) StatusCode { + typ := StatusCodeTypeNumber + + return StatusCode{ + Number: &number, + Type: typ, + } +} + +func CreateStatusCodeStr(str string) StatusCode { + typ := StatusCodeTypeStr + + return StatusCode{ + Str: &str, + Type: typ, + } +} + +func (u *StatusCode) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = StatusCodeTypeNumber + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = StatusCodeTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for StatusCode", string(data)) +} + +func (u StatusCode) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + return nil, errors.New("could not marshal union type StatusCode: all fields are null") +} + +type GetDeploymentEventsRequest struct { + // The unique identifier or hostname of the deployment. + IDOrURL string `pathParam:"style=simple,explode=false,name=idOrUrl"` + // Order of the returned events based on the timestamp. + Direction *Direction `default:"forward" queryParam:"style=form,explode=true,name=direction"` + // When enabled, this endpoint will return live events as they happen. + Follow *float64 `queryParam:"style=form,explode=true,name=follow"` + // Maximum number of events to return. Provide `-1` to return all available logs. + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Deployment build ID. + Name *string `queryParam:"style=form,explode=true,name=name"` + // Timestamp for when build logs should be pulled from. + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Timestamp for when the build logs should be pulled up until. + Until *float64 `queryParam:"style=form,explode=true,name=until"` + // HTTP status code range to filter events by. + StatusCode *StatusCode `queryParam:"style=form,explode=true,name=statusCode"` + Delimiter *float64 `queryParam:"style=form,explode=true,name=delimiter"` + Builds *float64 `queryParam:"style=form,explode=true,name=builds"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (g GetDeploymentEventsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetDeploymentEventsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetDeploymentEventsRequest) GetIDOrURL() string { + if o == nil { + return "" + } + return o.IDOrURL +} + +func (o *GetDeploymentEventsRequest) GetDirection() *Direction { + if o == nil { + return nil + } + return o.Direction +} + +func (o *GetDeploymentEventsRequest) GetFollow() *float64 { + if o == nil { + return nil + } + return o.Follow +} + +func (o *GetDeploymentEventsRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetDeploymentEventsRequest) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *GetDeploymentEventsRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetDeploymentEventsRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *GetDeploymentEventsRequest) GetStatusCode() *StatusCode { + if o == nil { + return nil + } + return o.StatusCode +} + +func (o *GetDeploymentEventsRequest) GetDelimiter() *float64 { + if o == nil { + return nil + } + return o.Delimiter +} + +func (o *GetDeploymentEventsRequest) GetBuilds() *float64 { + if o == nil { + return nil + } + return o.Builds +} + +func (o *GetDeploymentEventsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDeploymentEventsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetDeploymentEventsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *GetDeploymentEventsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getdeploymentfilecontents.go b/src/__tests__/mockserver/internal/sdk/models/operations/getdeploymentfilecontents.go new file mode 100644 index 00000000..5db2b4a7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getdeploymentfilecontents.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetDeploymentFileContentsRequest struct { + // The unique deployment identifier + ID string `pathParam:"style=simple,explode=false,name=id"` + // The unique file identifier + FileID string `pathParam:"style=simple,explode=false,name=fileId"` + // Path to the file to fetch (only for Git deployments) + Path *string `queryParam:"style=form,explode=true,name=path"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetDeploymentFileContentsRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDeploymentFileContentsRequest) GetFileID() string { + if o == nil { + return "" + } + return o.FileID +} + +func (o *GetDeploymentFileContentsRequest) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +func (o *GetDeploymentFileContentsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDeploymentFileContentsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetDeploymentFileContentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *GetDeploymentFileContentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getdeployments.go b/src/__tests__/mockserver/internal/sdk/models/operations/getdeployments.go new file mode 100644 index 00000000..fc2fdb94 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getdeployments.go @@ -0,0 +1,1354 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetDeploymentsRequest struct { + // Name of the deployment. + App *string `queryParam:"style=form,explode=true,name=app"` + // Gets the deployment created after this Date timestamp. (default: current time) + From *float64 `queryParam:"style=form,explode=true,name=from"` + // Maximum number of deployments to list from a request. + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Filter deployments from the given ID or name. + ProjectID *string `queryParam:"style=form,explode=true,name=projectId"` + // Filter deployments based on the environment. + Target *string `queryParam:"style=form,explode=true,name=target"` + // Gets the deployment created before this Date timestamp. (default: current time) + To *float64 `queryParam:"style=form,explode=true,name=to"` + // Filter out deployments based on users who have created the deployment. + Users *string `queryParam:"style=form,explode=true,name=users"` + // Get Deployments created after this JavaScript timestamp. + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Get Deployments created before this JavaScript timestamp. + Until *float64 `queryParam:"style=form,explode=true,name=until"` + // Filter deployments based on their state (`BUILDING`, `ERROR`, `INITIALIZING`, `QUEUED`, `READY`, `CANCELED`) + State *string `queryParam:"style=form,explode=true,name=state"` + // Filter deployments based on their rollback candidacy + RollbackCandidate *bool `queryParam:"style=form,explode=true,name=rollbackCandidate"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetDeploymentsRequest) GetApp() *string { + if o == nil { + return nil + } + return o.App +} + +func (o *GetDeploymentsRequest) GetFrom() *float64 { + if o == nil { + return nil + } + return o.From +} + +func (o *GetDeploymentsRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetDeploymentsRequest) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetDeploymentsRequest) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetDeploymentsRequest) GetTo() *float64 { + if o == nil { + return nil + } + return o.To +} + +func (o *GetDeploymentsRequest) GetUsers() *string { + if o == nil { + return nil + } + return o.Users +} + +func (o *GetDeploymentsRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetDeploymentsRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *GetDeploymentsRequest) GetState() *string { + if o == nil { + return nil + } + return o.State +} + +func (o *GetDeploymentsRequest) GetRollbackCandidate() *bool { + if o == nil { + return nil + } + return o.RollbackCandidate +} + +func (o *GetDeploymentsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDeploymentsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetDeploymentsSource - The source of the deployment. +type GetDeploymentsSource string + +const ( + GetDeploymentsSourceAPITriggerGitDeploy GetDeploymentsSource = "api-trigger-git-deploy" + GetDeploymentsSourceCli GetDeploymentsSource = "cli" + GetDeploymentsSourceCloneRepo GetDeploymentsSource = "clone/repo" + GetDeploymentsSourceGit GetDeploymentsSource = "git" + GetDeploymentsSourceImport GetDeploymentsSource = "import" + GetDeploymentsSourceImportRepo GetDeploymentsSource = "import/repo" + GetDeploymentsSourceRedeploy GetDeploymentsSource = "redeploy" + GetDeploymentsSourceV0Web GetDeploymentsSource = "v0-web" +) + +func (e GetDeploymentsSource) ToPointer() *GetDeploymentsSource { + return &e +} +func (e *GetDeploymentsSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "api-trigger-git-deploy": + fallthrough + case "cli": + fallthrough + case "clone/repo": + fallthrough + case "git": + fallthrough + case "import": + fallthrough + case "import/repo": + fallthrough + case "redeploy": + fallthrough + case "v0-web": + *e = GetDeploymentsSource(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsSource: %v", v) + } +} + +// GetDeploymentsState - In which state is the deployment. +type GetDeploymentsState string + +const ( + GetDeploymentsStateBuilding GetDeploymentsState = "BUILDING" + GetDeploymentsStateError GetDeploymentsState = "ERROR" + GetDeploymentsStateInitializing GetDeploymentsState = "INITIALIZING" + GetDeploymentsStateQueued GetDeploymentsState = "QUEUED" + GetDeploymentsStateReady GetDeploymentsState = "READY" + GetDeploymentsStateCanceled GetDeploymentsState = "CANCELED" + GetDeploymentsStateDeleted GetDeploymentsState = "DELETED" +) + +func (e GetDeploymentsState) ToPointer() *GetDeploymentsState { + return &e +} +func (e *GetDeploymentsState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + fallthrough + case "DELETED": + *e = GetDeploymentsState(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsState: %v", v) + } +} + +// GetDeploymentsReadyState - In which state is the deployment. +type GetDeploymentsReadyState string + +const ( + GetDeploymentsReadyStateBuilding GetDeploymentsReadyState = "BUILDING" + GetDeploymentsReadyStateError GetDeploymentsReadyState = "ERROR" + GetDeploymentsReadyStateInitializing GetDeploymentsReadyState = "INITIALIZING" + GetDeploymentsReadyStateQueued GetDeploymentsReadyState = "QUEUED" + GetDeploymentsReadyStateReady GetDeploymentsReadyState = "READY" + GetDeploymentsReadyStateCanceled GetDeploymentsReadyState = "CANCELED" + GetDeploymentsReadyStateDeleted GetDeploymentsReadyState = "DELETED" +) + +func (e GetDeploymentsReadyState) ToPointer() *GetDeploymentsReadyState { + return &e +} +func (e *GetDeploymentsReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + fallthrough + case "DELETED": + *e = GetDeploymentsReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsReadyState: %v", v) + } +} + +// GetDeploymentsType - The type of the deployment. +type GetDeploymentsType string + +const ( + GetDeploymentsTypeLambdas GetDeploymentsType = "LAMBDAS" +) + +func (e GetDeploymentsType) ToPointer() *GetDeploymentsType { + return &e +} +func (e *GetDeploymentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = GetDeploymentsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsType: %v", v) + } +} + +// GetDeploymentsCreator - Metadata information of the user who created the deployment. +type GetDeploymentsCreator struct { + // The unique identifier of the user. + UID string `json:"uid"` + // The email address of the user. + Email *string `json:"email,omitempty"` + // The username of the user. + Username *string `json:"username,omitempty"` + // The GitHub login of the user. + GithubLogin *string `json:"githubLogin,omitempty"` + // The GitLab login of the user. + GitlabLogin *string `json:"gitlabLogin,omitempty"` +} + +func (o *GetDeploymentsCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *GetDeploymentsCreator) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *GetDeploymentsCreator) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +func (o *GetDeploymentsCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *GetDeploymentsCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +// GetDeploymentsTarget - On which environment has the deployment been deployed to. +type GetDeploymentsTarget string + +const ( + GetDeploymentsTargetProduction GetDeploymentsTarget = "production" + GetDeploymentsTargetStaging GetDeploymentsTarget = "staging" +) + +func (e GetDeploymentsTarget) ToPointer() *GetDeploymentsTarget { + return &e +} +func (e *GetDeploymentsTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "staging": + *e = GetDeploymentsTarget(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsTarget: %v", v) + } +} + +// GetDeploymentsAliasError - An error object in case aliasing of the deployment failed. +type GetDeploymentsAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *GetDeploymentsAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *GetDeploymentsAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type GetDeploymentsAliasAssignedType string + +const ( + GetDeploymentsAliasAssignedTypeNumber GetDeploymentsAliasAssignedType = "number" + GetDeploymentsAliasAssignedTypeBoolean GetDeploymentsAliasAssignedType = "boolean" +) + +type GetDeploymentsAliasAssigned struct { + Number *float64 + Boolean *bool + + Type GetDeploymentsAliasAssignedType +} + +func CreateGetDeploymentsAliasAssignedNumber(number float64) GetDeploymentsAliasAssigned { + typ := GetDeploymentsAliasAssignedTypeNumber + + return GetDeploymentsAliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateGetDeploymentsAliasAssignedBoolean(boolean bool) GetDeploymentsAliasAssigned { + typ := GetDeploymentsAliasAssignedTypeBoolean + + return GetDeploymentsAliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *GetDeploymentsAliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetDeploymentsAliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = GetDeploymentsAliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetDeploymentsAliasAssigned", string(data)) +} + +func (u GetDeploymentsAliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type GetDeploymentsAliasAssigned: all fields are null") +} + +// GetDeploymentsReadySubstate - Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic +type GetDeploymentsReadySubstate string + +const ( + GetDeploymentsReadySubstateStaged GetDeploymentsReadySubstate = "STAGED" + GetDeploymentsReadySubstatePromoted GetDeploymentsReadySubstate = "PROMOTED" +) + +func (e GetDeploymentsReadySubstate) ToPointer() *GetDeploymentsReadySubstate { + return &e +} +func (e *GetDeploymentsReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = GetDeploymentsReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsReadySubstate: %v", v) + } +} + +// GetDeploymentsChecksState - State of all registered checks +type GetDeploymentsChecksState string + +const ( + GetDeploymentsChecksStateRegistered GetDeploymentsChecksState = "registered" + GetDeploymentsChecksStateRunning GetDeploymentsChecksState = "running" + GetDeploymentsChecksStateCompleted GetDeploymentsChecksState = "completed" +) + +func (e GetDeploymentsChecksState) ToPointer() *GetDeploymentsChecksState { + return &e +} +func (e *GetDeploymentsChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = GetDeploymentsChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsChecksState: %v", v) + } +} + +// GetDeploymentsChecksConclusion - Conclusion for checks +type GetDeploymentsChecksConclusion string + +const ( + GetDeploymentsChecksConclusionSucceeded GetDeploymentsChecksConclusion = "succeeded" + GetDeploymentsChecksConclusionFailed GetDeploymentsChecksConclusion = "failed" + GetDeploymentsChecksConclusionSkipped GetDeploymentsChecksConclusion = "skipped" + GetDeploymentsChecksConclusionCanceled GetDeploymentsChecksConclusion = "canceled" +) + +func (e GetDeploymentsChecksConclusion) ToPointer() *GetDeploymentsChecksConclusion { + return &e +} +func (e *GetDeploymentsChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = GetDeploymentsChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsChecksConclusion: %v", v) + } +} + +type GetDeploymentsFramework string + +const ( + GetDeploymentsFrameworkBlitzjs GetDeploymentsFramework = "blitzjs" + GetDeploymentsFrameworkNextjs GetDeploymentsFramework = "nextjs" + GetDeploymentsFrameworkGatsby GetDeploymentsFramework = "gatsby" + GetDeploymentsFrameworkRemix GetDeploymentsFramework = "remix" + GetDeploymentsFrameworkAstro GetDeploymentsFramework = "astro" + GetDeploymentsFrameworkHexo GetDeploymentsFramework = "hexo" + GetDeploymentsFrameworkEleventy GetDeploymentsFramework = "eleventy" + GetDeploymentsFrameworkDocusaurus2 GetDeploymentsFramework = "docusaurus-2" + GetDeploymentsFrameworkDocusaurus GetDeploymentsFramework = "docusaurus" + GetDeploymentsFrameworkPreact GetDeploymentsFramework = "preact" + GetDeploymentsFrameworkSolidstart1 GetDeploymentsFramework = "solidstart-1" + GetDeploymentsFrameworkSolidstart GetDeploymentsFramework = "solidstart" + GetDeploymentsFrameworkDojo GetDeploymentsFramework = "dojo" + GetDeploymentsFrameworkEmber GetDeploymentsFramework = "ember" + GetDeploymentsFrameworkVue GetDeploymentsFramework = "vue" + GetDeploymentsFrameworkScully GetDeploymentsFramework = "scully" + GetDeploymentsFrameworkIonicAngular GetDeploymentsFramework = "ionic-angular" + GetDeploymentsFrameworkAngular GetDeploymentsFramework = "angular" + GetDeploymentsFrameworkPolymer GetDeploymentsFramework = "polymer" + GetDeploymentsFrameworkSvelte GetDeploymentsFramework = "svelte" + GetDeploymentsFrameworkSveltekit GetDeploymentsFramework = "sveltekit" + GetDeploymentsFrameworkSveltekit1 GetDeploymentsFramework = "sveltekit-1" + GetDeploymentsFrameworkIonicReact GetDeploymentsFramework = "ionic-react" + GetDeploymentsFrameworkCreateReactApp GetDeploymentsFramework = "create-react-app" + GetDeploymentsFrameworkGridsome GetDeploymentsFramework = "gridsome" + GetDeploymentsFrameworkUmijs GetDeploymentsFramework = "umijs" + GetDeploymentsFrameworkSapper GetDeploymentsFramework = "sapper" + GetDeploymentsFrameworkSaber GetDeploymentsFramework = "saber" + GetDeploymentsFrameworkStencil GetDeploymentsFramework = "stencil" + GetDeploymentsFrameworkNuxtjs GetDeploymentsFramework = "nuxtjs" + GetDeploymentsFrameworkRedwoodjs GetDeploymentsFramework = "redwoodjs" + GetDeploymentsFrameworkHugo GetDeploymentsFramework = "hugo" + GetDeploymentsFrameworkJekyll GetDeploymentsFramework = "jekyll" + GetDeploymentsFrameworkBrunch GetDeploymentsFramework = "brunch" + GetDeploymentsFrameworkMiddleman GetDeploymentsFramework = "middleman" + GetDeploymentsFrameworkZola GetDeploymentsFramework = "zola" + GetDeploymentsFrameworkHydrogen GetDeploymentsFramework = "hydrogen" + GetDeploymentsFrameworkVite GetDeploymentsFramework = "vite" + GetDeploymentsFrameworkVitepress GetDeploymentsFramework = "vitepress" + GetDeploymentsFrameworkVuepress GetDeploymentsFramework = "vuepress" + GetDeploymentsFrameworkParcel GetDeploymentsFramework = "parcel" + GetDeploymentsFrameworkFasthtml GetDeploymentsFramework = "fasthtml" + GetDeploymentsFrameworkSanityV3 GetDeploymentsFramework = "sanity-v3" + GetDeploymentsFrameworkSanity GetDeploymentsFramework = "sanity" + GetDeploymentsFrameworkStorybook GetDeploymentsFramework = "storybook" +) + +func (e GetDeploymentsFramework) ToPointer() *GetDeploymentsFramework { + return &e +} +func (e *GetDeploymentsFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = GetDeploymentsFramework(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsFramework: %v", v) + } +} + +type GetDeploymentsNodeVersion string + +const ( + GetDeploymentsNodeVersionTwentyTwoX GetDeploymentsNodeVersion = "22.x" + GetDeploymentsNodeVersionTwentyX GetDeploymentsNodeVersion = "20.x" + GetDeploymentsNodeVersionEighteenX GetDeploymentsNodeVersion = "18.x" + GetDeploymentsNodeVersionSixteenX GetDeploymentsNodeVersion = "16.x" + GetDeploymentsNodeVersionFourteenX GetDeploymentsNodeVersion = "14.x" + GetDeploymentsNodeVersionTwelveX GetDeploymentsNodeVersion = "12.x" + GetDeploymentsNodeVersionTenX GetDeploymentsNodeVersion = "10.x" + GetDeploymentsNodeVersionEight10X GetDeploymentsNodeVersion = "8.10.x" +) + +func (e GetDeploymentsNodeVersion) ToPointer() *GetDeploymentsNodeVersion { + return &e +} +func (e *GetDeploymentsNodeVersion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "22.x": + fallthrough + case "20.x": + fallthrough + case "18.x": + fallthrough + case "16.x": + fallthrough + case "14.x": + fallthrough + case "12.x": + fallthrough + case "10.x": + fallthrough + case "8.10.x": + *e = GetDeploymentsNodeVersion(v) + return nil + default: + return fmt.Errorf("invalid value for GetDeploymentsNodeVersion: %v", v) + } +} + +type GetDeploymentsSpeedInsights struct { + ID string `json:"id"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` + PaidAt *float64 `json:"paidAt,omitempty"` +} + +func (o *GetDeploymentsSpeedInsights) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDeploymentsSpeedInsights) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *GetDeploymentsSpeedInsights) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetDeploymentsSpeedInsights) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *GetDeploymentsSpeedInsights) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +func (o *GetDeploymentsSpeedInsights) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +type GetDeploymentsWebAnalytics struct { + ID string `json:"id"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` +} + +func (o *GetDeploymentsWebAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDeploymentsWebAnalytics) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetDeploymentsWebAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *GetDeploymentsWebAnalytics) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *GetDeploymentsWebAnalytics) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +// GetDeploymentsGitComments - Since June '23 +type GetDeploymentsGitComments struct { + // Whether the Vercel bot should comment on PRs + OnPullRequest bool `json:"onPullRequest"` + // Whether the Vercel bot should comment on commits + OnCommit bool `json:"onCommit"` +} + +func (o *GetDeploymentsGitComments) GetOnPullRequest() bool { + if o == nil { + return false + } + return o.OnPullRequest +} + +func (o *GetDeploymentsGitComments) GetOnCommit() bool { + if o == nil { + return false + } + return o.OnCommit +} + +// GetDeploymentsProjectSettings - The project settings which was used for this deployment +type GetDeploymentsProjectSettings struct { + Framework *GetDeploymentsFramework `json:"framework,omitempty"` + GitForkProtection *bool `json:"gitForkProtection,omitempty"` + CustomerSupportCodeVisibility *bool `json:"customerSupportCodeVisibility,omitempty"` + GitLFS *bool `json:"gitLFS,omitempty"` + DevCommand *string `json:"devCommand,omitempty"` + InstallCommand *string `json:"installCommand,omitempty"` + BuildCommand *string `json:"buildCommand,omitempty"` + NodeVersion *GetDeploymentsNodeVersion `json:"nodeVersion,omitempty"` + OutputDirectory *string `json:"outputDirectory,omitempty"` + PublicSource *bool `json:"publicSource,omitempty"` + RootDirectory *string `json:"rootDirectory,omitempty"` + ServerlessFunctionRegion *string `json:"serverlessFunctionRegion,omitempty"` + SourceFilesOutsideRootDirectory *bool `json:"sourceFilesOutsideRootDirectory,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + SpeedInsights *GetDeploymentsSpeedInsights `json:"speedInsights,omitempty"` + WebAnalytics *GetDeploymentsWebAnalytics `json:"webAnalytics,omitempty"` + SkipGitConnectDuringLink *bool `json:"skipGitConnectDuringLink,omitempty"` + // Since June '23 + GitComments *GetDeploymentsGitComments `json:"gitComments,omitempty"` +} + +func (o *GetDeploymentsProjectSettings) GetFramework() *GetDeploymentsFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *GetDeploymentsProjectSettings) GetGitForkProtection() *bool { + if o == nil { + return nil + } + return o.GitForkProtection +} + +func (o *GetDeploymentsProjectSettings) GetCustomerSupportCodeVisibility() *bool { + if o == nil { + return nil + } + return o.CustomerSupportCodeVisibility +} + +func (o *GetDeploymentsProjectSettings) GetGitLFS() *bool { + if o == nil { + return nil + } + return o.GitLFS +} + +func (o *GetDeploymentsProjectSettings) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *GetDeploymentsProjectSettings) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *GetDeploymentsProjectSettings) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *GetDeploymentsProjectSettings) GetNodeVersion() *GetDeploymentsNodeVersion { + if o == nil { + return nil + } + return o.NodeVersion +} + +func (o *GetDeploymentsProjectSettings) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *GetDeploymentsProjectSettings) GetPublicSource() *bool { + if o == nil { + return nil + } + return o.PublicSource +} + +func (o *GetDeploymentsProjectSettings) GetRootDirectory() *string { + if o == nil { + return nil + } + return o.RootDirectory +} + +func (o *GetDeploymentsProjectSettings) GetServerlessFunctionRegion() *string { + if o == nil { + return nil + } + return o.ServerlessFunctionRegion +} + +func (o *GetDeploymentsProjectSettings) GetSourceFilesOutsideRootDirectory() *bool { + if o == nil { + return nil + } + return o.SourceFilesOutsideRootDirectory +} + +func (o *GetDeploymentsProjectSettings) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *GetDeploymentsProjectSettings) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetDeploymentsProjectSettings) GetSpeedInsights() *GetDeploymentsSpeedInsights { + if o == nil { + return nil + } + return o.SpeedInsights +} + +func (o *GetDeploymentsProjectSettings) GetWebAnalytics() *GetDeploymentsWebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *GetDeploymentsProjectSettings) GetSkipGitConnectDuringLink() *bool { + if o == nil { + return nil + } + return o.SkipGitConnectDuringLink +} + +func (o *GetDeploymentsProjectSettings) GetGitComments() *GetDeploymentsGitComments { + if o == nil { + return nil + } + return o.GitComments +} + +// GetDeploymentsCustomEnvironment - The custom environment used for this deployment, if any +type GetDeploymentsCustomEnvironment struct { + ID string `json:"id"` + Slug *string `json:"slug,omitempty"` +} + +func (o *GetDeploymentsCustomEnvironment) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDeploymentsCustomEnvironment) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type Deployments struct { + // The unique identifier of the deployment. + UID string `json:"uid"` + // The name of the deployment. + Name string `json:"name"` + // The URL of the deployment. + URL string `json:"url"` + // Timestamp of when the deployment got created. + Created float64 `json:"created"` + // The default route that should be used for screenshots and links if configured with microfrontends. + DefaultRoute *string `json:"defaultRoute,omitempty"` + // Timestamp of when the deployment got deleted. + Deleted *float64 `json:"deleted,omitempty"` + // Timestamp of when the deployment was undeleted. + Undeleted *float64 `json:"undeleted,omitempty"` + // Optional flag to indicate if the deployment was soft deleted by retention policy. + SoftDeletedByRetention *bool `json:"softDeletedByRetention,omitempty"` + // The source of the deployment. + Source *GetDeploymentsSource `json:"source,omitempty"` + // In which state is the deployment. + State *GetDeploymentsState `json:"state,omitempty"` + // In which state is the deployment. + ReadyState *GetDeploymentsReadyState `json:"readyState,omitempty"` + // The type of the deployment. + Type GetDeploymentsType `json:"type"` + // Metadata information of the user who created the deployment. + Creator GetDeploymentsCreator `json:"creator"` + // Metadata information from the Git provider. + Meta map[string]string `json:"meta,omitempty"` + // On which environment has the deployment been deployed to. + Target *GetDeploymentsTarget `json:"target,omitempty"` + // An error object in case aliasing of the deployment failed. + AliasError *GetDeploymentsAliasError `json:"aliasError,omitempty"` + AliasAssigned *GetDeploymentsAliasAssigned `json:"aliasAssigned,omitempty"` + // Timestamp of when the deployment got created. + CreatedAt *float64 `json:"createdAt,omitempty"` + // Timestamp of when the deployment started building at. + BuildingAt *float64 `json:"buildingAt,omitempty"` + // Timestamp of when the deployment got ready. + Ready *float64 `json:"ready,omitempty"` + // Since June 2023 Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - PROMOTED: has seen production traffic + ReadySubstate *GetDeploymentsReadySubstate `json:"readySubstate,omitempty"` + // State of all registered checks + ChecksState *GetDeploymentsChecksState `json:"checksState,omitempty"` + // Conclusion for checks + ChecksConclusion *GetDeploymentsChecksConclusion `json:"checksConclusion,omitempty"` + // Vercel URL to inspect the deployment. + InspectorURL *string `json:"inspectorUrl"` + // Deployment can be used for instant rollback + IsRollbackCandidate *bool `json:"isRollbackCandidate,omitempty"` + // The project settings which was used for this deployment + ProjectSettings *GetDeploymentsProjectSettings `json:"projectSettings,omitempty"` + // The flag saying if Secure Compute network is used for builds + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + // The ID of Secure Compute network used for this deployment + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + // The ID of Secure Compute network used for this deployment's passive functions + PassiveConnectConfigurationID *string `json:"passiveConnectConfigurationId,omitempty"` + // The expiration configured by the project retention policy + Expiration *float64 `json:"expiration,omitempty"` + // The expiration proposed to replace the existing expiration + ProposedExpiration *float64 `json:"proposedExpiration,omitempty"` + // The custom environment used for this deployment, if any + CustomEnvironment *GetDeploymentsCustomEnvironment `json:"customEnvironment,omitempty"` +} + +func (o *Deployments) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *Deployments) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Deployments) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *Deployments) GetCreated() float64 { + if o == nil { + return 0.0 + } + return o.Created +} + +func (o *Deployments) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +func (o *Deployments) GetDeleted() *float64 { + if o == nil { + return nil + } + return o.Deleted +} + +func (o *Deployments) GetUndeleted() *float64 { + if o == nil { + return nil + } + return o.Undeleted +} + +func (o *Deployments) GetSoftDeletedByRetention() *bool { + if o == nil { + return nil + } + return o.SoftDeletedByRetention +} + +func (o *Deployments) GetSource() *GetDeploymentsSource { + if o == nil { + return nil + } + return o.Source +} + +func (o *Deployments) GetState() *GetDeploymentsState { + if o == nil { + return nil + } + return o.State +} + +func (o *Deployments) GetReadyState() *GetDeploymentsReadyState { + if o == nil { + return nil + } + return o.ReadyState +} + +func (o *Deployments) GetType() GetDeploymentsType { + if o == nil { + return GetDeploymentsType("") + } + return o.Type +} + +func (o *Deployments) GetCreator() GetDeploymentsCreator { + if o == nil { + return GetDeploymentsCreator{} + } + return o.Creator +} + +func (o *Deployments) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *Deployments) GetTarget() *GetDeploymentsTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *Deployments) GetAliasError() *GetDeploymentsAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *Deployments) GetAliasAssigned() *GetDeploymentsAliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *Deployments) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Deployments) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *Deployments) GetReady() *float64 { + if o == nil { + return nil + } + return o.Ready +} + +func (o *Deployments) GetReadySubstate() *GetDeploymentsReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *Deployments) GetChecksState() *GetDeploymentsChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *Deployments) GetChecksConclusion() *GetDeploymentsChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *Deployments) GetInspectorURL() *string { + if o == nil { + return nil + } + return o.InspectorURL +} + +func (o *Deployments) GetIsRollbackCandidate() *bool { + if o == nil { + return nil + } + return o.IsRollbackCandidate +} + +func (o *Deployments) GetProjectSettings() *GetDeploymentsProjectSettings { + if o == nil { + return nil + } + return o.ProjectSettings +} + +func (o *Deployments) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *Deployments) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *Deployments) GetPassiveConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.PassiveConnectConfigurationID +} + +func (o *Deployments) GetExpiration() *float64 { + if o == nil { + return nil + } + return o.Expiration +} + +func (o *Deployments) GetProposedExpiration() *float64 { + if o == nil { + return nil + } + return o.ProposedExpiration +} + +func (o *Deployments) GetCustomEnvironment() *GetDeploymentsCustomEnvironment { + if o == nil { + return nil + } + return o.CustomEnvironment +} + +type GetDeploymentsResponseBody struct { + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` + Deployments []Deployments `json:"deployments"` +} + +func (o *GetDeploymentsResponseBody) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +func (o *GetDeploymentsResponseBody) GetDeployments() []Deployments { + if o == nil { + return []Deployments{} + } + return o.Deployments +} + +type GetDeploymentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetDeploymentsResponseBody +} + +func (o *GetDeploymentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetDeploymentsResponse) GetObject() *GetDeploymentsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getdomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/getdomain.go new file mode 100644 index 00000000..fe4b709d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getdomain.go @@ -0,0 +1,307 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetDomainRequest struct { + // The name of the domain. + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetDomainRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *GetDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetDomainCreator - An object containing information of the domain creator, including the user's id, username, and email. +type GetDomainCreator struct { + Username string `json:"username"` + Email string `json:"email"` + CustomerID *string `json:"customerId,omitempty"` + IsDomainReseller *bool `json:"isDomainReseller,omitempty"` + ID string `json:"id"` +} + +func (o *GetDomainCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *GetDomainCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *GetDomainCreator) GetCustomerID() *string { + if o == nil { + return nil + } + return o.CustomerID +} + +func (o *GetDomainCreator) GetIsDomainReseller() *bool { + if o == nil { + return nil + } + return o.IsDomainReseller +} + +func (o *GetDomainCreator) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +// ServiceType - The type of service the domain is handled by. `external` if the DNS is externally handled, `zeit.world` if handled with Vercel, or `na` if the service is not available. +type ServiceType string + +const ( + ServiceTypeZeitWorld ServiceType = "zeit.world" + ServiceTypeExternal ServiceType = "external" + ServiceTypeNa ServiceType = "na" +) + +func (e ServiceType) ToPointer() *ServiceType { + return &e +} +func (e *ServiceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "zeit.world": + fallthrough + case "external": + fallthrough + case "na": + *e = ServiceType(v) + return nil + default: + return fmt.Errorf("invalid value for ServiceType: %v", v) + } +} + +type GetDomainDomain struct { + Suffix bool `json:"suffix"` + // If the domain has the ownership verified. + Verified bool `json:"verified"` + // A list of the current nameservers of the domain. + Nameservers []string `json:"nameservers"` + // A list of the intended nameservers for the domain to point to Vercel DNS. + IntendedNameservers []string `json:"intendedNameservers"` + // A list of custom nameservers for the domain to point to. Only applies to domains purchased with Vercel. + CustomNameservers []string `json:"customNameservers,omitempty"` + // An object containing information of the domain creator, including the user's id, username, and email. + Creator GetDomainCreator `json:"creator"` + TeamID *string `json:"teamId"` + // If it was purchased through Vercel, the timestamp in milliseconds when it was purchased. + BoughtAt *float64 `json:"boughtAt"` + // Timestamp in milliseconds when the domain was created in the registry. + CreatedAt float64 `json:"createdAt"` + // Timestamp in milliseconds at which the domain is set to expire. `null` if not bought with Vercel. + ExpiresAt *float64 `json:"expiresAt"` + // The unique identifier of the domain. + ID string `json:"id"` + // The domain name. + Name string `json:"name"` + // Timestamp in milliseconds at which the domain was ordered. + OrderedAt *float64 `json:"orderedAt,omitempty"` + // Indicates whether the domain is set to automatically renew. + Renew *bool `json:"renew,omitempty"` + // The type of service the domain is handled by. `external` if the DNS is externally handled, `zeit.world` if handled with Vercel, or `na` if the service is not available. + ServiceType ServiceType `json:"serviceType"` + // Timestamp in milliseconds at which the domain was successfully transferred into Vercel. `null` if the transfer is still processing or was never transferred in. + TransferredAt *float64 `json:"transferredAt,omitempty"` + // If transferred into Vercel, timestamp in milliseconds when the domain transfer was initiated. + TransferStartedAt *float64 `json:"transferStartedAt,omitempty"` + UserID string `json:"userId"` +} + +func (o *GetDomainDomain) GetSuffix() bool { + if o == nil { + return false + } + return o.Suffix +} + +func (o *GetDomainDomain) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *GetDomainDomain) GetNameservers() []string { + if o == nil { + return []string{} + } + return o.Nameservers +} + +func (o *GetDomainDomain) GetIntendedNameservers() []string { + if o == nil { + return []string{} + } + return o.IntendedNameservers +} + +func (o *GetDomainDomain) GetCustomNameservers() []string { + if o == nil { + return nil + } + return o.CustomNameservers +} + +func (o *GetDomainDomain) GetCreator() GetDomainCreator { + if o == nil { + return GetDomainCreator{} + } + return o.Creator +} + +func (o *GetDomainDomain) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDomainDomain) GetBoughtAt() *float64 { + if o == nil { + return nil + } + return o.BoughtAt +} + +func (o *GetDomainDomain) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetDomainDomain) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +func (o *GetDomainDomain) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetDomainDomain) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetDomainDomain) GetOrderedAt() *float64 { + if o == nil { + return nil + } + return o.OrderedAt +} + +func (o *GetDomainDomain) GetRenew() *bool { + if o == nil { + return nil + } + return o.Renew +} + +func (o *GetDomainDomain) GetServiceType() ServiceType { + if o == nil { + return ServiceType("") + } + return o.ServiceType +} + +func (o *GetDomainDomain) GetTransferredAt() *float64 { + if o == nil { + return nil + } + return o.TransferredAt +} + +func (o *GetDomainDomain) GetTransferStartedAt() *float64 { + if o == nil { + return nil + } + return o.TransferStartedAt +} + +func (o *GetDomainDomain) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +// GetDomainResponseBody - Successful response retrieving an information for a specific domains. +type GetDomainResponseBody struct { + Domain GetDomainDomain `json:"domain"` +} + +func (o *GetDomainResponseBody) GetDomain() GetDomainDomain { + if o == nil { + return GetDomainDomain{} + } + return o.Domain +} + +type GetDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response retrieving an information for a specific domains. + Object *GetDomainResponseBody +} + +func (o *GetDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetDomainResponse) GetObject() *GetDomainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getdomainconfig.go b/src/__tests__/mockserver/internal/sdk/models/operations/getdomainconfig.go new file mode 100644 index 00000000..d9f17292 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getdomainconfig.go @@ -0,0 +1,184 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// Strict - When true, the response will only include the nameservers assigned directly to the specified domain. When false and there are no nameservers assigned directly to the specified domain, the response will include the nameservers of the domain's parent zone. +type Strict string + +const ( + StrictTrue Strict = "true" + StrictFalse Strict = "false" +) + +func (e Strict) ToPointer() *Strict { + return &e +} +func (e *Strict) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "true": + fallthrough + case "false": + *e = Strict(v) + return nil + default: + return fmt.Errorf("invalid value for Strict: %v", v) + } +} + +type GetDomainConfigRequest struct { + // The name of the domain. + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // When true, the response will only include the nameservers assigned directly to the specified domain. When false and there are no nameservers assigned directly to the specified domain, the response will include the nameservers of the domain's parent zone. + Strict *Strict `queryParam:"style=form,explode=true,name=strict"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetDomainConfigRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *GetDomainConfigRequest) GetStrict() *Strict { + if o == nil { + return nil + } + return o.Strict +} + +func (o *GetDomainConfigRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDomainConfigRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// ConfiguredBy - How we see the domain's configuration. - `CNAME`: Domain has a CNAME pointing to Vercel. - `A`: Domain's A record is resolving to Vercel. - `http`: Domain is resolving to Vercel but may be behind a Proxy. - `dns-01`: Domain is not resolving to Vercel but dns-01 challenge is enabled. - `null`: Domain is not resolving to Vercel. +type ConfiguredBy string + +const ( + ConfiguredByCname ConfiguredBy = "CNAME" + ConfiguredByA ConfiguredBy = "A" + ConfiguredByHTTP ConfiguredBy = "http" + ConfiguredByDns01 ConfiguredBy = "dns-01" +) + +func (e ConfiguredBy) ToPointer() *ConfiguredBy { + return &e +} +func (e *ConfiguredBy) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CNAME": + fallthrough + case "A": + fallthrough + case "http": + fallthrough + case "dns-01": + *e = ConfiguredBy(v) + return nil + default: + return fmt.Errorf("invalid value for ConfiguredBy: %v", v) + } +} + +// AcceptedChallenges - Which challenge types the domain can use for issuing certs. +type AcceptedChallenges string + +const ( + AcceptedChallengesDns01 AcceptedChallenges = "dns-01" + AcceptedChallengesHttp01 AcceptedChallenges = "http-01" +) + +func (e AcceptedChallenges) ToPointer() *AcceptedChallenges { + return &e +} +func (e *AcceptedChallenges) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "dns-01": + fallthrough + case "http-01": + *e = AcceptedChallenges(v) + return nil + default: + return fmt.Errorf("invalid value for AcceptedChallenges: %v", v) + } +} + +type GetDomainConfigResponseBody struct { + // How we see the domain's configuration. - `CNAME`: Domain has a CNAME pointing to Vercel. - `A`: Domain's A record is resolving to Vercel. - `http`: Domain is resolving to Vercel but may be behind a Proxy. - `dns-01`: Domain is not resolving to Vercel but dns-01 challenge is enabled. - `null`: Domain is not resolving to Vercel. + ConfiguredBy *ConfiguredBy `json:"configuredBy,omitempty"` + // Which challenge types the domain can use for issuing certs. + AcceptedChallenges []AcceptedChallenges `json:"acceptedChallenges,omitempty"` + // Whether or not the domain is configured AND we can automatically generate a TLS certificate. + Misconfigured bool `json:"misconfigured"` +} + +func (o *GetDomainConfigResponseBody) GetConfiguredBy() *ConfiguredBy { + if o == nil { + return nil + } + return o.ConfiguredBy +} + +func (o *GetDomainConfigResponseBody) GetAcceptedChallenges() []AcceptedChallenges { + if o == nil { + return nil + } + return o.AcceptedChallenges +} + +func (o *GetDomainConfigResponseBody) GetMisconfigured() bool { + if o == nil { + return false + } + return o.Misconfigured +} + +type GetDomainConfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetDomainConfigResponseBody +} + +func (o *GetDomainConfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetDomainConfigResponse) GetObject() *GetDomainConfigResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getdomains.go b/src/__tests__/mockserver/internal/sdk/models/operations/getdomains.go new file mode 100644 index 00000000..214caeb1 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getdomains.go @@ -0,0 +1,326 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetDomainsRequest struct { + // Maximum number of domains to list from a request. + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Get domains created after this JavaScript timestamp. + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Get domains created before this JavaScript timestamp. + Until *float64 `queryParam:"style=form,explode=true,name=until"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetDomainsRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetDomainsRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetDomainsRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *GetDomainsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDomainsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetDomainsCreator - An object containing information of the domain creator, including the user's id, username, and email. +type GetDomainsCreator struct { + Username string `json:"username"` + Email string `json:"email"` + CustomerID *string `json:"customerId,omitempty"` + IsDomainReseller *bool `json:"isDomainReseller,omitempty"` + ID string `json:"id"` +} + +func (o *GetDomainsCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *GetDomainsCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *GetDomainsCreator) GetCustomerID() *string { + if o == nil { + return nil + } + return o.CustomerID +} + +func (o *GetDomainsCreator) GetIsDomainReseller() *bool { + if o == nil { + return nil + } + return o.IsDomainReseller +} + +func (o *GetDomainsCreator) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +// GetDomainsServiceType - The type of service the domain is handled by. `external` if the DNS is externally handled, `zeit.world` if handled with Vercel, or `na` if the service is not available. +type GetDomainsServiceType string + +const ( + GetDomainsServiceTypeZeitWorld GetDomainsServiceType = "zeit.world" + GetDomainsServiceTypeExternal GetDomainsServiceType = "external" + GetDomainsServiceTypeNa GetDomainsServiceType = "na" +) + +func (e GetDomainsServiceType) ToPointer() *GetDomainsServiceType { + return &e +} +func (e *GetDomainsServiceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "zeit.world": + fallthrough + case "external": + fallthrough + case "na": + *e = GetDomainsServiceType(v) + return nil + default: + return fmt.Errorf("invalid value for GetDomainsServiceType: %v", v) + } +} + +type Domains struct { + // If the domain has the ownership verified. + Verified bool `json:"verified"` + // A list of the current nameservers of the domain. + Nameservers []string `json:"nameservers"` + // A list of the intended nameservers for the domain to point to Vercel DNS. + IntendedNameservers []string `json:"intendedNameservers"` + // A list of custom nameservers for the domain to point to. Only applies to domains purchased with Vercel. + CustomNameservers []string `json:"customNameservers,omitempty"` + // An object containing information of the domain creator, including the user's id, username, and email. + Creator GetDomainsCreator `json:"creator"` + TeamID *string `json:"teamId"` + // Timestamp in milliseconds when the domain was created in the registry. + CreatedAt float64 `json:"createdAt"` + // If it was purchased through Vercel, the timestamp in milliseconds when it was purchased. + BoughtAt *float64 `json:"boughtAt"` + // Timestamp in milliseconds at which the domain is set to expire. `null` if not bought with Vercel. + ExpiresAt *float64 `json:"expiresAt"` + // The unique identifier of the domain. + ID string `json:"id"` + // The domain name. + Name string `json:"name"` + // Timestamp in milliseconds at which the domain was ordered. + OrderedAt *float64 `json:"orderedAt,omitempty"` + // Indicates whether the domain is set to automatically renew. + Renew *bool `json:"renew,omitempty"` + // The type of service the domain is handled by. `external` if the DNS is externally handled, `zeit.world` if handled with Vercel, or `na` if the service is not available. + ServiceType GetDomainsServiceType `json:"serviceType"` + // Timestamp in milliseconds at which the domain was successfully transferred into Vercel. `null` if the transfer is still processing or was never transferred in. + TransferredAt *float64 `json:"transferredAt,omitempty"` + // If transferred into Vercel, timestamp in milliseconds when the domain transfer was initiated. + TransferStartedAt *float64 `json:"transferStartedAt,omitempty"` + UserID string `json:"userId"` +} + +func (o *Domains) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *Domains) GetNameservers() []string { + if o == nil { + return []string{} + } + return o.Nameservers +} + +func (o *Domains) GetIntendedNameservers() []string { + if o == nil { + return []string{} + } + return o.IntendedNameservers +} + +func (o *Domains) GetCustomNameservers() []string { + if o == nil { + return nil + } + return o.CustomNameservers +} + +func (o *Domains) GetCreator() GetDomainsCreator { + if o == nil { + return GetDomainsCreator{} + } + return o.Creator +} + +func (o *Domains) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *Domains) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *Domains) GetBoughtAt() *float64 { + if o == nil { + return nil + } + return o.BoughtAt +} + +func (o *Domains) GetExpiresAt() *float64 { + if o == nil { + return nil + } + return o.ExpiresAt +} + +func (o *Domains) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Domains) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Domains) GetOrderedAt() *float64 { + if o == nil { + return nil + } + return o.OrderedAt +} + +func (o *Domains) GetRenew() *bool { + if o == nil { + return nil + } + return o.Renew +} + +func (o *Domains) GetServiceType() GetDomainsServiceType { + if o == nil { + return GetDomainsServiceType("") + } + return o.ServiceType +} + +func (o *Domains) GetTransferredAt() *float64 { + if o == nil { + return nil + } + return o.TransferredAt +} + +func (o *Domains) GetTransferStartedAt() *float64 { + if o == nil { + return nil + } + return o.TransferStartedAt +} + +func (o *Domains) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +// GetDomainsResponseBody - Successful response retrieving a list of domains. +type GetDomainsResponseBody struct { + Domains []Domains `json:"domains"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *GetDomainsResponseBody) GetDomains() []Domains { + if o == nil { + return []Domains{} + } + return o.Domains +} + +func (o *GetDomainsResponseBody) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type GetDomainsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response retrieving a list of domains. + Object *GetDomainsResponseBody +} + +func (o *GetDomainsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetDomainsResponse) GetObject() *GetDomainsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getdomaintransfer.go b/src/__tests__/mockserver/internal/sdk/models/operations/getdomaintransfer.go new file mode 100644 index 00000000..309f3448 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getdomaintransfer.go @@ -0,0 +1,174 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetDomainTransferRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + Domain string `pathParam:"style=simple,explode=false,name=domain"` +} + +func (o *GetDomainTransferRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetDomainTransferRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetDomainTransferRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +// TransferPolicy - The domain's transfer policy (depends on TLD requirements). `charge-and-renew`: transfer will charge for renewal and will renew the existing domain's registration. `no-charge-no-change`: transfer will have no change to registration period and does not require charge. `no-change`: transfer charge is required, but no change in registration period. `new-term`: transfer charge is required and a new registry term is set based on the transfer date. `not-supported`: transfers are not supported for this domain or TLD. `null`: This TLD is not supported by Vercel's Registrar. +type TransferPolicy string + +const ( + TransferPolicyChargeAndRenew TransferPolicy = "charge-and-renew" + TransferPolicyNoChargeNoChange TransferPolicy = "no-charge-no-change" + TransferPolicyNoChange TransferPolicy = "no-change" + TransferPolicyNewTerm TransferPolicy = "new-term" + TransferPolicyNotSupported TransferPolicy = "not-supported" +) + +func (e TransferPolicy) ToPointer() *TransferPolicy { + return &e +} +func (e *TransferPolicy) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "charge-and-renew": + fallthrough + case "no-charge-no-change": + fallthrough + case "no-change": + fallthrough + case "new-term": + fallthrough + case "not-supported": + *e = TransferPolicy(v) + return nil + default: + return fmt.Errorf("invalid value for TransferPolicy: %v", v) + } +} + +// GetDomainTransferStatus - The current state of an ongoing transfer. `pending_owner`: Awaiting approval by domain's admin contact (every transfer begins with this status). If approval is not given within five days, the transfer is cancelled. `pending_admin`: Waiting for approval by Vercel Registrar admin. `pending_registry`: Awaiting registry approval (the transfer completes after 7 days unless it is declined by the current registrar). `completed`: The transfer completed successfully. `cancelled`: The transfer was cancelled. `undef`: No transfer exists for this domain. `unknown`: This TLD is not supported by Vercel's Registrar. +type GetDomainTransferStatus string + +const ( + GetDomainTransferStatusPendingOwner GetDomainTransferStatus = "pending_owner" + GetDomainTransferStatusPendingAdmin GetDomainTransferStatus = "pending_admin" + GetDomainTransferStatusPendingRegistry GetDomainTransferStatus = "pending_registry" + GetDomainTransferStatusCompleted GetDomainTransferStatus = "completed" + GetDomainTransferStatusCancelled GetDomainTransferStatus = "cancelled" + GetDomainTransferStatusUndef GetDomainTransferStatus = "undef" + GetDomainTransferStatusUnknown GetDomainTransferStatus = "unknown" +) + +func (e GetDomainTransferStatus) ToPointer() *GetDomainTransferStatus { + return &e +} +func (e *GetDomainTransferStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pending_owner": + fallthrough + case "pending_admin": + fallthrough + case "pending_registry": + fallthrough + case "completed": + fallthrough + case "cancelled": + fallthrough + case "undef": + fallthrough + case "unknown": + *e = GetDomainTransferStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GetDomainTransferStatus: %v", v) + } +} + +type GetDomainTransferResponseBody struct { + // Whether or not the domain is transferable + Transferable bool `json:"transferable"` + // The domain's transfer policy (depends on TLD requirements). `charge-and-renew`: transfer will charge for renewal and will renew the existing domain's registration. `no-charge-no-change`: transfer will have no change to registration period and does not require charge. `no-change`: transfer charge is required, but no change in registration period. `new-term`: transfer charge is required and a new registry term is set based on the transfer date. `not-supported`: transfers are not supported for this domain or TLD. `null`: This TLD is not supported by Vercel's Registrar. + TransferPolicy *TransferPolicy `json:"transferPolicy"` + // Description associated with transferable state. + Reason string `json:"reason"` + // The current state of an ongoing transfer. `pending_owner`: Awaiting approval by domain's admin contact (every transfer begins with this status). If approval is not given within five days, the transfer is cancelled. `pending_admin`: Waiting for approval by Vercel Registrar admin. `pending_registry`: Awaiting registry approval (the transfer completes after 7 days unless it is declined by the current registrar). `completed`: The transfer completed successfully. `cancelled`: The transfer was cancelled. `undef`: No transfer exists for this domain. `unknown`: This TLD is not supported by Vercel's Registrar. + Status GetDomainTransferStatus `json:"status"` +} + +func (o *GetDomainTransferResponseBody) GetTransferable() bool { + if o == nil { + return false + } + return o.Transferable +} + +func (o *GetDomainTransferResponseBody) GetTransferPolicy() *TransferPolicy { + if o == nil { + return nil + } + return o.TransferPolicy +} + +func (o *GetDomainTransferResponseBody) GetReason() string { + if o == nil { + return "" + } + return o.Reason +} + +func (o *GetDomainTransferResponseBody) GetStatus() GetDomainTransferStatus { + if o == nil { + return GetDomainTransferStatus("") + } + return o.Status +} + +type GetDomainTransferResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetDomainTransferResponseBody +} + +func (o *GetDomainTransferResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetDomainTransferResponse) GetObject() *GetDomainTransferResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfig.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfig.go new file mode 100644 index 00000000..4c5b3f63 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfig.go @@ -0,0 +1,225 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetEdgeConfigRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *GetEdgeConfigRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetEdgeConfigTransfer - Keeps track of the current state of the Edge Config while it gets transferred. +type GetEdgeConfigTransfer struct { + FromAccountID string `json:"fromAccountId"` + StartedAt float64 `json:"startedAt"` + DoneAt *float64 `json:"doneAt"` +} + +func (o *GetEdgeConfigTransfer) GetFromAccountID() string { + if o == nil { + return "" + } + return o.FromAccountID +} + +func (o *GetEdgeConfigTransfer) GetStartedAt() float64 { + if o == nil { + return 0.0 + } + return o.StartedAt +} + +func (o *GetEdgeConfigTransfer) GetDoneAt() *float64 { + if o == nil { + return nil + } + return o.DoneAt +} + +type GetEdgeConfigSchema struct { +} + +type GetEdgeConfigType string + +const ( + GetEdgeConfigTypeFlags GetEdgeConfigType = "flags" +) + +func (e GetEdgeConfigType) ToPointer() *GetEdgeConfigType { + return &e +} +func (e *GetEdgeConfigType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags": + *e = GetEdgeConfigType(v) + return nil + default: + return fmt.Errorf("invalid value for GetEdgeConfigType: %v", v) + } +} + +type GetEdgeConfigPurpose struct { + Type GetEdgeConfigType `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *GetEdgeConfigPurpose) GetType() GetEdgeConfigType { + if o == nil { + return GetEdgeConfigType("") + } + return o.Type +} + +func (o *GetEdgeConfigPurpose) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +// GetEdgeConfigResponseBody - The EdgeConfig. +type GetEdgeConfigResponseBody struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + ID *string `json:"id,omitempty"` + // Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). + Slug *string `json:"slug,omitempty"` + OwnerID *string `json:"ownerId,omitempty"` + Digest *string `json:"digest,omitempty"` + // Keeps track of the current state of the Edge Config while it gets transferred. + Transfer *GetEdgeConfigTransfer `json:"transfer,omitempty"` + Schema *GetEdgeConfigSchema `json:"schema,omitempty"` + Purpose *GetEdgeConfigPurpose `json:"purpose,omitempty"` + SizeInBytes float64 `json:"sizeInBytes"` + ItemCount float64 `json:"itemCount"` +} + +func (o *GetEdgeConfigResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetEdgeConfigResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetEdgeConfigResponseBody) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetEdgeConfigResponseBody) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetEdgeConfigResponseBody) GetOwnerID() *string { + if o == nil { + return nil + } + return o.OwnerID +} + +func (o *GetEdgeConfigResponseBody) GetDigest() *string { + if o == nil { + return nil + } + return o.Digest +} + +func (o *GetEdgeConfigResponseBody) GetTransfer() *GetEdgeConfigTransfer { + if o == nil { + return nil + } + return o.Transfer +} + +func (o *GetEdgeConfigResponseBody) GetSchema() *GetEdgeConfigSchema { + if o == nil { + return nil + } + return o.Schema +} + +func (o *GetEdgeConfigResponseBody) GetPurpose() *GetEdgeConfigPurpose { + if o == nil { + return nil + } + return o.Purpose +} + +func (o *GetEdgeConfigResponseBody) GetSizeInBytes() float64 { + if o == nil { + return 0.0 + } + return o.SizeInBytes +} + +func (o *GetEdgeConfigResponseBody) GetItemCount() float64 { + if o == nil { + return 0.0 + } + return o.ItemCount +} + +type GetEdgeConfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The EdgeConfig. + Object *GetEdgeConfigResponseBody +} + +func (o *GetEdgeConfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigResponse) GetObject() *GetEdgeConfigResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigbackup.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigbackup.go new file mode 100644 index 00000000..80f7fb0a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigbackup.go @@ -0,0 +1,514 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetEdgeConfigBackupRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + EdgeConfigBackupVersionID string `pathParam:"style=simple,explode=false,name=edgeConfigBackupVersionId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigBackupRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *GetEdgeConfigBackupRequest) GetEdgeConfigBackupVersionID() string { + if o == nil { + return "" + } + return o.EdgeConfigBackupVersionID +} + +func (o *GetEdgeConfigBackupRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigBackupRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ResponseBodyUser struct { + ID string `json:"id"` + Username string `json:"username"` + Email string `json:"email"` + Name *string `json:"name,omitempty"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *ResponseBodyUser) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ResponseBodyUser) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *ResponseBodyUser) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *ResponseBodyUser) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *ResponseBodyUser) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +type GetEdgeConfigBackupResponseBodyItems struct { + UpdatedAt float64 `json:"updatedAt"` + Value *components.EdgeConfigItemValue `json:"value"` + Description *string `json:"description,omitempty"` + CreatedAt float64 `json:"createdAt"` +} + +func (o *GetEdgeConfigBackupResponseBodyItems) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetEdgeConfigBackupResponseBodyItems) GetValue() *components.EdgeConfigItemValue { + if o == nil { + return nil + } + return o.Value +} + +func (o *GetEdgeConfigBackupResponseBodyItems) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *GetEdgeConfigBackupResponseBodyItems) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +type ResponseBodyBackup struct { + Digest string `json:"digest"` + Items map[string]GetEdgeConfigBackupResponseBodyItems `json:"items"` + // Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). + Slug string `json:"slug"` + UpdatedAt float64 `json:"updatedAt"` +} + +func (o *ResponseBodyBackup) GetDigest() string { + if o == nil { + return "" + } + return o.Digest +} + +func (o *ResponseBodyBackup) GetItems() map[string]GetEdgeConfigBackupResponseBodyItems { + if o == nil { + return map[string]GetEdgeConfigBackupResponseBodyItems{} + } + return o.Items +} + +func (o *ResponseBodyBackup) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *ResponseBodyBackup) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +type ResponseBodyMetadata struct { + UpdatedAt *string `json:"updatedAt,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + ItemsCount *float64 `json:"itemsCount,omitempty"` + ItemsBytes *float64 `json:"itemsBytes,omitempty"` +} + +func (o *ResponseBodyMetadata) GetUpdatedAt() *string { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *ResponseBodyMetadata) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *ResponseBodyMetadata) GetItemsCount() *float64 { + if o == nil { + return nil + } + return o.ItemsCount +} + +func (o *ResponseBodyMetadata) GetItemsBytes() *float64 { + if o == nil { + return nil + } + return o.ItemsBytes +} + +type GetEdgeConfigBackupResponseBody2 struct { + User ResponseBodyUser `json:"user"` + ID string `json:"id"` + LastModified float64 `json:"lastModified"` + Backup ResponseBodyBackup `json:"backup"` + Metadata ResponseBodyMetadata `json:"metadata"` +} + +func (o *GetEdgeConfigBackupResponseBody2) GetUser() ResponseBodyUser { + if o == nil { + return ResponseBodyUser{} + } + return o.User +} + +func (o *GetEdgeConfigBackupResponseBody2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetEdgeConfigBackupResponseBody2) GetLastModified() float64 { + if o == nil { + return 0.0 + } + return o.LastModified +} + +func (o *GetEdgeConfigBackupResponseBody2) GetBackup() ResponseBodyBackup { + if o == nil { + return ResponseBodyBackup{} + } + return o.Backup +} + +func (o *GetEdgeConfigBackupResponseBody2) GetMetadata() ResponseBodyMetadata { + if o == nil { + return ResponseBodyMetadata{} + } + return o.Metadata +} + +type ResponseBodyItems struct { + UpdatedAt float64 `json:"updatedAt"` + Value *components.EdgeConfigItemValue `json:"value"` + Description *string `json:"description,omitempty"` + CreatedAt float64 `json:"createdAt"` +} + +func (o *ResponseBodyItems) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *ResponseBodyItems) GetValue() *components.EdgeConfigItemValue { + if o == nil { + return nil + } + return o.Value +} + +func (o *ResponseBodyItems) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *ResponseBodyItems) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +type Backup struct { + Digest string `json:"digest"` + Items map[string]ResponseBodyItems `json:"items"` + // Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). + Slug string `json:"slug"` + UpdatedAt float64 `json:"updatedAt"` +} + +func (o *Backup) GetDigest() string { + if o == nil { + return "" + } + return o.Digest +} + +func (o *Backup) GetItems() map[string]ResponseBodyItems { + if o == nil { + return map[string]ResponseBodyItems{} + } + return o.Items +} + +func (o *Backup) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *Backup) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +type Metadata struct { + UpdatedAt *string `json:"updatedAt,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + ItemsCount *float64 `json:"itemsCount,omitempty"` + ItemsBytes *float64 `json:"itemsBytes,omitempty"` +} + +func (o *Metadata) GetUpdatedAt() *string { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Metadata) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Metadata) GetItemsCount() *float64 { + if o == nil { + return nil + } + return o.ItemsCount +} + +func (o *Metadata) GetItemsBytes() *float64 { + if o == nil { + return nil + } + return o.ItemsBytes +} + +type GetEdgeConfigBackupResponseBodyUser struct { + ID string `json:"id"` + Username string `json:"username"` + Email string `json:"email"` + Name *string `json:"name,omitempty"` + Avatar *string `json:"avatar,omitempty"` +} + +func (o *GetEdgeConfigBackupResponseBodyUser) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetEdgeConfigBackupResponseBodyUser) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *GetEdgeConfigBackupResponseBodyUser) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *GetEdgeConfigBackupResponseBodyUser) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *GetEdgeConfigBackupResponseBodyUser) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +// GetEdgeConfigBackupResponseBody1 - The object the API responds with when requesting an Edge Config backup +type GetEdgeConfigBackupResponseBody1 struct { + ID string `json:"id"` + LastModified float64 `json:"lastModified"` + Backup Backup `json:"backup"` + Metadata Metadata `json:"metadata"` + User *GetEdgeConfigBackupResponseBodyUser `json:"user,omitempty"` +} + +func (o *GetEdgeConfigBackupResponseBody1) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetEdgeConfigBackupResponseBody1) GetLastModified() float64 { + if o == nil { + return 0.0 + } + return o.LastModified +} + +func (o *GetEdgeConfigBackupResponseBody1) GetBackup() Backup { + if o == nil { + return Backup{} + } + return o.Backup +} + +func (o *GetEdgeConfigBackupResponseBody1) GetMetadata() Metadata { + if o == nil { + return Metadata{} + } + return o.Metadata +} + +func (o *GetEdgeConfigBackupResponseBody1) GetUser() *GetEdgeConfigBackupResponseBodyUser { + if o == nil { + return nil + } + return o.User +} + +type GetEdgeConfigBackupResponseBodyType string + +const ( + GetEdgeConfigBackupResponseBodyTypeGetEdgeConfigBackupResponseBody1 GetEdgeConfigBackupResponseBodyType = "getEdgeConfigBackup_responseBody_1" + GetEdgeConfigBackupResponseBodyTypeGetEdgeConfigBackupResponseBody2 GetEdgeConfigBackupResponseBodyType = "getEdgeConfigBackup_responseBody_2" +) + +type GetEdgeConfigBackupResponseBody struct { + GetEdgeConfigBackupResponseBody1 *GetEdgeConfigBackupResponseBody1 + GetEdgeConfigBackupResponseBody2 *GetEdgeConfigBackupResponseBody2 + + Type GetEdgeConfigBackupResponseBodyType +} + +func CreateGetEdgeConfigBackupResponseBodyGetEdgeConfigBackupResponseBody1(getEdgeConfigBackupResponseBody1 GetEdgeConfigBackupResponseBody1) GetEdgeConfigBackupResponseBody { + typ := GetEdgeConfigBackupResponseBodyTypeGetEdgeConfigBackupResponseBody1 + + return GetEdgeConfigBackupResponseBody{ + GetEdgeConfigBackupResponseBody1: &getEdgeConfigBackupResponseBody1, + Type: typ, + } +} + +func CreateGetEdgeConfigBackupResponseBodyGetEdgeConfigBackupResponseBody2(getEdgeConfigBackupResponseBody2 GetEdgeConfigBackupResponseBody2) GetEdgeConfigBackupResponseBody { + typ := GetEdgeConfigBackupResponseBodyTypeGetEdgeConfigBackupResponseBody2 + + return GetEdgeConfigBackupResponseBody{ + GetEdgeConfigBackupResponseBody2: &getEdgeConfigBackupResponseBody2, + Type: typ, + } +} + +func (u *GetEdgeConfigBackupResponseBody) UnmarshalJSON(data []byte) error { + + var getEdgeConfigBackupResponseBody1 GetEdgeConfigBackupResponseBody1 = GetEdgeConfigBackupResponseBody1{} + if err := utils.UnmarshalJSON(data, &getEdgeConfigBackupResponseBody1, "", true, true); err == nil { + u.GetEdgeConfigBackupResponseBody1 = &getEdgeConfigBackupResponseBody1 + u.Type = GetEdgeConfigBackupResponseBodyTypeGetEdgeConfigBackupResponseBody1 + return nil + } + + var getEdgeConfigBackupResponseBody2 GetEdgeConfigBackupResponseBody2 = GetEdgeConfigBackupResponseBody2{} + if err := utils.UnmarshalJSON(data, &getEdgeConfigBackupResponseBody2, "", true, true); err == nil { + u.GetEdgeConfigBackupResponseBody2 = &getEdgeConfigBackupResponseBody2 + u.Type = GetEdgeConfigBackupResponseBodyTypeGetEdgeConfigBackupResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetEdgeConfigBackupResponseBody", string(data)) +} + +func (u GetEdgeConfigBackupResponseBody) MarshalJSON() ([]byte, error) { + if u.GetEdgeConfigBackupResponseBody1 != nil { + return utils.MarshalJSON(u.GetEdgeConfigBackupResponseBody1, "", true) + } + + if u.GetEdgeConfigBackupResponseBody2 != nil { + return utils.MarshalJSON(u.GetEdgeConfigBackupResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type GetEdgeConfigBackupResponseBody: all fields are null") +} + +type GetEdgeConfigBackupResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *GetEdgeConfigBackupResponseBody +} + +func (o *GetEdgeConfigBackupResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigBackupResponse) GetOneOf() *GetEdgeConfigBackupResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigbackups.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigbackups.go new file mode 100644 index 00000000..85d85959 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigbackups.go @@ -0,0 +1,179 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetEdgeConfigBackupsRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + Next *string `queryParam:"style=form,explode=true,name=next"` + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + Metadata *string `queryParam:"style=form,explode=true,name=metadata"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigBackupsRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *GetEdgeConfigBackupsRequest) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *GetEdgeConfigBackupsRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetEdgeConfigBackupsRequest) GetMetadata() *string { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *GetEdgeConfigBackupsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigBackupsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetEdgeConfigBackupsMetadata struct { + UpdatedAt *string `json:"updatedAt,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + ItemsCount *float64 `json:"itemsCount,omitempty"` + ItemsBytes *float64 `json:"itemsBytes,omitempty"` +} + +func (o *GetEdgeConfigBackupsMetadata) GetUpdatedAt() *string { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetEdgeConfigBackupsMetadata) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *GetEdgeConfigBackupsMetadata) GetItemsCount() *float64 { + if o == nil { + return nil + } + return o.ItemsCount +} + +func (o *GetEdgeConfigBackupsMetadata) GetItemsBytes() *float64 { + if o == nil { + return nil + } + return o.ItemsBytes +} + +type Backups struct { + Metadata *GetEdgeConfigBackupsMetadata `json:"metadata,omitempty"` + ID string `json:"id"` + LastModified float64 `json:"lastModified"` +} + +func (o *Backups) GetMetadata() *GetEdgeConfigBackupsMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Backups) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Backups) GetLastModified() float64 { + if o == nil { + return 0.0 + } + return o.LastModified +} + +type GetEdgeConfigBackupsPagination struct { + HasNext bool `json:"hasNext"` + Next *string `json:"next,omitempty"` +} + +func (o *GetEdgeConfigBackupsPagination) GetHasNext() bool { + if o == nil { + return false + } + return o.HasNext +} + +func (o *GetEdgeConfigBackupsPagination) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +type GetEdgeConfigBackupsResponseBody struct { + Backups []Backups `json:"backups"` + Pagination GetEdgeConfigBackupsPagination `json:"pagination"` +} + +func (o *GetEdgeConfigBackupsResponseBody) GetBackups() []Backups { + if o == nil { + return []Backups{} + } + return o.Backups +} + +func (o *GetEdgeConfigBackupsResponseBody) GetPagination() GetEdgeConfigBackupsPagination { + if o == nil { + return GetEdgeConfigBackupsPagination{} + } + return o.Pagination +} + +type GetEdgeConfigBackupsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetEdgeConfigBackupsResponseBody +} + +func (o *GetEdgeConfigBackupsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigBackupsResponse) GetObject() *GetEdgeConfigBackupsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigitem.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigitem.go new file mode 100644 index 00000000..b90b9d93 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigitem.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetEdgeConfigItemRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + EdgeConfigItemKey string `pathParam:"style=simple,explode=false,name=edgeConfigItemKey"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigItemRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *GetEdgeConfigItemRequest) GetEdgeConfigItemKey() string { + if o == nil { + return "" + } + return o.EdgeConfigItemKey +} + +func (o *GetEdgeConfigItemRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigItemRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetEdgeConfigItemResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The EdgeConfig. + EdgeConfigItem *components.EdgeConfigItem +} + +func (o *GetEdgeConfigItemResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigItemResponse) GetEdgeConfigItem() *components.EdgeConfigItem { + if o == nil { + return nil + } + return o.EdgeConfigItem +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigitems.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigitems.go new file mode 100644 index 00000000..f45da1d5 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigitems.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetEdgeConfigItemsRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigItemsRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *GetEdgeConfigItemsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigItemsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetEdgeConfigItemsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The EdgeConfig. + EdgeConfigItem *components.EdgeConfigItem +} + +func (o *GetEdgeConfigItemsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigItemsResponse) GetEdgeConfigItem() *components.EdgeConfigItem { + if o == nil { + return nil + } + return o.EdgeConfigItem +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigs.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigs.go new file mode 100644 index 00000000..b65b73d3 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigs.go @@ -0,0 +1,216 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetEdgeConfigsRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// Transfer - Keeps track of the current state of the Edge Config while it gets transferred. +type Transfer struct { + FromAccountID string `json:"fromAccountId"` + StartedAt float64 `json:"startedAt"` + DoneAt *float64 `json:"doneAt"` +} + +func (o *Transfer) GetFromAccountID() string { + if o == nil { + return "" + } + return o.FromAccountID +} + +func (o *Transfer) GetStartedAt() float64 { + if o == nil { + return 0.0 + } + return o.StartedAt +} + +func (o *Transfer) GetDoneAt() *float64 { + if o == nil { + return nil + } + return o.DoneAt +} + +type Schema struct { +} + +type GetEdgeConfigsType string + +const ( + GetEdgeConfigsTypeFlags GetEdgeConfigsType = "flags" +) + +func (e GetEdgeConfigsType) ToPointer() *GetEdgeConfigsType { + return &e +} +func (e *GetEdgeConfigsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags": + *e = GetEdgeConfigsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetEdgeConfigsType: %v", v) + } +} + +type Purpose struct { + Type GetEdgeConfigsType `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *Purpose) GetType() GetEdgeConfigsType { + if o == nil { + return GetEdgeConfigsType("") + } + return o.Type +} + +func (o *Purpose) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type GetEdgeConfigsResponseBody struct { + ID *string `json:"id,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + OwnerID *string `json:"ownerId,omitempty"` + // Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). + Slug *string `json:"slug,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Digest *string `json:"digest,omitempty"` + // Keeps track of the current state of the Edge Config while it gets transferred. + Transfer *Transfer `json:"transfer,omitempty"` + Schema *Schema `json:"schema,omitempty"` + Purpose *Purpose `json:"purpose,omitempty"` + SizeInBytes float64 `json:"sizeInBytes"` + ItemCount float64 `json:"itemCount"` +} + +func (o *GetEdgeConfigsResponseBody) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetEdgeConfigsResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetEdgeConfigsResponseBody) GetOwnerID() *string { + if o == nil { + return nil + } + return o.OwnerID +} + +func (o *GetEdgeConfigsResponseBody) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetEdgeConfigsResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetEdgeConfigsResponseBody) GetDigest() *string { + if o == nil { + return nil + } + return o.Digest +} + +func (o *GetEdgeConfigsResponseBody) GetTransfer() *Transfer { + if o == nil { + return nil + } + return o.Transfer +} + +func (o *GetEdgeConfigsResponseBody) GetSchema() *Schema { + if o == nil { + return nil + } + return o.Schema +} + +func (o *GetEdgeConfigsResponseBody) GetPurpose() *Purpose { + if o == nil { + return nil + } + return o.Purpose +} + +func (o *GetEdgeConfigsResponseBody) GetSizeInBytes() float64 { + if o == nil { + return 0.0 + } + return o.SizeInBytes +} + +func (o *GetEdgeConfigsResponseBody) GetItemCount() float64 { + if o == nil { + return 0.0 + } + return o.ItemCount +} + +type GetEdgeConfigsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // List of all edge configs. + ResponseBodies []GetEdgeConfigsResponseBody +} + +func (o *GetEdgeConfigsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigsResponse) GetResponseBodies() []GetEdgeConfigsResponseBody { + if o == nil { + return nil + } + return o.ResponseBodies +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigschema.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigschema.go new file mode 100644 index 00000000..0844167e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigschema.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetEdgeConfigSchemaRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigSchemaRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *GetEdgeConfigSchemaRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigSchemaRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetEdgeConfigSchemaResponseBody - The EdgeConfig. +type GetEdgeConfigSchemaResponseBody struct { +} + +type GetEdgeConfigSchemaResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The EdgeConfig. + Object *GetEdgeConfigSchemaResponseBody +} + +func (o *GetEdgeConfigSchemaResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigSchemaResponse) GetObject() *GetEdgeConfigSchemaResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigtoken.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigtoken.go new file mode 100644 index 00000000..861866f9 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigtoken.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetEdgeConfigTokenRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + Token string `pathParam:"style=simple,explode=false,name=token"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigTokenRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *GetEdgeConfigTokenRequest) GetToken() string { + if o == nil { + return "" + } + return o.Token +} + +func (o *GetEdgeConfigTokenRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigTokenRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetEdgeConfigTokenResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The EdgeConfig. + EdgeConfigToken *components.EdgeConfigToken +} + +func (o *GetEdgeConfigTokenResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigTokenResponse) GetEdgeConfigToken() *components.EdgeConfigToken { + if o == nil { + return nil + } + return o.EdgeConfigToken +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigtokens.go b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigtokens.go new file mode 100644 index 00000000..394ca5e1 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getedgeconfigtokens.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetEdgeConfigTokensRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetEdgeConfigTokensRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *GetEdgeConfigTokensRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetEdgeConfigTokensRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetEdgeConfigTokensResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The EdgeConfig. + EdgeConfigToken *components.EdgeConfigToken +} + +func (o *GetEdgeConfigTokensResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetEdgeConfigTokensResponse) GetEdgeConfigToken() *components.EdgeConfigToken { + if o == nil { + return nil + } + return o.EdgeConfigToken +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getfirewallconfig.go b/src/__tests__/mockserver/internal/sdk/models/operations/getfirewallconfig.go new file mode 100644 index 00000000..bfb36d48 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getfirewallconfig.go @@ -0,0 +1,1484 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetFirewallConfigRequest struct { + ProjectID string `queryParam:"style=form,explode=true,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + // The deployed configVersion for the firewall configuration + ConfigVersion string `pathParam:"style=simple,explode=false,name=configVersion"` +} + +func (o *GetFirewallConfigRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *GetFirewallConfigRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetFirewallConfigRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetFirewallConfigRequest) GetConfigVersion() string { + if o == nil { + return "" + } + return o.ConfigVersion +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction: %v", v) + } +} + +// GetFirewallConfigSd - Scanner Detection - Detect and prevent reconnaissance activities from network scanning tools. +type GetFirewallConfigSd struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction `json:"action"` +} + +func (o *GetFirewallConfigSd) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigSd) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSdAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction: %v", v) + } +} + +// GetFirewallConfigMa - Multipart Attack - Block attempts to bypass security controls using multipart/form-data encoding. +type GetFirewallConfigMa struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction `json:"action"` +} + +func (o *GetFirewallConfigMa) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigMa) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsMaAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponseAction string + +const ( + GetFirewallConfigSecurityResponseActionDeny GetFirewallConfigSecurityResponseAction = "deny" + GetFirewallConfigSecurityResponseActionLog GetFirewallConfigSecurityResponseAction = "log" +) + +func (e GetFirewallConfigSecurityResponseAction) ToPointer() *GetFirewallConfigSecurityResponseAction { + return &e +} +func (e *GetFirewallConfigSecurityResponseAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponseAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponseAction: %v", v) + } +} + +// GetFirewallConfigLfi - Local File Inclusion Attack - Prevent unauthorized access to local files through web applications. +type GetFirewallConfigLfi struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponseAction `json:"action"` +} + +func (o *GetFirewallConfigLfi) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigLfi) GetAction() GetFirewallConfigSecurityResponseAction { + if o == nil { + return GetFirewallConfigSecurityResponseAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200Action string + +const ( + GetFirewallConfigSecurityResponse200ActionDeny GetFirewallConfigSecurityResponse200Action = "deny" + GetFirewallConfigSecurityResponse200ActionLog GetFirewallConfigSecurityResponse200Action = "log" +) + +func (e GetFirewallConfigSecurityResponse200Action) ToPointer() *GetFirewallConfigSecurityResponse200Action { + return &e +} +func (e *GetFirewallConfigSecurityResponse200Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200Action(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200Action: %v", v) + } +} + +// GetFirewallConfigRfi - Remote File Inclusion Attack - Prohibit unauthorized upload or execution of remote files. +type GetFirewallConfigRfi struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200Action `json:"action"` +} + +func (o *GetFirewallConfigRfi) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigRfi) GetAction() GetFirewallConfigSecurityResponse200Action { + if o == nil { + return GetFirewallConfigSecurityResponse200Action("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONActionLog GetFirewallConfigSecurityResponse200ApplicationJSONAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONAction: %v", v) + } +} + +// GetFirewallConfigRce - Remote Execution Attack - Prevent unauthorized execution of remote scripts or commands. +type GetFirewallConfigRce struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONAction `json:"action"` +} + +func (o *GetFirewallConfigRce) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigRce) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction: %v", v) + } +} + +// GetFirewallConfigPhp - PHP Attack - Safeguard against vulnerability exploits in PHP-based applications. +type GetFirewallConfigPhp struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction `json:"action"` +} + +func (o *GetFirewallConfigPhp) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigPhp) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction: %v", v) + } +} + +// GetFirewallConfigGen - Generic Attack - Provide broad protection from various undefined or novel attack vectors. +type GetFirewallConfigGen struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction `json:"action"` +} + +func (o *GetFirewallConfigGen) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigGen) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction: %v", v) + } +} + +// GetFirewallConfigXSS - XSS Attack - Prevent injection of malicious scripts into trusted webpages. +type GetFirewallConfigXSS struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction `json:"action"` +} + +func (o *GetFirewallConfigXSS) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigXSS) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsXSSAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction: %v", v) + } +} + +// GetFirewallConfigSqli - SQL Injection Attack - Prohibit unauthorized use of SQL commands to manipulate databases. +type GetFirewallConfigSqli struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction `json:"action"` +} + +func (o *GetFirewallConfigSqli) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigSqli) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSqliAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction: %v", v) + } +} + +// GetFirewallConfigSf - Session Fixation Attack - Prevent unauthorized takeover of user sessions by enforcing unique session IDs. +type GetFirewallConfigSf struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction `json:"action"` +} + +func (o *GetFirewallConfigSf) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigSf) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsSfAction("") + } + return o.Action +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction = "log" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction: %v", v) + } +} + +// GetFirewallConfigJava - Java Attack - Mitigate risks of exploitation targeting Java-based applications or components. +type GetFirewallConfigJava struct { + Active bool `json:"active"` + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction `json:"action"` +} + +func (o *GetFirewallConfigJava) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigJava) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyCrsJavaAction("") + } + return o.Action +} + +// GetFirewallConfigCrs - Custom Ruleset +type GetFirewallConfigCrs struct { + // Scanner Detection - Detect and prevent reconnaissance activities from network scanning tools. + Sd GetFirewallConfigSd `json:"sd"` + // Multipart Attack - Block attempts to bypass security controls using multipart/form-data encoding. + Ma GetFirewallConfigMa `json:"ma"` + // Local File Inclusion Attack - Prevent unauthorized access to local files through web applications. + Lfi GetFirewallConfigLfi `json:"lfi"` + // Remote File Inclusion Attack - Prohibit unauthorized upload or execution of remote files. + Rfi GetFirewallConfigRfi `json:"rfi"` + // Remote Execution Attack - Prevent unauthorized execution of remote scripts or commands. + Rce GetFirewallConfigRce `json:"rce"` + // PHP Attack - Safeguard against vulnerability exploits in PHP-based applications. + Php GetFirewallConfigPhp `json:"php"` + // Generic Attack - Provide broad protection from various undefined or novel attack vectors. + Gen GetFirewallConfigGen `json:"gen"` + // XSS Attack - Prevent injection of malicious scripts into trusted webpages. + XSS GetFirewallConfigXSS `json:"xss"` + // SQL Injection Attack - Prohibit unauthorized use of SQL commands to manipulate databases. + Sqli GetFirewallConfigSqli `json:"sqli"` + // Session Fixation Attack - Prevent unauthorized takeover of user sessions by enforcing unique session IDs. + Sf GetFirewallConfigSf `json:"sf"` + // Java Attack - Mitigate risks of exploitation targeting Java-based applications or components. + Java GetFirewallConfigJava `json:"java"` +} + +func (o *GetFirewallConfigCrs) GetSd() GetFirewallConfigSd { + if o == nil { + return GetFirewallConfigSd{} + } + return o.Sd +} + +func (o *GetFirewallConfigCrs) GetMa() GetFirewallConfigMa { + if o == nil { + return GetFirewallConfigMa{} + } + return o.Ma +} + +func (o *GetFirewallConfigCrs) GetLfi() GetFirewallConfigLfi { + if o == nil { + return GetFirewallConfigLfi{} + } + return o.Lfi +} + +func (o *GetFirewallConfigCrs) GetRfi() GetFirewallConfigRfi { + if o == nil { + return GetFirewallConfigRfi{} + } + return o.Rfi +} + +func (o *GetFirewallConfigCrs) GetRce() GetFirewallConfigRce { + if o == nil { + return GetFirewallConfigRce{} + } + return o.Rce +} + +func (o *GetFirewallConfigCrs) GetPhp() GetFirewallConfigPhp { + if o == nil { + return GetFirewallConfigPhp{} + } + return o.Php +} + +func (o *GetFirewallConfigCrs) GetGen() GetFirewallConfigGen { + if o == nil { + return GetFirewallConfigGen{} + } + return o.Gen +} + +func (o *GetFirewallConfigCrs) GetXSS() GetFirewallConfigXSS { + if o == nil { + return GetFirewallConfigXSS{} + } + return o.XSS +} + +func (o *GetFirewallConfigCrs) GetSqli() GetFirewallConfigSqli { + if o == nil { + return GetFirewallConfigSqli{} + } + return o.Sqli +} + +func (o *GetFirewallConfigCrs) GetSf() GetFirewallConfigSf { + if o == nil { + return GetFirewallConfigSf{} + } + return o.Sf +} + +func (o *GetFirewallConfigCrs) GetJava() GetFirewallConfigJava { + if o == nil { + return GetFirewallConfigJava{} + } + return o.Java +} + +// GetFirewallConfigType - [Parameter](https://vercel.com/docs/security/vercel-waf/rule-configuration#parameters) from the incoming traffic. +type GetFirewallConfigType string + +const ( + GetFirewallConfigTypeHost GetFirewallConfigType = "host" + GetFirewallConfigTypePath GetFirewallConfigType = "path" + GetFirewallConfigTypeMethod GetFirewallConfigType = "method" + GetFirewallConfigTypeHeader GetFirewallConfigType = "header" + GetFirewallConfigTypeQuery GetFirewallConfigType = "query" + GetFirewallConfigTypeCookie GetFirewallConfigType = "cookie" + GetFirewallConfigTypeTargetPath GetFirewallConfigType = "target_path" + GetFirewallConfigTypeRawPath GetFirewallConfigType = "raw_path" + GetFirewallConfigTypeIPAddress GetFirewallConfigType = "ip_address" + GetFirewallConfigTypeProtocol GetFirewallConfigType = "protocol" + GetFirewallConfigTypeRegion GetFirewallConfigType = "region" + GetFirewallConfigTypeScheme GetFirewallConfigType = "scheme" + GetFirewallConfigTypeEnvironment GetFirewallConfigType = "environment" + GetFirewallConfigTypeUserAgent GetFirewallConfigType = "user_agent" + GetFirewallConfigTypeGeoContinent GetFirewallConfigType = "geo_continent" + GetFirewallConfigTypeGeoCountry GetFirewallConfigType = "geo_country" + GetFirewallConfigTypeGeoCountryRegion GetFirewallConfigType = "geo_country_region" + GetFirewallConfigTypeGeoCity GetFirewallConfigType = "geo_city" + GetFirewallConfigTypeGeoAsNumber GetFirewallConfigType = "geo_as_number" + GetFirewallConfigTypeJa4Digest GetFirewallConfigType = "ja4_digest" + GetFirewallConfigTypeJa3Digest GetFirewallConfigType = "ja3_digest" + GetFirewallConfigTypeRateLimitAPIID GetFirewallConfigType = "rate_limit_api_id" +) + +func (e GetFirewallConfigType) ToPointer() *GetFirewallConfigType { + return &e +} +func (e *GetFirewallConfigType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + fallthrough + case "path": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "query": + fallthrough + case "cookie": + fallthrough + case "target_path": + fallthrough + case "raw_path": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "region": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "user_agent": + fallthrough + case "geo_continent": + fallthrough + case "geo_country": + fallthrough + case "geo_country_region": + fallthrough + case "geo_city": + fallthrough + case "geo_as_number": + fallthrough + case "ja4_digest": + fallthrough + case "ja3_digest": + fallthrough + case "rate_limit_api_id": + *e = GetFirewallConfigType(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigType: %v", v) + } +} + +// GetFirewallConfigOp - [Operator](https://vercel.com/docs/security/vercel-waf/rule-configuration#operators) used to compare the parameter with a value +type GetFirewallConfigOp string + +const ( + GetFirewallConfigOpRe GetFirewallConfigOp = "re" + GetFirewallConfigOpEq GetFirewallConfigOp = "eq" + GetFirewallConfigOpEx GetFirewallConfigOp = "ex" + GetFirewallConfigOpInc GetFirewallConfigOp = "inc" + GetFirewallConfigOpPre GetFirewallConfigOp = "pre" + GetFirewallConfigOpSuf GetFirewallConfigOp = "suf" + GetFirewallConfigOpSub GetFirewallConfigOp = "sub" + GetFirewallConfigOpGt GetFirewallConfigOp = "gt" + GetFirewallConfigOpGte GetFirewallConfigOp = "gte" + GetFirewallConfigOpLt GetFirewallConfigOp = "lt" + GetFirewallConfigOpLte GetFirewallConfigOp = "lte" + GetFirewallConfigOpNex GetFirewallConfigOp = "nex" + GetFirewallConfigOpNinc GetFirewallConfigOp = "ninc" + GetFirewallConfigOpNeq GetFirewallConfigOp = "neq" +) + +func (e GetFirewallConfigOp) ToPointer() *GetFirewallConfigOp { + return &e +} +func (e *GetFirewallConfigOp) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "re": + fallthrough + case "eq": + fallthrough + case "ex": + fallthrough + case "inc": + fallthrough + case "pre": + fallthrough + case "suf": + fallthrough + case "sub": + fallthrough + case "gt": + fallthrough + case "gte": + fallthrough + case "lt": + fallthrough + case "lte": + fallthrough + case "nex": + fallthrough + case "ninc": + fallthrough + case "neq": + *e = GetFirewallConfigOp(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigOp: %v", v) + } +} + +type GetFirewallConfigValueType string + +const ( + GetFirewallConfigValueTypeStr GetFirewallConfigValueType = "str" + GetFirewallConfigValueTypeNumber GetFirewallConfigValueType = "number" + GetFirewallConfigValueTypeArrayOfStr GetFirewallConfigValueType = "arrayOfStr" +) + +type GetFirewallConfigValue struct { + Str *string + Number *float64 + ArrayOfStr []string + + Type GetFirewallConfigValueType +} + +func CreateGetFirewallConfigValueStr(str string) GetFirewallConfigValue { + typ := GetFirewallConfigValueTypeStr + + return GetFirewallConfigValue{ + Str: &str, + Type: typ, + } +} + +func CreateGetFirewallConfigValueNumber(number float64) GetFirewallConfigValue { + typ := GetFirewallConfigValueTypeNumber + + return GetFirewallConfigValue{ + Number: &number, + Type: typ, + } +} + +func CreateGetFirewallConfigValueArrayOfStr(arrayOfStr []string) GetFirewallConfigValue { + typ := GetFirewallConfigValueTypeArrayOfStr + + return GetFirewallConfigValue{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *GetFirewallConfigValue) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetFirewallConfigValueTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetFirewallConfigValueTypeNumber + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = GetFirewallConfigValueTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetFirewallConfigValue", string(data)) +} + +func (u GetFirewallConfigValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type GetFirewallConfigValue: all fields are null") +} + +type GetFirewallConfigConditions struct { + // [Parameter](https://vercel.com/docs/security/vercel-waf/rule-configuration#parameters) from the incoming traffic. + Type GetFirewallConfigType `json:"type"` + // [Operator](https://vercel.com/docs/security/vercel-waf/rule-configuration#operators) used to compare the parameter with a value + Op GetFirewallConfigOp `json:"op"` + Neg *bool `json:"neg,omitempty"` + Key *string `json:"key,omitempty"` + Value *GetFirewallConfigValue `json:"value,omitempty"` +} + +func (o *GetFirewallConfigConditions) GetType() GetFirewallConfigType { + if o == nil { + return GetFirewallConfigType("") + } + return o.Type +} + +func (o *GetFirewallConfigConditions) GetOp() GetFirewallConfigOp { + if o == nil { + return GetFirewallConfigOp("") + } + return o.Op +} + +func (o *GetFirewallConfigConditions) GetNeg() *bool { + if o == nil { + return nil + } + return o.Neg +} + +func (o *GetFirewallConfigConditions) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *GetFirewallConfigConditions) GetValue() *GetFirewallConfigValue { + if o == nil { + return nil + } + return o.Value +} + +type GetFirewallConfigConditionGroup struct { + Conditions []GetFirewallConfigConditions `json:"conditions"` +} + +func (o *GetFirewallConfigConditionGroup) GetConditions() []GetFirewallConfigConditions { + if o == nil { + return []GetFirewallConfigConditions{} + } + return o.Conditions +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction = "log" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionChallenge GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction = "challenge" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionBypass GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction = "bypass" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionRateLimit GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction = "rate_limit" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionRedirect GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction = "redirect" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + fallthrough + case "challenge": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction: %v", v) + } +} + +type GetFirewallConfigAlgo string + +const ( + GetFirewallConfigAlgoFixedWindow GetFirewallConfigAlgo = "fixed_window" + GetFirewallConfigAlgoTokenBucket GetFirewallConfigAlgo = "token_bucket" +) + +func (e GetFirewallConfigAlgo) ToPointer() *GetFirewallConfigAlgo { + return &e +} +func (e *GetFirewallConfigAlgo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = GetFirewallConfigAlgo(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigAlgo: %v", v) + } +} + +type GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction string + +const ( + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionActionDeny GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction = "deny" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionActionLog GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction = "log" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionActionChallenge GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction = "challenge" + GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionActionRateLimit GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction = "rate_limit" +) + +func (e GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction) ToPointer() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction { + return &e +} +func (e *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + fallthrough + case "challenge": + fallthrough + case "rate_limit": + *e = GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction: %v", v) + } +} + +type GetFirewallConfigRateLimit struct { + Algo GetFirewallConfigAlgo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` + Action *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction `json:"action,omitempty"` +} + +func (o *GetFirewallConfigRateLimit) GetAlgo() GetFirewallConfigAlgo { + if o == nil { + return GetFirewallConfigAlgo("") + } + return o.Algo +} + +func (o *GetFirewallConfigRateLimit) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *GetFirewallConfigRateLimit) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *GetFirewallConfigRateLimit) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +func (o *GetFirewallConfigRateLimit) GetAction() *GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesActionAction { + if o == nil { + return nil + } + return o.Action +} + +type GetFirewallConfigRedirect struct { + Location string `json:"location"` + Permanent bool `json:"permanent"` +} + +func (o *GetFirewallConfigRedirect) GetLocation() string { + if o == nil { + return "" + } + return o.Location +} + +func (o *GetFirewallConfigRedirect) GetPermanent() bool { + if o == nil { + return false + } + return o.Permanent +} + +type GetFirewallConfigMitigate struct { + Action GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction `json:"action"` + RateLimit *GetFirewallConfigRateLimit `json:"rateLimit,omitempty"` + Redirect *GetFirewallConfigRedirect `json:"redirect,omitempty"` + ActionDuration *string `json:"actionDuration,omitempty"` +} + +func (o *GetFirewallConfigMitigate) GetAction() GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction { + if o == nil { + return GetFirewallConfigSecurityResponse200ApplicationJSONResponseBodyRulesAction("") + } + return o.Action +} + +func (o *GetFirewallConfigMitigate) GetRateLimit() *GetFirewallConfigRateLimit { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *GetFirewallConfigMitigate) GetRedirect() *GetFirewallConfigRedirect { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *GetFirewallConfigMitigate) GetActionDuration() *string { + if o == nil { + return nil + } + return o.ActionDuration +} + +type GetFirewallConfigAction struct { + Mitigate *GetFirewallConfigMitigate `json:"mitigate,omitempty"` +} + +func (o *GetFirewallConfigAction) GetMitigate() *GetFirewallConfigMitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type GetFirewallConfigRules struct { + ID string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Active bool `json:"active"` + ConditionGroup []GetFirewallConfigConditionGroup `json:"conditionGroup"` + Action GetFirewallConfigAction `json:"action"` +} + +func (o *GetFirewallConfigRules) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetFirewallConfigRules) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetFirewallConfigRules) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *GetFirewallConfigRules) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigRules) GetConditionGroup() []GetFirewallConfigConditionGroup { + if o == nil { + return []GetFirewallConfigConditionGroup{} + } + return o.ConditionGroup +} + +func (o *GetFirewallConfigRules) GetAction() GetFirewallConfigAction { + if o == nil { + return GetFirewallConfigAction{} + } + return o.Action +} + +type GetFirewallConfigSecurityAction string + +const ( + GetFirewallConfigSecurityActionDeny GetFirewallConfigSecurityAction = "deny" + GetFirewallConfigSecurityActionLog GetFirewallConfigSecurityAction = "log" + GetFirewallConfigSecurityActionChallenge GetFirewallConfigSecurityAction = "challenge" + GetFirewallConfigSecurityActionBypass GetFirewallConfigSecurityAction = "bypass" +) + +func (e GetFirewallConfigSecurityAction) ToPointer() *GetFirewallConfigSecurityAction { + return &e +} +func (e *GetFirewallConfigSecurityAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + fallthrough + case "challenge": + fallthrough + case "bypass": + *e = GetFirewallConfigSecurityAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetFirewallConfigSecurityAction: %v", v) + } +} + +type GetFirewallConfigIps struct { + ID string `json:"id"` + Hostname string `json:"hostname"` + IP string `json:"ip"` + Notes *string `json:"notes,omitempty"` + Action GetFirewallConfigSecurityAction `json:"action"` +} + +func (o *GetFirewallConfigIps) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetFirewallConfigIps) GetHostname() string { + if o == nil { + return "" + } + return o.Hostname +} + +func (o *GetFirewallConfigIps) GetIP() string { + if o == nil { + return "" + } + return o.IP +} + +func (o *GetFirewallConfigIps) GetNotes() *string { + if o == nil { + return nil + } + return o.Notes +} + +func (o *GetFirewallConfigIps) GetAction() GetFirewallConfigSecurityAction { + if o == nil { + return GetFirewallConfigSecurityAction("") + } + return o.Action +} + +type Changes struct { +} + +type GetFirewallConfigOwasp struct { + Active bool `json:"active"` + UpdatedAt *string `json:"updatedAt,omitempty"` + UserID *string `json:"userId,omitempty"` + Username *string `json:"username,omitempty"` +} + +func (o *GetFirewallConfigOwasp) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *GetFirewallConfigOwasp) GetUpdatedAt() *string { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetFirewallConfigOwasp) GetUserID() *string { + if o == nil { + return nil + } + return o.UserID +} + +func (o *GetFirewallConfigOwasp) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +type VerifiedBotsBypass struct { + Active bool `json:"active"` + UpdatedAt *string `json:"updatedAt,omitempty"` + UserID *string `json:"userId,omitempty"` + Username *string `json:"username,omitempty"` +} + +func (o *VerifiedBotsBypass) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *VerifiedBotsBypass) GetUpdatedAt() *string { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *VerifiedBotsBypass) GetUserID() *string { + if o == nil { + return nil + } + return o.UserID +} + +func (o *VerifiedBotsBypass) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +type GetFirewallConfigManagedRules struct { + Owasp *GetFirewallConfigOwasp `json:"owasp,omitempty"` + VerifiedBotsBypass *VerifiedBotsBypass `json:"verifiedBotsBypass,omitempty"` +} + +func (o *GetFirewallConfigManagedRules) GetOwasp() *GetFirewallConfigOwasp { + if o == nil { + return nil + } + return o.Owasp +} + +func (o *GetFirewallConfigManagedRules) GetVerifiedBotsBypass() *VerifiedBotsBypass { + if o == nil { + return nil + } + return o.VerifiedBotsBypass +} + +// GetFirewallConfigResponseBody - If the firewall configuration includes a [custom managed ruleset](https://vercel.com/docs/security/vercel-waf/managed-rulesets), it will include a `crs` item that has the following values: sd: Scanner Detection ma: Multipart Attack lfi: Local File Inclusion Attack rfi: Remote File Inclusion Attack rce: Remote Execution Attack php: PHP Attack gen: Generic Attack xss: XSS Attack sqli: SQL Injection Attack sf: Session Fixation Attack java: Java Attack +type GetFirewallConfigResponseBody struct { + OwnerID string `json:"ownerId"` + ProjectKey string `json:"projectKey"` + ID string `json:"id"` + Version float64 `json:"version"` + UpdatedAt string `json:"updatedAt"` + FirewallEnabled bool `json:"firewallEnabled"` + // Custom Ruleset + Crs GetFirewallConfigCrs `json:"crs"` + Rules []GetFirewallConfigRules `json:"rules"` + Ips []GetFirewallConfigIps `json:"ips"` + Changes []Changes `json:"changes"` + ManagedRules *GetFirewallConfigManagedRules `json:"managedRules,omitempty"` +} + +func (o *GetFirewallConfigResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetFirewallConfigResponseBody) GetProjectKey() string { + if o == nil { + return "" + } + return o.ProjectKey +} + +func (o *GetFirewallConfigResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetFirewallConfigResponseBody) GetVersion() float64 { + if o == nil { + return 0.0 + } + return o.Version +} + +func (o *GetFirewallConfigResponseBody) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *GetFirewallConfigResponseBody) GetFirewallEnabled() bool { + if o == nil { + return false + } + return o.FirewallEnabled +} + +func (o *GetFirewallConfigResponseBody) GetCrs() GetFirewallConfigCrs { + if o == nil { + return GetFirewallConfigCrs{} + } + return o.Crs +} + +func (o *GetFirewallConfigResponseBody) GetRules() []GetFirewallConfigRules { + if o == nil { + return []GetFirewallConfigRules{} + } + return o.Rules +} + +func (o *GetFirewallConfigResponseBody) GetIps() []GetFirewallConfigIps { + if o == nil { + return []GetFirewallConfigIps{} + } + return o.Ips +} + +func (o *GetFirewallConfigResponseBody) GetChanges() []Changes { + if o == nil { + return []Changes{} + } + return o.Changes +} + +func (o *GetFirewallConfigResponseBody) GetManagedRules() *GetFirewallConfigManagedRules { + if o == nil { + return nil + } + return o.ManagedRules +} + +type GetFirewallConfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // If the firewall configuration includes a [custom managed ruleset](https://vercel.com/docs/security/vercel-waf/managed-rulesets), it will include a `crs` item that has the following values: sd: Scanner Detection ma: Multipart Attack lfi: Local File Inclusion Attack rfi: Remote File Inclusion Attack rce: Remote Execution Attack php: PHP Attack gen: Generic Attack xss: XSS Attack sqli: SQL Injection Attack sf: Session Fixation Attack java: Java Attack + Object *GetFirewallConfigResponseBody +} + +func (o *GetFirewallConfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetFirewallConfigResponse) GetObject() *GetFirewallConfigResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getintegrationlogdrains.go b/src/__tests__/mockserver/internal/sdk/models/operations/getintegrationlogdrains.go new file mode 100644 index 00000000..4392c80d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getintegrationlogdrains.go @@ -0,0 +1,319 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetIntegrationLogDrainsRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetIntegrationLogDrainsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetIntegrationLogDrainsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetIntegrationLogDrainsDeliveryFormat - The delivery log format +type GetIntegrationLogDrainsDeliveryFormat string + +const ( + GetIntegrationLogDrainsDeliveryFormatJSON GetIntegrationLogDrainsDeliveryFormat = "json" + GetIntegrationLogDrainsDeliveryFormatNdjson GetIntegrationLogDrainsDeliveryFormat = "ndjson" + GetIntegrationLogDrainsDeliveryFormatSyslog GetIntegrationLogDrainsDeliveryFormat = "syslog" +) + +func (e GetIntegrationLogDrainsDeliveryFormat) ToPointer() *GetIntegrationLogDrainsDeliveryFormat { + return &e +} +func (e *GetIntegrationLogDrainsDeliveryFormat) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "json": + fallthrough + case "ndjson": + fallthrough + case "syslog": + *e = GetIntegrationLogDrainsDeliveryFormat(v) + return nil + default: + return fmt.Errorf("invalid value for GetIntegrationLogDrainsDeliveryFormat: %v", v) + } +} + +// GetIntegrationLogDrainsSources - The sources from which logs are currently being delivered to this log drain. +type GetIntegrationLogDrainsSources string + +const ( + GetIntegrationLogDrainsSourcesBuild GetIntegrationLogDrainsSources = "build" + GetIntegrationLogDrainsSourcesEdge GetIntegrationLogDrainsSources = "edge" + GetIntegrationLogDrainsSourcesLambda GetIntegrationLogDrainsSources = "lambda" + GetIntegrationLogDrainsSourcesStatic GetIntegrationLogDrainsSources = "static" + GetIntegrationLogDrainsSourcesExternal GetIntegrationLogDrainsSources = "external" + GetIntegrationLogDrainsSourcesFirewall GetIntegrationLogDrainsSources = "firewall" +) + +func (e GetIntegrationLogDrainsSources) ToPointer() *GetIntegrationLogDrainsSources { + return &e +} +func (e *GetIntegrationLogDrainsSources) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "build": + fallthrough + case "edge": + fallthrough + case "lambda": + fallthrough + case "static": + fallthrough + case "external": + fallthrough + case "firewall": + *e = GetIntegrationLogDrainsSources(v) + return nil + default: + return fmt.Errorf("invalid value for GetIntegrationLogDrainsSources: %v", v) + } +} + +// CreatedFrom - Whether the log drain was created by an integration or by a user +type CreatedFrom string + +const ( + CreatedFromSelfServed CreatedFrom = "self-served" + CreatedFromIntegration CreatedFrom = "integration" +) + +func (e CreatedFrom) ToPointer() *CreatedFrom { + return &e +} +func (e *CreatedFrom) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "self-served": + fallthrough + case "integration": + *e = CreatedFrom(v) + return nil + default: + return fmt.Errorf("invalid value for CreatedFrom: %v", v) + } +} + +// GetIntegrationLogDrainsEnvironments - The environment of log drain +type GetIntegrationLogDrainsEnvironments string + +const ( + GetIntegrationLogDrainsEnvironmentsProduction GetIntegrationLogDrainsEnvironments = "production" + GetIntegrationLogDrainsEnvironmentsPreview GetIntegrationLogDrainsEnvironments = "preview" +) + +func (e GetIntegrationLogDrainsEnvironments) ToPointer() *GetIntegrationLogDrainsEnvironments { + return &e +} +func (e *GetIntegrationLogDrainsEnvironments) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + *e = GetIntegrationLogDrainsEnvironments(v) + return nil + default: + return fmt.Errorf("invalid value for GetIntegrationLogDrainsEnvironments: %v", v) + } +} + +type GetIntegrationLogDrainsResponseBody struct { + // The oauth2 client application id that created this log drain + ClientID *string `json:"clientId,omitempty"` + // The client configuration this log drain was created with + ConfigurationID *string `json:"configurationId,omitempty"` + // A timestamp that tells you when the log drain was created + CreatedAt float64 `json:"createdAt"` + // The unique identifier of the log drain. Always prefixed with `ld_` + ID string `json:"id"` + // The delivery log format + DeliveryFormat *GetIntegrationLogDrainsDeliveryFormat `json:"deliveryFormat,omitempty"` + // The name of the log drain + Name string `json:"name"` + // The identifier of the team or user whose events will trigger the log drain + OwnerID string `json:"ownerId"` + ProjectID *string `json:"projectId,omitempty"` + // The identifier of the projects this log drain is associated with + ProjectIds []string `json:"projectIds,omitempty"` + // The URL to call when logs are generated + URL string `json:"url"` + // The sources from which logs are currently being delivered to this log drain. + Sources []GetIntegrationLogDrainsSources `json:"sources,omitempty"` + // Whether the log drain was created by an integration or by a user + CreatedFrom *CreatedFrom `json:"createdFrom,omitempty"` + // The headers to send with the request + Headers map[string]string `json:"headers,omitempty"` + // The environment of log drain + Environments []GetIntegrationLogDrainsEnvironments `json:"environments"` + // The branch regexp of log drain + Branch *string `json:"branch,omitempty"` + // The sampling rate of log drain + SamplingRate *float64 `json:"samplingRate,omitempty"` +} + +func (o *GetIntegrationLogDrainsResponseBody) GetClientID() *string { + if o == nil { + return nil + } + return o.ClientID +} + +func (o *GetIntegrationLogDrainsResponseBody) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *GetIntegrationLogDrainsResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetIntegrationLogDrainsResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetIntegrationLogDrainsResponseBody) GetDeliveryFormat() *GetIntegrationLogDrainsDeliveryFormat { + if o == nil { + return nil + } + return o.DeliveryFormat +} + +func (o *GetIntegrationLogDrainsResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetIntegrationLogDrainsResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetIntegrationLogDrainsResponseBody) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetIntegrationLogDrainsResponseBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +func (o *GetIntegrationLogDrainsResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetIntegrationLogDrainsResponseBody) GetSources() []GetIntegrationLogDrainsSources { + if o == nil { + return nil + } + return o.Sources +} + +func (o *GetIntegrationLogDrainsResponseBody) GetCreatedFrom() *CreatedFrom { + if o == nil { + return nil + } + return o.CreatedFrom +} + +func (o *GetIntegrationLogDrainsResponseBody) GetHeaders() map[string]string { + if o == nil { + return nil + } + return o.Headers +} + +func (o *GetIntegrationLogDrainsResponseBody) GetEnvironments() []GetIntegrationLogDrainsEnvironments { + if o == nil { + return []GetIntegrationLogDrainsEnvironments{} + } + return o.Environments +} + +func (o *GetIntegrationLogDrainsResponseBody) GetBranch() *string { + if o == nil { + return nil + } + return o.Branch +} + +func (o *GetIntegrationLogDrainsResponseBody) GetSamplingRate() *float64 { + if o == nil { + return nil + } + return o.SamplingRate +} + +type GetIntegrationLogDrainsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // A list of log drains + ResponseBodies []GetIntegrationLogDrainsResponseBody +} + +func (o *GetIntegrationLogDrainsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetIntegrationLogDrainsResponse) GetResponseBodies() []GetIntegrationLogDrainsResponseBody { + if o == nil { + return nil + } + return o.ResponseBodies +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getinvoice.go b/src/__tests__/mockserver/internal/sdk/models/operations/getinvoice.go new file mode 100644 index 00000000..2e29b4a1 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getinvoice.go @@ -0,0 +1,372 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetInvoiceRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` + InvoiceID string `pathParam:"style=simple,explode=false,name=invoiceId"` +} + +func (o *GetInvoiceRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +func (o *GetInvoiceRequest) GetInvoiceID() string { + if o == nil { + return "" + } + return o.InvoiceID +} + +type GetInvoicePeriod struct { + Start string `json:"start"` + End string `json:"end"` +} + +func (o *GetInvoicePeriod) GetStart() string { + if o == nil { + return "" + } + return o.Start +} + +func (o *GetInvoicePeriod) GetEnd() string { + if o == nil { + return "" + } + return o.End +} + +type GetInvoiceItems struct { + BillingPlanID string `json:"billingPlanId"` + ResourceID *string `json:"resourceId,omitempty"` + Start *string `json:"start,omitempty"` + End *string `json:"end,omitempty"` + Name string `json:"name"` + Details *string `json:"details,omitempty"` + Price string `json:"price"` + Quantity float64 `json:"quantity"` + Units string `json:"units"` + Total string `json:"total"` +} + +func (o *GetInvoiceItems) GetBillingPlanID() string { + if o == nil { + return "" + } + return o.BillingPlanID +} + +func (o *GetInvoiceItems) GetResourceID() *string { + if o == nil { + return nil + } + return o.ResourceID +} + +func (o *GetInvoiceItems) GetStart() *string { + if o == nil { + return nil + } + return o.Start +} + +func (o *GetInvoiceItems) GetEnd() *string { + if o == nil { + return nil + } + return o.End +} + +func (o *GetInvoiceItems) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetInvoiceItems) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *GetInvoiceItems) GetPrice() string { + if o == nil { + return "" + } + return o.Price +} + +func (o *GetInvoiceItems) GetQuantity() float64 { + if o == nil { + return 0.0 + } + return o.Quantity +} + +func (o *GetInvoiceItems) GetUnits() string { + if o == nil { + return "" + } + return o.Units +} + +func (o *GetInvoiceItems) GetTotal() string { + if o == nil { + return "" + } + return o.Total +} + +type GetInvoiceDiscounts struct { + BillingPlanID string `json:"billingPlanId"` + ResourceID *string `json:"resourceId,omitempty"` + Start *string `json:"start,omitempty"` + End *string `json:"end,omitempty"` + Name string `json:"name"` + Details *string `json:"details,omitempty"` + Amount string `json:"amount"` +} + +func (o *GetInvoiceDiscounts) GetBillingPlanID() string { + if o == nil { + return "" + } + return o.BillingPlanID +} + +func (o *GetInvoiceDiscounts) GetResourceID() *string { + if o == nil { + return nil + } + return o.ResourceID +} + +func (o *GetInvoiceDiscounts) GetStart() *string { + if o == nil { + return nil + } + return o.Start +} + +func (o *GetInvoiceDiscounts) GetEnd() *string { + if o == nil { + return nil + } + return o.End +} + +func (o *GetInvoiceDiscounts) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetInvoiceDiscounts) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *GetInvoiceDiscounts) GetAmount() string { + if o == nil { + return "" + } + return o.Amount +} + +type State string + +const ( + StatePending State = "pending" + StateScheduled State = "scheduled" + StateInvoiced State = "invoiced" + StatePaid State = "paid" + StateNotpaid State = "notpaid" + StateRefundRequested State = "refund_requested" + StateRefunded State = "refunded" +) + +func (e State) ToPointer() *State { + return &e +} +func (e *State) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pending": + fallthrough + case "scheduled": + fallthrough + case "invoiced": + fallthrough + case "paid": + fallthrough + case "notpaid": + fallthrough + case "refund_requested": + fallthrough + case "refunded": + *e = State(v) + return nil + default: + return fmt.Errorf("invalid value for State: %v", v) + } +} + +type GetInvoiceResponseBody struct { + InvoiceID string `json:"invoiceId"` + ExternalID *string `json:"externalId,omitempty"` + InvoiceNumber *string `json:"invoiceNumber,omitempty"` + InvoiceDate string `json:"invoiceDate"` + Period GetInvoicePeriod `json:"period"` + Memo *string `json:"memo,omitempty"` + Items []GetInvoiceItems `json:"items"` + Discounts []GetInvoiceDiscounts `json:"discounts,omitempty"` + Total string `json:"total"` + Created string `json:"created"` + Updated string `json:"updated"` + State State `json:"state"` + RefundReason *string `json:"refundReason,omitempty"` + RefundTotal *string `json:"refundTotal,omitempty"` + Test bool `json:"test"` +} + +func (o *GetInvoiceResponseBody) GetInvoiceID() string { + if o == nil { + return "" + } + return o.InvoiceID +} + +func (o *GetInvoiceResponseBody) GetExternalID() *string { + if o == nil { + return nil + } + return o.ExternalID +} + +func (o *GetInvoiceResponseBody) GetInvoiceNumber() *string { + if o == nil { + return nil + } + return o.InvoiceNumber +} + +func (o *GetInvoiceResponseBody) GetInvoiceDate() string { + if o == nil { + return "" + } + return o.InvoiceDate +} + +func (o *GetInvoiceResponseBody) GetPeriod() GetInvoicePeriod { + if o == nil { + return GetInvoicePeriod{} + } + return o.Period +} + +func (o *GetInvoiceResponseBody) GetMemo() *string { + if o == nil { + return nil + } + return o.Memo +} + +func (o *GetInvoiceResponseBody) GetItems() []GetInvoiceItems { + if o == nil { + return []GetInvoiceItems{} + } + return o.Items +} + +func (o *GetInvoiceResponseBody) GetDiscounts() []GetInvoiceDiscounts { + if o == nil { + return nil + } + return o.Discounts +} + +func (o *GetInvoiceResponseBody) GetTotal() string { + if o == nil { + return "" + } + return o.Total +} + +func (o *GetInvoiceResponseBody) GetCreated() string { + if o == nil { + return "" + } + return o.Created +} + +func (o *GetInvoiceResponseBody) GetUpdated() string { + if o == nil { + return "" + } + return o.Updated +} + +func (o *GetInvoiceResponseBody) GetState() State { + if o == nil { + return State("") + } + return o.State +} + +func (o *GetInvoiceResponseBody) GetRefundReason() *string { + if o == nil { + return nil + } + return o.RefundReason +} + +func (o *GetInvoiceResponseBody) GetRefundTotal() *string { + if o == nil { + return nil + } + return o.RefundTotal +} + +func (o *GetInvoiceResponseBody) GetTest() bool { + if o == nil { + return false + } + return o.Test +} + +type GetInvoiceResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetInvoiceResponseBody +} + +func (o *GetInvoiceResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetInvoiceResponse) GetObject() *GetInvoiceResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getmember.go b/src/__tests__/mockserver/internal/sdk/models/operations/getmember.go new file mode 100644 index 00000000..f9b8aa41 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getmember.go @@ -0,0 +1,92 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetMemberRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` + MemberID string `pathParam:"style=simple,explode=false,name=memberId"` +} + +func (o *GetMemberRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +func (o *GetMemberRequest) GetMemberID() string { + if o == nil { + return "" + } + return o.MemberID +} + +type GetMemberRole string + +const ( + GetMemberRoleAdmin GetMemberRole = "ADMIN" + GetMemberRoleUser GetMemberRole = "USER" +) + +func (e GetMemberRole) ToPointer() *GetMemberRole { + return &e +} +func (e *GetMemberRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "USER": + *e = GetMemberRole(v) + return nil + default: + return fmt.Errorf("invalid value for GetMemberRole: %v", v) + } +} + +type GetMemberResponseBody struct { + ID string `json:"id"` + Role GetMemberRole `json:"role"` +} + +func (o *GetMemberResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetMemberResponseBody) GetRole() GetMemberRole { + if o == nil { + return GetMemberRole("") + } + return o.Role +} + +type GetMemberResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetMemberResponseBody +} + +func (o *GetMemberResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetMemberResponse) GetObject() *GetMemberResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getprojectdomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/getprojectdomain.go new file mode 100644 index 00000000..9563aae1 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getprojectdomain.go @@ -0,0 +1,194 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetProjectDomainRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The project domain name + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetProjectDomainRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *GetProjectDomainRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *GetProjectDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetProjectDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// Verification - A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. +type Verification struct { + Type string `json:"type"` + Domain string `json:"domain"` + Value string `json:"value"` + Reason string `json:"reason"` +} + +func (o *Verification) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *Verification) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *Verification) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Verification) GetReason() string { + if o == nil { + return "" + } + return o.Reason +} + +type GetProjectDomainResponseBody struct { + Name string `json:"name"` + ApexName string `json:"apexName"` + ProjectID string `json:"projectId"` + Redirect *string `json:"redirect,omitempty"` + RedirectStatusCode *float64 `json:"redirectStatusCode,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + CustomEnvironmentID *string `json:"customEnvironmentId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + // `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. + Verified bool `json:"verified"` + // A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. + Verification []Verification `json:"verification,omitempty"` +} + +func (o *GetProjectDomainResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetProjectDomainResponseBody) GetApexName() string { + if o == nil { + return "" + } + return o.ApexName +} + +func (o *GetProjectDomainResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *GetProjectDomainResponseBody) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *GetProjectDomainResponseBody) GetRedirectStatusCode() *float64 { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +func (o *GetProjectDomainResponseBody) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *GetProjectDomainResponseBody) GetCustomEnvironmentID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentID +} + +func (o *GetProjectDomainResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectDomainResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectDomainResponseBody) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *GetProjectDomainResponseBody) GetVerification() []Verification { + if o == nil { + return nil + } + return o.Verification +} + +type GetProjectDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetProjectDomainResponseBody +} + +func (o *GetProjectDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetProjectDomainResponse) GetObject() *GetProjectDomainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getprojectdomains.go b/src/__tests__/mockserver/internal/sdk/models/operations/getprojectdomains.go new file mode 100644 index 00000000..f07760da --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getprojectdomains.go @@ -0,0 +1,455 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// Production - Filters only production domains when set to `true`. +type Production string + +const ( + ProductionTrue Production = "true" + ProductionFalse Production = "false" +) + +func (e Production) ToPointer() *Production { + return &e +} +func (e *Production) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "true": + fallthrough + case "false": + *e = Production(v) + return nil + default: + return fmt.Errorf("invalid value for Production: %v", v) + } +} + +// QueryParamTarget - Filters on the target of the domain. Can be either \"production\", \"preview\" +type QueryParamTarget string + +const ( + QueryParamTargetProduction QueryParamTarget = "production" + QueryParamTargetPreview QueryParamTarget = "preview" +) + +func (e QueryParamTarget) ToPointer() *QueryParamTarget { + return &e +} +func (e *QueryParamTarget) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + *e = QueryParamTarget(v) + return nil + default: + return fmt.Errorf("invalid value for QueryParamTarget: %v", v) + } +} + +// Redirects - Excludes redirect project domains when \"false\". Includes redirect project domains when \"true\" (default). +type Redirects string + +const ( + RedirectsTrue Redirects = "true" + RedirectsFalse Redirects = "false" +) + +func (e Redirects) ToPointer() *Redirects { + return &e +} +func (e *Redirects) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "true": + fallthrough + case "false": + *e = Redirects(v) + return nil + default: + return fmt.Errorf("invalid value for Redirects: %v", v) + } +} + +// Verified - Filters domains based on their verification status. +type Verified string + +const ( + VerifiedTrue Verified = "true" + VerifiedFalse Verified = "false" +) + +func (e Verified) ToPointer() *Verified { + return &e +} +func (e *Verified) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "true": + fallthrough + case "false": + *e = Verified(v) + return nil + default: + return fmt.Errorf("invalid value for Verified: %v", v) + } +} + +// Order - Domains sort order by createdAt +type Order string + +const ( + OrderAsc Order = "ASC" + OrderDesc Order = "DESC" +) + +func (e Order) ToPointer() *Order { + return &e +} +func (e *Order) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ASC": + fallthrough + case "DESC": + *e = Order(v) + return nil + default: + return fmt.Errorf("invalid value for Order: %v", v) + } +} + +type GetProjectDomainsRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // Filters only production domains when set to `true`. + Production *Production `default:"false" queryParam:"style=form,explode=true,name=production"` + // Filters on the target of the domain. Can be either \"production\", \"preview\" + Target *QueryParamTarget `queryParam:"style=form,explode=true,name=target"` + // The unique custom environment identifier within the project + CustomEnvironmentID *string `queryParam:"style=form,explode=true,name=customEnvironmentId"` + // Filters domains based on specific branch. + GitBranch *string `queryParam:"style=form,explode=true,name=gitBranch"` + // Excludes redirect project domains when \"false\". Includes redirect project domains when \"true\" (default). + Redirects *Redirects `default:"true" queryParam:"style=form,explode=true,name=redirects"` + // Filters domains based on their redirect target. + Redirect *string `queryParam:"style=form,explode=true,name=redirect"` + // Filters domains based on their verification status. + Verified *Verified `queryParam:"style=form,explode=true,name=verified"` + // Maximum number of domains to list from a request (max 100). + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Get domains created after this JavaScript timestamp. + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Get domains created before this JavaScript timestamp. + Until *float64 `queryParam:"style=form,explode=true,name=until"` + // Domains sort order by createdAt + Order *Order `default:"DESC" queryParam:"style=form,explode=true,name=order"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (g GetProjectDomainsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetProjectDomainsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err + } + return nil +} + +func (o *GetProjectDomainsRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *GetProjectDomainsRequest) GetProduction() *Production { + if o == nil { + return nil + } + return o.Production +} + +func (o *GetProjectDomainsRequest) GetTarget() *QueryParamTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetProjectDomainsRequest) GetCustomEnvironmentID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentID +} + +func (o *GetProjectDomainsRequest) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *GetProjectDomainsRequest) GetRedirects() *Redirects { + if o == nil { + return nil + } + return o.Redirects +} + +func (o *GetProjectDomainsRequest) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *GetProjectDomainsRequest) GetVerified() *Verified { + if o == nil { + return nil + } + return o.Verified +} + +func (o *GetProjectDomainsRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetProjectDomainsRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetProjectDomainsRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *GetProjectDomainsRequest) GetOrder() *Order { + if o == nil { + return nil + } + return o.Order +} + +func (o *GetProjectDomainsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetProjectDomainsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetProjectDomainsVerification - A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. +type GetProjectDomainsVerification struct { + Type string `json:"type"` + Domain string `json:"domain"` + Value string `json:"value"` + Reason string `json:"reason"` +} + +func (o *GetProjectDomainsVerification) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *GetProjectDomainsVerification) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *GetProjectDomainsVerification) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *GetProjectDomainsVerification) GetReason() string { + if o == nil { + return "" + } + return o.Reason +} + +type GetProjectDomainsDomains struct { + Name string `json:"name"` + ApexName string `json:"apexName"` + ProjectID string `json:"projectId"` + Redirect *string `json:"redirect,omitempty"` + RedirectStatusCode *float64 `json:"redirectStatusCode,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + CustomEnvironmentID *string `json:"customEnvironmentId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + // `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. + Verified bool `json:"verified"` + // A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. + Verification []GetProjectDomainsVerification `json:"verification,omitempty"` +} + +func (o *GetProjectDomainsDomains) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetProjectDomainsDomains) GetApexName() string { + if o == nil { + return "" + } + return o.ApexName +} + +func (o *GetProjectDomainsDomains) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *GetProjectDomainsDomains) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *GetProjectDomainsDomains) GetRedirectStatusCode() *float64 { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +func (o *GetProjectDomainsDomains) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *GetProjectDomainsDomains) GetCustomEnvironmentID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentID +} + +func (o *GetProjectDomainsDomains) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectDomainsDomains) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectDomainsDomains) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *GetProjectDomainsDomains) GetVerification() []GetProjectDomainsVerification { + if o == nil { + return nil + } + return o.Verification +} + +// GetProjectDomainsResponseBody - Successful response retrieving a list of domains +type GetProjectDomainsResponseBody struct { + Domains []GetProjectDomainsDomains `json:"domains"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *GetProjectDomainsResponseBody) GetDomains() []GetProjectDomainsDomains { + if o == nil { + return []GetProjectDomainsDomains{} + } + return o.Domains +} + +func (o *GetProjectDomainsResponseBody) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type GetProjectDomainsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response retrieving a list of domains + Object *GetProjectDomainsResponseBody +} + +func (o *GetProjectDomainsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetProjectDomainsResponse) GetObject() *GetProjectDomainsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getprojectenv.go b/src/__tests__/mockserver/internal/sdk/models/operations/getprojectenv.go new file mode 100644 index 00000000..fb1cb1a9 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getprojectenv.go @@ -0,0 +1,4215 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetProjectEnvRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The unique ID for the environment variable to get the decrypted value. + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetProjectEnvRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *GetProjectEnvRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectEnvRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetProjectEnvRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetProjectEnvTargetProjectsResponse2 string + +const ( + GetProjectEnvTargetProjectsResponse2Production GetProjectEnvTargetProjectsResponse2 = "production" + GetProjectEnvTargetProjectsResponse2Preview GetProjectEnvTargetProjectsResponse2 = "preview" + GetProjectEnvTargetProjectsResponse2Development GetProjectEnvTargetProjectsResponse2 = "development" +) + +func (e GetProjectEnvTargetProjectsResponse2) ToPointer() *GetProjectEnvTargetProjectsResponse2 { + return &e +} +func (e *GetProjectEnvTargetProjectsResponse2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = GetProjectEnvTargetProjectsResponse2(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvTargetProjectsResponse2: %v", v) + } +} + +type GetProjectEnvResponseBodyProjectsResponseTargetType string + +const ( + GetProjectEnvResponseBodyProjectsResponseTargetTypeArrayOfStr GetProjectEnvResponseBodyProjectsResponseTargetType = "arrayOfStr" + GetProjectEnvResponseBodyProjectsResponseTargetTypeGetProjectEnvTargetProjectsResponse2 GetProjectEnvResponseBodyProjectsResponseTargetType = "getProjectEnv_target_projects_response_2" +) + +type GetProjectEnvResponseBodyProjectsResponseTarget struct { + ArrayOfStr []string + GetProjectEnvTargetProjectsResponse2 *GetProjectEnvTargetProjectsResponse2 + + Type GetProjectEnvResponseBodyProjectsResponseTargetType +} + +func CreateGetProjectEnvResponseBodyProjectsResponseTargetArrayOfStr(arrayOfStr []string) GetProjectEnvResponseBodyProjectsResponseTarget { + typ := GetProjectEnvResponseBodyProjectsResponseTargetTypeArrayOfStr + + return GetProjectEnvResponseBodyProjectsResponseTarget{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseTargetGetProjectEnvTargetProjectsResponse2(getProjectEnvTargetProjectsResponse2 GetProjectEnvTargetProjectsResponse2) GetProjectEnvResponseBodyProjectsResponseTarget { + typ := GetProjectEnvResponseBodyProjectsResponseTargetTypeGetProjectEnvTargetProjectsResponse2 + + return GetProjectEnvResponseBodyProjectsResponseTarget{ + GetProjectEnvTargetProjectsResponse2: &getProjectEnvTargetProjectsResponse2, + Type: typ, + } +} + +func (u *GetProjectEnvResponseBodyProjectsResponseTarget) UnmarshalJSON(data []byte) error { + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = GetProjectEnvResponseBodyProjectsResponseTargetTypeArrayOfStr + return nil + } + + var getProjectEnvTargetProjectsResponse2 GetProjectEnvTargetProjectsResponse2 = GetProjectEnvTargetProjectsResponse2("") + if err := utils.UnmarshalJSON(data, &getProjectEnvTargetProjectsResponse2, "", true, true); err == nil { + u.GetProjectEnvTargetProjectsResponse2 = &getProjectEnvTargetProjectsResponse2 + u.Type = GetProjectEnvResponseBodyProjectsResponseTargetTypeGetProjectEnvTargetProjectsResponse2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectEnvResponseBodyProjectsResponseTarget", string(data)) +} + +func (u GetProjectEnvResponseBodyProjectsResponseTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.GetProjectEnvTargetProjectsResponse2 != nil { + return utils.MarshalJSON(u.GetProjectEnvTargetProjectsResponse2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectEnvResponseBodyProjectsResponseTarget: all fields are null") +} + +type GetProjectEnvResponseBodyProjectsResponseType string + +const ( + GetProjectEnvResponseBodyProjectsResponseTypeSystem GetProjectEnvResponseBodyProjectsResponseType = "system" + GetProjectEnvResponseBodyProjectsResponseTypeEncrypted GetProjectEnvResponseBodyProjectsResponseType = "encrypted" + GetProjectEnvResponseBodyProjectsResponseTypePlain GetProjectEnvResponseBodyProjectsResponseType = "plain" + GetProjectEnvResponseBodyProjectsResponseTypeSensitive GetProjectEnvResponseBodyProjectsResponseType = "sensitive" + GetProjectEnvResponseBodyProjectsResponseTypeSecret GetProjectEnvResponseBodyProjectsResponseType = "secret" +) + +func (e GetProjectEnvResponseBodyProjectsResponseType) ToPointer() *GetProjectEnvResponseBodyProjectsResponseType { + return &e +} +func (e *GetProjectEnvResponseBodyProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = GetProjectEnvResponseBodyProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvResponseBodyProjectsResponseType: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315TypeFlagsConnectionString GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type = "flags-connection-string" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse15 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse15) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314TypeIntegrationStoreSecret GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type = "integration-store-secret" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse14 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse14) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *GetProjectEnvContentHintProjectsResponse14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *GetProjectEnvContentHintProjectsResponse14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *GetProjectEnvContentHintProjectsResponse14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313TypePostgresURLNoSsl GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type = "postgres-url-no-ssl" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse13 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse13) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312TypePostgresDatabase GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type = "postgres-database" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse12 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse12) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311TypePostgresPassword GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type = "postgres-password" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse11 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse11) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310TypePostgresHost GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type = "postgres-host" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse10 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse10) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39TypePostgresUser GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type = "postgres-user" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse9 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse9) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38TypePostgresPrismaURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type = "postgres-prisma-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse8 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse8) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37TypePostgresURLNonPooling GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type = "postgres-url-non-pooling" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse7 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse7) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36TypePostgresURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type = "postgres-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse6 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse6) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35TypeBlobReadWriteToken GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type = "blob-read-write-token" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse5 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse5) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34TypeRedisRestAPIReadOnlyToken GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type = "redis-rest-api-read-only-token" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse4 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse4) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33TypeRedisRestAPIToken GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type = "redis-rest-api-token" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse3 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse3) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32TypeRedisRestAPIURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type = "redis-rest-api-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse2 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse2) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3TypeRedisURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type = "redis-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse1 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjectsResponse1) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjectsResponse1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvResponseBodyProjectsResponseContentHintType string + +const ( + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse1 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_1" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse2 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_2" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse3 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_3" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse4 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_4" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse5 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_5" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse6 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_6" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse7 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_7" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse8 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_8" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse9 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_9" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse10 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_10" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse11 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_11" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse12 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_12" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse13 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_13" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse14 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_14" + GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse15 GetProjectEnvResponseBodyProjectsResponseContentHintType = "getProjectEnv_contentHint_projects_response_15" +) + +type GetProjectEnvResponseBodyProjectsResponseContentHint struct { + GetProjectEnvContentHintProjectsResponse1 *GetProjectEnvContentHintProjectsResponse1 + GetProjectEnvContentHintProjectsResponse2 *GetProjectEnvContentHintProjectsResponse2 + GetProjectEnvContentHintProjectsResponse3 *GetProjectEnvContentHintProjectsResponse3 + GetProjectEnvContentHintProjectsResponse4 *GetProjectEnvContentHintProjectsResponse4 + GetProjectEnvContentHintProjectsResponse5 *GetProjectEnvContentHintProjectsResponse5 + GetProjectEnvContentHintProjectsResponse6 *GetProjectEnvContentHintProjectsResponse6 + GetProjectEnvContentHintProjectsResponse7 *GetProjectEnvContentHintProjectsResponse7 + GetProjectEnvContentHintProjectsResponse8 *GetProjectEnvContentHintProjectsResponse8 + GetProjectEnvContentHintProjectsResponse9 *GetProjectEnvContentHintProjectsResponse9 + GetProjectEnvContentHintProjectsResponse10 *GetProjectEnvContentHintProjectsResponse10 + GetProjectEnvContentHintProjectsResponse11 *GetProjectEnvContentHintProjectsResponse11 + GetProjectEnvContentHintProjectsResponse12 *GetProjectEnvContentHintProjectsResponse12 + GetProjectEnvContentHintProjectsResponse13 *GetProjectEnvContentHintProjectsResponse13 + GetProjectEnvContentHintProjectsResponse14 *GetProjectEnvContentHintProjectsResponse14 + GetProjectEnvContentHintProjectsResponse15 *GetProjectEnvContentHintProjectsResponse15 + + Type GetProjectEnvResponseBodyProjectsResponseContentHintType +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse1(getProjectEnvContentHintProjectsResponse1 GetProjectEnvContentHintProjectsResponse1) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse1 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse1: &getProjectEnvContentHintProjectsResponse1, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse2(getProjectEnvContentHintProjectsResponse2 GetProjectEnvContentHintProjectsResponse2) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse2 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse2: &getProjectEnvContentHintProjectsResponse2, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse3(getProjectEnvContentHintProjectsResponse3 GetProjectEnvContentHintProjectsResponse3) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse3 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse3: &getProjectEnvContentHintProjectsResponse3, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse4(getProjectEnvContentHintProjectsResponse4 GetProjectEnvContentHintProjectsResponse4) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse4 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse4: &getProjectEnvContentHintProjectsResponse4, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse5(getProjectEnvContentHintProjectsResponse5 GetProjectEnvContentHintProjectsResponse5) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse5 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse5: &getProjectEnvContentHintProjectsResponse5, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse6(getProjectEnvContentHintProjectsResponse6 GetProjectEnvContentHintProjectsResponse6) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse6 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse6: &getProjectEnvContentHintProjectsResponse6, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse7(getProjectEnvContentHintProjectsResponse7 GetProjectEnvContentHintProjectsResponse7) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse7 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse7: &getProjectEnvContentHintProjectsResponse7, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse8(getProjectEnvContentHintProjectsResponse8 GetProjectEnvContentHintProjectsResponse8) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse8 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse8: &getProjectEnvContentHintProjectsResponse8, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse9(getProjectEnvContentHintProjectsResponse9 GetProjectEnvContentHintProjectsResponse9) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse9 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse9: &getProjectEnvContentHintProjectsResponse9, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse10(getProjectEnvContentHintProjectsResponse10 GetProjectEnvContentHintProjectsResponse10) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse10 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse10: &getProjectEnvContentHintProjectsResponse10, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse11(getProjectEnvContentHintProjectsResponse11 GetProjectEnvContentHintProjectsResponse11) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse11 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse11: &getProjectEnvContentHintProjectsResponse11, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse12(getProjectEnvContentHintProjectsResponse12 GetProjectEnvContentHintProjectsResponse12) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse12 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse12: &getProjectEnvContentHintProjectsResponse12, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse13(getProjectEnvContentHintProjectsResponse13 GetProjectEnvContentHintProjectsResponse13) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse13 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse13: &getProjectEnvContentHintProjectsResponse13, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse14(getProjectEnvContentHintProjectsResponse14 GetProjectEnvContentHintProjectsResponse14) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse14 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse14: &getProjectEnvContentHintProjectsResponse14, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsResponseContentHintGetProjectEnvContentHintProjectsResponse15(getProjectEnvContentHintProjectsResponse15 GetProjectEnvContentHintProjectsResponse15) GetProjectEnvResponseBodyProjectsResponseContentHint { + typ := GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse15 + + return GetProjectEnvResponseBodyProjectsResponseContentHint{ + GetProjectEnvContentHintProjectsResponse15: &getProjectEnvContentHintProjectsResponse15, + Type: typ, + } +} + +func (u *GetProjectEnvResponseBodyProjectsResponseContentHint) UnmarshalJSON(data []byte) error { + + var getProjectEnvContentHintProjectsResponse7 GetProjectEnvContentHintProjectsResponse7 = GetProjectEnvContentHintProjectsResponse7{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse7, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse7 = &getProjectEnvContentHintProjectsResponse7 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse7 + return nil + } + + var getProjectEnvContentHintProjectsResponse9 GetProjectEnvContentHintProjectsResponse9 = GetProjectEnvContentHintProjectsResponse9{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse9, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse9 = &getProjectEnvContentHintProjectsResponse9 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse9 + return nil + } + + var getProjectEnvContentHintProjectsResponse3 GetProjectEnvContentHintProjectsResponse3 = GetProjectEnvContentHintProjectsResponse3{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse3, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse3 = &getProjectEnvContentHintProjectsResponse3 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse3 + return nil + } + + var getProjectEnvContentHintProjectsResponse4 GetProjectEnvContentHintProjectsResponse4 = GetProjectEnvContentHintProjectsResponse4{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse4, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse4 = &getProjectEnvContentHintProjectsResponse4 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse4 + return nil + } + + var getProjectEnvContentHintProjectsResponse5 GetProjectEnvContentHintProjectsResponse5 = GetProjectEnvContentHintProjectsResponse5{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse5, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse5 = &getProjectEnvContentHintProjectsResponse5 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse5 + return nil + } + + var getProjectEnvContentHintProjectsResponse6 GetProjectEnvContentHintProjectsResponse6 = GetProjectEnvContentHintProjectsResponse6{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse6, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse6 = &getProjectEnvContentHintProjectsResponse6 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse6 + return nil + } + + var getProjectEnvContentHintProjectsResponse2 GetProjectEnvContentHintProjectsResponse2 = GetProjectEnvContentHintProjectsResponse2{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse2, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse2 = &getProjectEnvContentHintProjectsResponse2 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse2 + return nil + } + + var getProjectEnvContentHintProjectsResponse8 GetProjectEnvContentHintProjectsResponse8 = GetProjectEnvContentHintProjectsResponse8{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse8, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse8 = &getProjectEnvContentHintProjectsResponse8 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse8 + return nil + } + + var getProjectEnvContentHintProjectsResponse1 GetProjectEnvContentHintProjectsResponse1 = GetProjectEnvContentHintProjectsResponse1{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse1, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse1 = &getProjectEnvContentHintProjectsResponse1 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse1 + return nil + } + + var getProjectEnvContentHintProjectsResponse10 GetProjectEnvContentHintProjectsResponse10 = GetProjectEnvContentHintProjectsResponse10{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse10, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse10 = &getProjectEnvContentHintProjectsResponse10 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse10 + return nil + } + + var getProjectEnvContentHintProjectsResponse11 GetProjectEnvContentHintProjectsResponse11 = GetProjectEnvContentHintProjectsResponse11{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse11, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse11 = &getProjectEnvContentHintProjectsResponse11 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse11 + return nil + } + + var getProjectEnvContentHintProjectsResponse12 GetProjectEnvContentHintProjectsResponse12 = GetProjectEnvContentHintProjectsResponse12{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse12, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse12 = &getProjectEnvContentHintProjectsResponse12 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse12 + return nil + } + + var getProjectEnvContentHintProjectsResponse13 GetProjectEnvContentHintProjectsResponse13 = GetProjectEnvContentHintProjectsResponse13{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse13, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse13 = &getProjectEnvContentHintProjectsResponse13 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse13 + return nil + } + + var getProjectEnvContentHintProjectsResponse15 GetProjectEnvContentHintProjectsResponse15 = GetProjectEnvContentHintProjectsResponse15{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse15, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse15 = &getProjectEnvContentHintProjectsResponse15 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse15 + return nil + } + + var getProjectEnvContentHintProjectsResponse14 GetProjectEnvContentHintProjectsResponse14 = GetProjectEnvContentHintProjectsResponse14{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjectsResponse14, "", true, true); err == nil { + u.GetProjectEnvContentHintProjectsResponse14 = &getProjectEnvContentHintProjectsResponse14 + u.Type = GetProjectEnvResponseBodyProjectsResponseContentHintTypeGetProjectEnvContentHintProjectsResponse14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectEnvResponseBodyProjectsResponseContentHint", string(data)) +} + +func (u GetProjectEnvResponseBodyProjectsResponseContentHint) MarshalJSON() ([]byte, error) { + if u.GetProjectEnvContentHintProjectsResponse1 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse1, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse2 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse2, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse3 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse3, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse4 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse4, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse5 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse5, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse6 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse6, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse7 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse7, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse8 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse8, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse9 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse9, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse10 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse10, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse11 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse11, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse12 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse12, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse13 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse13, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse14 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse14, "", true) + } + + if u.GetProjectEnvContentHintProjectsResponse15 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjectsResponse15, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectEnvResponseBodyProjectsResponseContentHint: all fields are null") +} + +type GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type string + +const ( + GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3TypeFlagsSecret GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type = "flags-secret" +) + +func (e GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type) ToPointer() *GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type { + return &e +} +func (e *GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type: %v", v) + } +} + +// GetProjectEnvResponseBodyProjectsResponseInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type GetProjectEnvResponseBodyProjectsResponseInternalContentHint struct { + Type GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *GetProjectEnvResponseBodyProjectsResponseInternalContentHint) GetType() GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type { + if o == nil { + return GetProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type("") + } + return o.Type +} + +func (o *GetProjectEnvResponseBodyProjectsResponseInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type GetProjectEnvResponseBody3 struct { + Target *GetProjectEnvResponseBodyProjectsResponseTarget `json:"target,omitempty"` + Type GetProjectEnvResponseBodyProjectsResponseType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *GetProjectEnvResponseBodyProjectsResponseContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *GetProjectEnvResponseBodyProjectsResponseInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` +} + +func (o *GetProjectEnvResponseBody3) GetTarget() *GetProjectEnvResponseBodyProjectsResponseTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetProjectEnvResponseBody3) GetType() GetProjectEnvResponseBodyProjectsResponseType { + if o == nil { + return GetProjectEnvResponseBodyProjectsResponseType("") + } + return o.Type +} + +func (o *GetProjectEnvResponseBody3) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *GetProjectEnvResponseBody3) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetProjectEnvResponseBody3) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *GetProjectEnvResponseBody3) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *GetProjectEnvResponseBody3) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *GetProjectEnvResponseBody3) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectEnvResponseBody3) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectEnvResponseBody3) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *GetProjectEnvResponseBody3) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *GetProjectEnvResponseBody3) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *GetProjectEnvResponseBody3) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *GetProjectEnvResponseBody3) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *GetProjectEnvResponseBody3) GetContentHint() *GetProjectEnvResponseBodyProjectsResponseContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *GetProjectEnvResponseBody3) GetInternalContentHint() *GetProjectEnvResponseBodyProjectsResponseInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *GetProjectEnvResponseBody3) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *GetProjectEnvResponseBody3) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *GetProjectEnvResponseBody3) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +type GetProjectEnvTargetProjects2 string + +const ( + GetProjectEnvTargetProjects2Production GetProjectEnvTargetProjects2 = "production" + GetProjectEnvTargetProjects2Preview GetProjectEnvTargetProjects2 = "preview" + GetProjectEnvTargetProjects2Development GetProjectEnvTargetProjects2 = "development" +) + +func (e GetProjectEnvTargetProjects2) ToPointer() *GetProjectEnvTargetProjects2 { + return &e +} +func (e *GetProjectEnvTargetProjects2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = GetProjectEnvTargetProjects2(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvTargetProjects2: %v", v) + } +} + +type GetProjectEnvTargetProjects1 string + +const ( + GetProjectEnvTargetProjects1Production GetProjectEnvTargetProjects1 = "production" + GetProjectEnvTargetProjects1Preview GetProjectEnvTargetProjects1 = "preview" + GetProjectEnvTargetProjects1Development GetProjectEnvTargetProjects1 = "development" +) + +func (e GetProjectEnvTargetProjects1) ToPointer() *GetProjectEnvTargetProjects1 { + return &e +} +func (e *GetProjectEnvTargetProjects1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = GetProjectEnvTargetProjects1(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvTargetProjects1: %v", v) + } +} + +type GetProjectEnvResponseBodyProjectsTargetType string + +const ( + GetProjectEnvResponseBodyProjectsTargetTypeArrayOfGetProjectEnvTargetProjects1 GetProjectEnvResponseBodyProjectsTargetType = "arrayOfGetProjectEnvTargetProjects1" + GetProjectEnvResponseBodyProjectsTargetTypeGetProjectEnvTargetProjects2 GetProjectEnvResponseBodyProjectsTargetType = "getProjectEnv_target_projects_2" +) + +type GetProjectEnvResponseBodyProjectsTarget struct { + ArrayOfGetProjectEnvTargetProjects1 []GetProjectEnvTargetProjects1 + GetProjectEnvTargetProjects2 *GetProjectEnvTargetProjects2 + + Type GetProjectEnvResponseBodyProjectsTargetType +} + +func CreateGetProjectEnvResponseBodyProjectsTargetArrayOfGetProjectEnvTargetProjects1(arrayOfGetProjectEnvTargetProjects1 []GetProjectEnvTargetProjects1) GetProjectEnvResponseBodyProjectsTarget { + typ := GetProjectEnvResponseBodyProjectsTargetTypeArrayOfGetProjectEnvTargetProjects1 + + return GetProjectEnvResponseBodyProjectsTarget{ + ArrayOfGetProjectEnvTargetProjects1: arrayOfGetProjectEnvTargetProjects1, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsTargetGetProjectEnvTargetProjects2(getProjectEnvTargetProjects2 GetProjectEnvTargetProjects2) GetProjectEnvResponseBodyProjectsTarget { + typ := GetProjectEnvResponseBodyProjectsTargetTypeGetProjectEnvTargetProjects2 + + return GetProjectEnvResponseBodyProjectsTarget{ + GetProjectEnvTargetProjects2: &getProjectEnvTargetProjects2, + Type: typ, + } +} + +func (u *GetProjectEnvResponseBodyProjectsTarget) UnmarshalJSON(data []byte) error { + + var arrayOfGetProjectEnvTargetProjects1 []GetProjectEnvTargetProjects1 = []GetProjectEnvTargetProjects1{} + if err := utils.UnmarshalJSON(data, &arrayOfGetProjectEnvTargetProjects1, "", true, true); err == nil { + u.ArrayOfGetProjectEnvTargetProjects1 = arrayOfGetProjectEnvTargetProjects1 + u.Type = GetProjectEnvResponseBodyProjectsTargetTypeArrayOfGetProjectEnvTargetProjects1 + return nil + } + + var getProjectEnvTargetProjects2 GetProjectEnvTargetProjects2 = GetProjectEnvTargetProjects2("") + if err := utils.UnmarshalJSON(data, &getProjectEnvTargetProjects2, "", true, true); err == nil { + u.GetProjectEnvTargetProjects2 = &getProjectEnvTargetProjects2 + u.Type = GetProjectEnvResponseBodyProjectsTargetTypeGetProjectEnvTargetProjects2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectEnvResponseBodyProjectsTarget", string(data)) +} + +func (u GetProjectEnvResponseBodyProjectsTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfGetProjectEnvTargetProjects1 != nil { + return utils.MarshalJSON(u.ArrayOfGetProjectEnvTargetProjects1, "", true) + } + + if u.GetProjectEnvTargetProjects2 != nil { + return utils.MarshalJSON(u.GetProjectEnvTargetProjects2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectEnvResponseBodyProjectsTarget: all fields are null") +} + +type GetProjectEnvResponseBodyProjectsType string + +const ( + GetProjectEnvResponseBodyProjectsTypeSystem GetProjectEnvResponseBodyProjectsType = "system" + GetProjectEnvResponseBodyProjectsTypeEncrypted GetProjectEnvResponseBodyProjectsType = "encrypted" + GetProjectEnvResponseBodyProjectsTypePlain GetProjectEnvResponseBodyProjectsType = "plain" + GetProjectEnvResponseBodyProjectsTypeSensitive GetProjectEnvResponseBodyProjectsType = "sensitive" + GetProjectEnvResponseBodyProjectsTypeSecret GetProjectEnvResponseBodyProjectsType = "secret" +) + +func (e GetProjectEnvResponseBodyProjectsType) ToPointer() *GetProjectEnvResponseBodyProjectsType { + return &e +} +func (e *GetProjectEnvResponseBodyProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = GetProjectEnvResponseBodyProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvResponseBodyProjectsType: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215TypeFlagsConnectionString GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type = "flags-connection-string" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects15 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *GetProjectEnvContentHintProjects15) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214TypeIntegrationStoreSecret GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type = "integration-store-secret" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects14 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *GetProjectEnvContentHintProjects14) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *GetProjectEnvContentHintProjects14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *GetProjectEnvContentHintProjects14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *GetProjectEnvContentHintProjects14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213TypePostgresURLNoSsl GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type = "postgres-url-no-ssl" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects13 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects13) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212TypePostgresDatabase GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type = "postgres-database" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects12 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects12) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211TypePostgresPassword GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type = "postgres-password" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects11 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects11) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210TypePostgresHost GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type = "postgres-host" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects10 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects10) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29TypePostgresUser GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type = "postgres-user" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects9 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects9) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28TypePostgresPrismaURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type = "postgres-prisma-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects8 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects8) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27TypePostgresURLNonPooling GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type = "postgres-url-non-pooling" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects7 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects7) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26TypePostgresURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type = "postgres-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects6 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects6) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25TypeBlobReadWriteToken GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type = "blob-read-write-token" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects5 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects5) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24TypeRedisRestAPIReadOnlyToken GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type = "redis-rest-api-read-only-token" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects4 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects4) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23TypeRedisRestAPIToken GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type = "redis-rest-api-token" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects3 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects3) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22TypeRedisRestAPIURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type = "redis-rest-api-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects2 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects2) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2TypeRedisURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type = "redis-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type: %v", v) + } +} + +type GetProjectEnvContentHintProjects1 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHintProjects1) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHintProjects1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvResponseBodyProjectsContentHintType string + +const ( + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects1 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_1" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects2 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_2" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects3 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_3" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects4 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_4" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects5 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_5" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects6 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_6" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects7 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_7" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects8 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_8" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects9 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_9" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects10 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_10" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects11 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_11" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects12 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_12" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects13 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_13" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects14 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_14" + GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects15 GetProjectEnvResponseBodyProjectsContentHintType = "getProjectEnv_contentHint_projects_15" +) + +type GetProjectEnvResponseBodyProjectsContentHint struct { + GetProjectEnvContentHintProjects1 *GetProjectEnvContentHintProjects1 + GetProjectEnvContentHintProjects2 *GetProjectEnvContentHintProjects2 + GetProjectEnvContentHintProjects3 *GetProjectEnvContentHintProjects3 + GetProjectEnvContentHintProjects4 *GetProjectEnvContentHintProjects4 + GetProjectEnvContentHintProjects5 *GetProjectEnvContentHintProjects5 + GetProjectEnvContentHintProjects6 *GetProjectEnvContentHintProjects6 + GetProjectEnvContentHintProjects7 *GetProjectEnvContentHintProjects7 + GetProjectEnvContentHintProjects8 *GetProjectEnvContentHintProjects8 + GetProjectEnvContentHintProjects9 *GetProjectEnvContentHintProjects9 + GetProjectEnvContentHintProjects10 *GetProjectEnvContentHintProjects10 + GetProjectEnvContentHintProjects11 *GetProjectEnvContentHintProjects11 + GetProjectEnvContentHintProjects12 *GetProjectEnvContentHintProjects12 + GetProjectEnvContentHintProjects13 *GetProjectEnvContentHintProjects13 + GetProjectEnvContentHintProjects14 *GetProjectEnvContentHintProjects14 + GetProjectEnvContentHintProjects15 *GetProjectEnvContentHintProjects15 + + Type GetProjectEnvResponseBodyProjectsContentHintType +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects1(getProjectEnvContentHintProjects1 GetProjectEnvContentHintProjects1) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects1 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects1: &getProjectEnvContentHintProjects1, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects2(getProjectEnvContentHintProjects2 GetProjectEnvContentHintProjects2) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects2 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects2: &getProjectEnvContentHintProjects2, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects3(getProjectEnvContentHintProjects3 GetProjectEnvContentHintProjects3) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects3 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects3: &getProjectEnvContentHintProjects3, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects4(getProjectEnvContentHintProjects4 GetProjectEnvContentHintProjects4) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects4 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects4: &getProjectEnvContentHintProjects4, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects5(getProjectEnvContentHintProjects5 GetProjectEnvContentHintProjects5) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects5 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects5: &getProjectEnvContentHintProjects5, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects6(getProjectEnvContentHintProjects6 GetProjectEnvContentHintProjects6) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects6 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects6: &getProjectEnvContentHintProjects6, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects7(getProjectEnvContentHintProjects7 GetProjectEnvContentHintProjects7) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects7 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects7: &getProjectEnvContentHintProjects7, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects8(getProjectEnvContentHintProjects8 GetProjectEnvContentHintProjects8) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects8 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects8: &getProjectEnvContentHintProjects8, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects9(getProjectEnvContentHintProjects9 GetProjectEnvContentHintProjects9) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects9 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects9: &getProjectEnvContentHintProjects9, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects10(getProjectEnvContentHintProjects10 GetProjectEnvContentHintProjects10) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects10 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects10: &getProjectEnvContentHintProjects10, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects11(getProjectEnvContentHintProjects11 GetProjectEnvContentHintProjects11) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects11 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects11: &getProjectEnvContentHintProjects11, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects12(getProjectEnvContentHintProjects12 GetProjectEnvContentHintProjects12) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects12 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects12: &getProjectEnvContentHintProjects12, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects13(getProjectEnvContentHintProjects13 GetProjectEnvContentHintProjects13) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects13 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects13: &getProjectEnvContentHintProjects13, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects14(getProjectEnvContentHintProjects14 GetProjectEnvContentHintProjects14) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects14 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects14: &getProjectEnvContentHintProjects14, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyProjectsContentHintGetProjectEnvContentHintProjects15(getProjectEnvContentHintProjects15 GetProjectEnvContentHintProjects15) GetProjectEnvResponseBodyProjectsContentHint { + typ := GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects15 + + return GetProjectEnvResponseBodyProjectsContentHint{ + GetProjectEnvContentHintProjects15: &getProjectEnvContentHintProjects15, + Type: typ, + } +} + +func (u *GetProjectEnvResponseBodyProjectsContentHint) UnmarshalJSON(data []byte) error { + + var getProjectEnvContentHintProjects7 GetProjectEnvContentHintProjects7 = GetProjectEnvContentHintProjects7{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects7, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects7 = &getProjectEnvContentHintProjects7 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects7 + return nil + } + + var getProjectEnvContentHintProjects9 GetProjectEnvContentHintProjects9 = GetProjectEnvContentHintProjects9{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects9, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects9 = &getProjectEnvContentHintProjects9 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects9 + return nil + } + + var getProjectEnvContentHintProjects3 GetProjectEnvContentHintProjects3 = GetProjectEnvContentHintProjects3{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects3, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects3 = &getProjectEnvContentHintProjects3 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects3 + return nil + } + + var getProjectEnvContentHintProjects4 GetProjectEnvContentHintProjects4 = GetProjectEnvContentHintProjects4{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects4, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects4 = &getProjectEnvContentHintProjects4 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects4 + return nil + } + + var getProjectEnvContentHintProjects5 GetProjectEnvContentHintProjects5 = GetProjectEnvContentHintProjects5{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects5, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects5 = &getProjectEnvContentHintProjects5 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects5 + return nil + } + + var getProjectEnvContentHintProjects6 GetProjectEnvContentHintProjects6 = GetProjectEnvContentHintProjects6{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects6, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects6 = &getProjectEnvContentHintProjects6 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects6 + return nil + } + + var getProjectEnvContentHintProjects2 GetProjectEnvContentHintProjects2 = GetProjectEnvContentHintProjects2{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects2, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects2 = &getProjectEnvContentHintProjects2 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects2 + return nil + } + + var getProjectEnvContentHintProjects8 GetProjectEnvContentHintProjects8 = GetProjectEnvContentHintProjects8{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects8, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects8 = &getProjectEnvContentHintProjects8 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects8 + return nil + } + + var getProjectEnvContentHintProjects1 GetProjectEnvContentHintProjects1 = GetProjectEnvContentHintProjects1{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects1, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects1 = &getProjectEnvContentHintProjects1 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects1 + return nil + } + + var getProjectEnvContentHintProjects10 GetProjectEnvContentHintProjects10 = GetProjectEnvContentHintProjects10{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects10, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects10 = &getProjectEnvContentHintProjects10 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects10 + return nil + } + + var getProjectEnvContentHintProjects11 GetProjectEnvContentHintProjects11 = GetProjectEnvContentHintProjects11{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects11, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects11 = &getProjectEnvContentHintProjects11 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects11 + return nil + } + + var getProjectEnvContentHintProjects12 GetProjectEnvContentHintProjects12 = GetProjectEnvContentHintProjects12{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects12, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects12 = &getProjectEnvContentHintProjects12 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects12 + return nil + } + + var getProjectEnvContentHintProjects13 GetProjectEnvContentHintProjects13 = GetProjectEnvContentHintProjects13{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects13, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects13 = &getProjectEnvContentHintProjects13 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects13 + return nil + } + + var getProjectEnvContentHintProjects15 GetProjectEnvContentHintProjects15 = GetProjectEnvContentHintProjects15{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects15, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects15 = &getProjectEnvContentHintProjects15 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects15 + return nil + } + + var getProjectEnvContentHintProjects14 GetProjectEnvContentHintProjects14 = GetProjectEnvContentHintProjects14{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHintProjects14, "", true, true); err == nil { + u.GetProjectEnvContentHintProjects14 = &getProjectEnvContentHintProjects14 + u.Type = GetProjectEnvResponseBodyProjectsContentHintTypeGetProjectEnvContentHintProjects14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectEnvResponseBodyProjectsContentHint", string(data)) +} + +func (u GetProjectEnvResponseBodyProjectsContentHint) MarshalJSON() ([]byte, error) { + if u.GetProjectEnvContentHintProjects1 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects1, "", true) + } + + if u.GetProjectEnvContentHintProjects2 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects2, "", true) + } + + if u.GetProjectEnvContentHintProjects3 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects3, "", true) + } + + if u.GetProjectEnvContentHintProjects4 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects4, "", true) + } + + if u.GetProjectEnvContentHintProjects5 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects5, "", true) + } + + if u.GetProjectEnvContentHintProjects6 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects6, "", true) + } + + if u.GetProjectEnvContentHintProjects7 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects7, "", true) + } + + if u.GetProjectEnvContentHintProjects8 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects8, "", true) + } + + if u.GetProjectEnvContentHintProjects9 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects9, "", true) + } + + if u.GetProjectEnvContentHintProjects10 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects10, "", true) + } + + if u.GetProjectEnvContentHintProjects11 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects11, "", true) + } + + if u.GetProjectEnvContentHintProjects12 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects12, "", true) + } + + if u.GetProjectEnvContentHintProjects13 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects13, "", true) + } + + if u.GetProjectEnvContentHintProjects14 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects14, "", true) + } + + if u.GetProjectEnvContentHintProjects15 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHintProjects15, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectEnvResponseBodyProjectsContentHint: all fields are null") +} + +type GetProjectEnvResponseBodyProjectsResponse200Type string + +const ( + GetProjectEnvResponseBodyProjectsResponse200TypeFlagsSecret GetProjectEnvResponseBodyProjectsResponse200Type = "flags-secret" +) + +func (e GetProjectEnvResponseBodyProjectsResponse200Type) ToPointer() *GetProjectEnvResponseBodyProjectsResponse200Type { + return &e +} +func (e *GetProjectEnvResponseBodyProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = GetProjectEnvResponseBodyProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvResponseBodyProjectsResponse200Type: %v", v) + } +} + +// GetProjectEnvResponseBodyProjectsInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type GetProjectEnvResponseBodyProjectsInternalContentHint struct { + Type GetProjectEnvResponseBodyProjectsResponse200Type `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *GetProjectEnvResponseBodyProjectsInternalContentHint) GetType() GetProjectEnvResponseBodyProjectsResponse200Type { + if o == nil { + return GetProjectEnvResponseBodyProjectsResponse200Type("") + } + return o.Type +} + +func (o *GetProjectEnvResponseBodyProjectsInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type GetProjectEnvResponseBody2 struct { + Target *GetProjectEnvResponseBodyProjectsTarget `json:"target,omitempty"` + Type GetProjectEnvResponseBodyProjectsType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *GetProjectEnvResponseBodyProjectsContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *GetProjectEnvResponseBodyProjectsInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *GetProjectEnvResponseBody2) GetTarget() *GetProjectEnvResponseBodyProjectsTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetProjectEnvResponseBody2) GetType() GetProjectEnvResponseBodyProjectsType { + if o == nil { + return GetProjectEnvResponseBodyProjectsType("") + } + return o.Type +} + +func (o *GetProjectEnvResponseBody2) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *GetProjectEnvResponseBody2) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetProjectEnvResponseBody2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *GetProjectEnvResponseBody2) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *GetProjectEnvResponseBody2) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *GetProjectEnvResponseBody2) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectEnvResponseBody2) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectEnvResponseBody2) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *GetProjectEnvResponseBody2) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *GetProjectEnvResponseBody2) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *GetProjectEnvResponseBody2) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *GetProjectEnvResponseBody2) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *GetProjectEnvResponseBody2) GetContentHint() *GetProjectEnvResponseBodyProjectsContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *GetProjectEnvResponseBody2) GetInternalContentHint() *GetProjectEnvResponseBodyProjectsInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *GetProjectEnvResponseBody2) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *GetProjectEnvResponseBody2) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *GetProjectEnvResponseBody2) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *GetProjectEnvResponseBody2) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type GetProjectEnvTarget2 string + +const ( + GetProjectEnvTarget2Production GetProjectEnvTarget2 = "production" + GetProjectEnvTarget2Preview GetProjectEnvTarget2 = "preview" + GetProjectEnvTarget2Development GetProjectEnvTarget2 = "development" +) + +func (e GetProjectEnvTarget2) ToPointer() *GetProjectEnvTarget2 { + return &e +} +func (e *GetProjectEnvTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = GetProjectEnvTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvTarget2: %v", v) + } +} + +type GetProjectEnvTarget1 string + +const ( + GetProjectEnvTarget1Production GetProjectEnvTarget1 = "production" + GetProjectEnvTarget1Preview GetProjectEnvTarget1 = "preview" + GetProjectEnvTarget1Development GetProjectEnvTarget1 = "development" +) + +func (e GetProjectEnvTarget1) ToPointer() *GetProjectEnvTarget1 { + return &e +} +func (e *GetProjectEnvTarget1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = GetProjectEnvTarget1(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvTarget1: %v", v) + } +} + +type GetProjectEnvResponseBodyTargetType string + +const ( + GetProjectEnvResponseBodyTargetTypeArrayOfGetProjectEnvTarget1 GetProjectEnvResponseBodyTargetType = "arrayOfGetProjectEnvTarget1" + GetProjectEnvResponseBodyTargetTypeGetProjectEnvTarget2 GetProjectEnvResponseBodyTargetType = "getProjectEnv_target_2" +) + +type GetProjectEnvResponseBodyTarget struct { + ArrayOfGetProjectEnvTarget1 []GetProjectEnvTarget1 + GetProjectEnvTarget2 *GetProjectEnvTarget2 + + Type GetProjectEnvResponseBodyTargetType +} + +func CreateGetProjectEnvResponseBodyTargetArrayOfGetProjectEnvTarget1(arrayOfGetProjectEnvTarget1 []GetProjectEnvTarget1) GetProjectEnvResponseBodyTarget { + typ := GetProjectEnvResponseBodyTargetTypeArrayOfGetProjectEnvTarget1 + + return GetProjectEnvResponseBodyTarget{ + ArrayOfGetProjectEnvTarget1: arrayOfGetProjectEnvTarget1, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyTargetGetProjectEnvTarget2(getProjectEnvTarget2 GetProjectEnvTarget2) GetProjectEnvResponseBodyTarget { + typ := GetProjectEnvResponseBodyTargetTypeGetProjectEnvTarget2 + + return GetProjectEnvResponseBodyTarget{ + GetProjectEnvTarget2: &getProjectEnvTarget2, + Type: typ, + } +} + +func (u *GetProjectEnvResponseBodyTarget) UnmarshalJSON(data []byte) error { + + var arrayOfGetProjectEnvTarget1 []GetProjectEnvTarget1 = []GetProjectEnvTarget1{} + if err := utils.UnmarshalJSON(data, &arrayOfGetProjectEnvTarget1, "", true, true); err == nil { + u.ArrayOfGetProjectEnvTarget1 = arrayOfGetProjectEnvTarget1 + u.Type = GetProjectEnvResponseBodyTargetTypeArrayOfGetProjectEnvTarget1 + return nil + } + + var getProjectEnvTarget2 GetProjectEnvTarget2 = GetProjectEnvTarget2("") + if err := utils.UnmarshalJSON(data, &getProjectEnvTarget2, "", true, true); err == nil { + u.GetProjectEnvTarget2 = &getProjectEnvTarget2 + u.Type = GetProjectEnvResponseBodyTargetTypeGetProjectEnvTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectEnvResponseBodyTarget", string(data)) +} + +func (u GetProjectEnvResponseBodyTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfGetProjectEnvTarget1 != nil { + return utils.MarshalJSON(u.ArrayOfGetProjectEnvTarget1, "", true) + } + + if u.GetProjectEnvTarget2 != nil { + return utils.MarshalJSON(u.GetProjectEnvTarget2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectEnvResponseBodyTarget: all fields are null") +} + +type GetProjectEnvResponseBodyType string + +const ( + GetProjectEnvResponseBodyTypeSystem GetProjectEnvResponseBodyType = "system" + GetProjectEnvResponseBodyTypeEncrypted GetProjectEnvResponseBodyType = "encrypted" + GetProjectEnvResponseBodyTypePlain GetProjectEnvResponseBodyType = "plain" + GetProjectEnvResponseBodyTypeSensitive GetProjectEnvResponseBodyType = "sensitive" + GetProjectEnvResponseBodyTypeSecret GetProjectEnvResponseBodyType = "secret" +) + +func (e GetProjectEnvResponseBodyType) ToPointer() *GetProjectEnvResponseBodyType { + return &e +} +func (e *GetProjectEnvResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = GetProjectEnvResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvResponseBodyType: %v", v) + } +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115TypeFlagsConnectionString GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type = "flags-connection-string" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type: %v", v) + } +} + +type GetProjectEnvContentHint15 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *GetProjectEnvContentHint15) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114TypeIntegrationStoreSecret GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type = "integration-store-secret" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type: %v", v) + } +} + +type GetProjectEnvContentHint14 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *GetProjectEnvContentHint14) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *GetProjectEnvContentHint14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *GetProjectEnvContentHint14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *GetProjectEnvContentHint14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113TypePostgresURLNoSsl GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type = "postgres-url-no-ssl" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type: %v", v) + } +} + +type GetProjectEnvContentHint13 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint13) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112TypePostgresDatabase GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type = "postgres-database" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type: %v", v) + } +} + +type GetProjectEnvContentHint12 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint12) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111TypePostgresPassword GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type = "postgres-password" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type: %v", v) + } +} + +type GetProjectEnvContentHint11 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint11) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110TypePostgresHost GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type = "postgres-host" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type: %v", v) + } +} + +type GetProjectEnvContentHint10 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint10) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19TypePostgresUser GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type = "postgres-user" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type: %v", v) + } +} + +type GetProjectEnvContentHint9 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint9) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18TypePostgresPrismaURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type = "postgres-prisma-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type: %v", v) + } +} + +type GetProjectEnvContentHint8 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint8) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1TypePostgresURLNonPooling GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type = "postgres-url-non-pooling" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type: %v", v) + } +} + +type GetProjectEnvContentHint7 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint7) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyTypePostgresURL GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType = "postgres-url" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type GetProjectEnvContentHint6 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint6) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200ApplicationJSONType string + +const ( + GetProjectEnvContentHintProjectsResponse200ApplicationJSONTypeBlobReadWriteToken GetProjectEnvContentHintProjectsResponse200ApplicationJSONType = "blob-read-write-token" +) + +func (e GetProjectEnvContentHintProjectsResponse200ApplicationJSONType) ToPointer() *GetProjectEnvContentHintProjectsResponse200ApplicationJSONType { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = GetProjectEnvContentHintProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type GetProjectEnvContentHint5 struct { + Type GetProjectEnvContentHintProjectsResponse200ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint5) GetType() GetProjectEnvContentHintProjectsResponse200ApplicationJSONType { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponse200Type string + +const ( + GetProjectEnvContentHintProjectsResponse200TypeRedisRestAPIReadOnlyToken GetProjectEnvContentHintProjectsResponse200Type = "redis-rest-api-read-only-token" +) + +func (e GetProjectEnvContentHintProjectsResponse200Type) ToPointer() *GetProjectEnvContentHintProjectsResponse200Type { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = GetProjectEnvContentHintProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponse200Type: %v", v) + } +} + +type GetProjectEnvContentHint4 struct { + Type GetProjectEnvContentHintProjectsResponse200Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint4) GetType() GetProjectEnvContentHintProjectsResponse200Type { + if o == nil { + return GetProjectEnvContentHintProjectsResponse200Type("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsResponseType string + +const ( + GetProjectEnvContentHintProjectsResponseTypeRedisRestAPIToken GetProjectEnvContentHintProjectsResponseType = "redis-rest-api-token" +) + +func (e GetProjectEnvContentHintProjectsResponseType) ToPointer() *GetProjectEnvContentHintProjectsResponseType { + return &e +} +func (e *GetProjectEnvContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = GetProjectEnvContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsResponseType: %v", v) + } +} + +type GetProjectEnvContentHint3 struct { + Type GetProjectEnvContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint3) GetType() GetProjectEnvContentHintProjectsResponseType { + if o == nil { + return GetProjectEnvContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintProjectsType string + +const ( + GetProjectEnvContentHintProjectsTypeRedisRestAPIURL GetProjectEnvContentHintProjectsType = "redis-rest-api-url" +) + +func (e GetProjectEnvContentHintProjectsType) ToPointer() *GetProjectEnvContentHintProjectsType { + return &e +} +func (e *GetProjectEnvContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = GetProjectEnvContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintProjectsType: %v", v) + } +} + +type GetProjectEnvContentHint2 struct { + Type GetProjectEnvContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint2) GetType() GetProjectEnvContentHintProjectsType { + if o == nil { + return GetProjectEnvContentHintProjectsType("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvContentHintType string + +const ( + GetProjectEnvContentHintTypeRedisURL GetProjectEnvContentHintType = "redis-url" +) + +func (e GetProjectEnvContentHintType) ToPointer() *GetProjectEnvContentHintType { + return &e +} +func (e *GetProjectEnvContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = GetProjectEnvContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvContentHintType: %v", v) + } +} + +type GetProjectEnvContentHint1 struct { + Type GetProjectEnvContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectEnvContentHint1) GetType() GetProjectEnvContentHintType { + if o == nil { + return GetProjectEnvContentHintType("") + } + return o.Type +} + +func (o *GetProjectEnvContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectEnvResponseBodyContentHintType string + +const ( + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint1 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_1" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint2 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_2" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint3 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_3" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint4 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_4" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint5 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_5" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint6 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_6" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint7 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_7" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint8 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_8" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint9 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_9" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint10 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_10" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint11 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_11" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint12 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_12" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint13 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_13" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint14 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_14" + GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint15 GetProjectEnvResponseBodyContentHintType = "getProjectEnv_contentHint_15" +) + +type GetProjectEnvResponseBodyContentHint struct { + GetProjectEnvContentHint1 *GetProjectEnvContentHint1 + GetProjectEnvContentHint2 *GetProjectEnvContentHint2 + GetProjectEnvContentHint3 *GetProjectEnvContentHint3 + GetProjectEnvContentHint4 *GetProjectEnvContentHint4 + GetProjectEnvContentHint5 *GetProjectEnvContentHint5 + GetProjectEnvContentHint6 *GetProjectEnvContentHint6 + GetProjectEnvContentHint7 *GetProjectEnvContentHint7 + GetProjectEnvContentHint8 *GetProjectEnvContentHint8 + GetProjectEnvContentHint9 *GetProjectEnvContentHint9 + GetProjectEnvContentHint10 *GetProjectEnvContentHint10 + GetProjectEnvContentHint11 *GetProjectEnvContentHint11 + GetProjectEnvContentHint12 *GetProjectEnvContentHint12 + GetProjectEnvContentHint13 *GetProjectEnvContentHint13 + GetProjectEnvContentHint14 *GetProjectEnvContentHint14 + GetProjectEnvContentHint15 *GetProjectEnvContentHint15 + + Type GetProjectEnvResponseBodyContentHintType +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint1(getProjectEnvContentHint1 GetProjectEnvContentHint1) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint1 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint1: &getProjectEnvContentHint1, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint2(getProjectEnvContentHint2 GetProjectEnvContentHint2) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint2 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint2: &getProjectEnvContentHint2, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint3(getProjectEnvContentHint3 GetProjectEnvContentHint3) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint3 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint3: &getProjectEnvContentHint3, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint4(getProjectEnvContentHint4 GetProjectEnvContentHint4) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint4 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint4: &getProjectEnvContentHint4, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint5(getProjectEnvContentHint5 GetProjectEnvContentHint5) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint5 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint5: &getProjectEnvContentHint5, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint6(getProjectEnvContentHint6 GetProjectEnvContentHint6) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint6 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint6: &getProjectEnvContentHint6, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint7(getProjectEnvContentHint7 GetProjectEnvContentHint7) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint7 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint7: &getProjectEnvContentHint7, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint8(getProjectEnvContentHint8 GetProjectEnvContentHint8) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint8 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint8: &getProjectEnvContentHint8, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint9(getProjectEnvContentHint9 GetProjectEnvContentHint9) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint9 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint9: &getProjectEnvContentHint9, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint10(getProjectEnvContentHint10 GetProjectEnvContentHint10) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint10 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint10: &getProjectEnvContentHint10, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint11(getProjectEnvContentHint11 GetProjectEnvContentHint11) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint11 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint11: &getProjectEnvContentHint11, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint12(getProjectEnvContentHint12 GetProjectEnvContentHint12) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint12 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint12: &getProjectEnvContentHint12, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint13(getProjectEnvContentHint13 GetProjectEnvContentHint13) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint13 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint13: &getProjectEnvContentHint13, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint14(getProjectEnvContentHint14 GetProjectEnvContentHint14) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint14 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint14: &getProjectEnvContentHint14, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyContentHintGetProjectEnvContentHint15(getProjectEnvContentHint15 GetProjectEnvContentHint15) GetProjectEnvResponseBodyContentHint { + typ := GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint15 + + return GetProjectEnvResponseBodyContentHint{ + GetProjectEnvContentHint15: &getProjectEnvContentHint15, + Type: typ, + } +} + +func (u *GetProjectEnvResponseBodyContentHint) UnmarshalJSON(data []byte) error { + + var getProjectEnvContentHint7 GetProjectEnvContentHint7 = GetProjectEnvContentHint7{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint7, "", true, true); err == nil { + u.GetProjectEnvContentHint7 = &getProjectEnvContentHint7 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint7 + return nil + } + + var getProjectEnvContentHint9 GetProjectEnvContentHint9 = GetProjectEnvContentHint9{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint9, "", true, true); err == nil { + u.GetProjectEnvContentHint9 = &getProjectEnvContentHint9 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint9 + return nil + } + + var getProjectEnvContentHint3 GetProjectEnvContentHint3 = GetProjectEnvContentHint3{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint3, "", true, true); err == nil { + u.GetProjectEnvContentHint3 = &getProjectEnvContentHint3 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint3 + return nil + } + + var getProjectEnvContentHint4 GetProjectEnvContentHint4 = GetProjectEnvContentHint4{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint4, "", true, true); err == nil { + u.GetProjectEnvContentHint4 = &getProjectEnvContentHint4 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint4 + return nil + } + + var getProjectEnvContentHint5 GetProjectEnvContentHint5 = GetProjectEnvContentHint5{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint5, "", true, true); err == nil { + u.GetProjectEnvContentHint5 = &getProjectEnvContentHint5 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint5 + return nil + } + + var getProjectEnvContentHint6 GetProjectEnvContentHint6 = GetProjectEnvContentHint6{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint6, "", true, true); err == nil { + u.GetProjectEnvContentHint6 = &getProjectEnvContentHint6 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint6 + return nil + } + + var getProjectEnvContentHint2 GetProjectEnvContentHint2 = GetProjectEnvContentHint2{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint2, "", true, true); err == nil { + u.GetProjectEnvContentHint2 = &getProjectEnvContentHint2 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint2 + return nil + } + + var getProjectEnvContentHint8 GetProjectEnvContentHint8 = GetProjectEnvContentHint8{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint8, "", true, true); err == nil { + u.GetProjectEnvContentHint8 = &getProjectEnvContentHint8 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint8 + return nil + } + + var getProjectEnvContentHint1 GetProjectEnvContentHint1 = GetProjectEnvContentHint1{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint1, "", true, true); err == nil { + u.GetProjectEnvContentHint1 = &getProjectEnvContentHint1 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint1 + return nil + } + + var getProjectEnvContentHint10 GetProjectEnvContentHint10 = GetProjectEnvContentHint10{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint10, "", true, true); err == nil { + u.GetProjectEnvContentHint10 = &getProjectEnvContentHint10 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint10 + return nil + } + + var getProjectEnvContentHint11 GetProjectEnvContentHint11 = GetProjectEnvContentHint11{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint11, "", true, true); err == nil { + u.GetProjectEnvContentHint11 = &getProjectEnvContentHint11 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint11 + return nil + } + + var getProjectEnvContentHint12 GetProjectEnvContentHint12 = GetProjectEnvContentHint12{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint12, "", true, true); err == nil { + u.GetProjectEnvContentHint12 = &getProjectEnvContentHint12 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint12 + return nil + } + + var getProjectEnvContentHint13 GetProjectEnvContentHint13 = GetProjectEnvContentHint13{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint13, "", true, true); err == nil { + u.GetProjectEnvContentHint13 = &getProjectEnvContentHint13 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint13 + return nil + } + + var getProjectEnvContentHint15 GetProjectEnvContentHint15 = GetProjectEnvContentHint15{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint15, "", true, true); err == nil { + u.GetProjectEnvContentHint15 = &getProjectEnvContentHint15 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint15 + return nil + } + + var getProjectEnvContentHint14 GetProjectEnvContentHint14 = GetProjectEnvContentHint14{} + if err := utils.UnmarshalJSON(data, &getProjectEnvContentHint14, "", true, true); err == nil { + u.GetProjectEnvContentHint14 = &getProjectEnvContentHint14 + u.Type = GetProjectEnvResponseBodyContentHintTypeGetProjectEnvContentHint14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectEnvResponseBodyContentHint", string(data)) +} + +func (u GetProjectEnvResponseBodyContentHint) MarshalJSON() ([]byte, error) { + if u.GetProjectEnvContentHint1 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint1, "", true) + } + + if u.GetProjectEnvContentHint2 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint2, "", true) + } + + if u.GetProjectEnvContentHint3 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint3, "", true) + } + + if u.GetProjectEnvContentHint4 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint4, "", true) + } + + if u.GetProjectEnvContentHint5 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint5, "", true) + } + + if u.GetProjectEnvContentHint6 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint6, "", true) + } + + if u.GetProjectEnvContentHint7 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint7, "", true) + } + + if u.GetProjectEnvContentHint8 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint8, "", true) + } + + if u.GetProjectEnvContentHint9 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint9, "", true) + } + + if u.GetProjectEnvContentHint10 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint10, "", true) + } + + if u.GetProjectEnvContentHint11 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint11, "", true) + } + + if u.GetProjectEnvContentHint12 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint12, "", true) + } + + if u.GetProjectEnvContentHint13 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint13, "", true) + } + + if u.GetProjectEnvContentHint14 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint14, "", true) + } + + if u.GetProjectEnvContentHint15 != nil { + return utils.MarshalJSON(u.GetProjectEnvContentHint15, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectEnvResponseBodyContentHint: all fields are null") +} + +type GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType string + +const ( + GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONTypeFlagsSecret GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType = "flags-secret" +) + +func (e GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType) ToPointer() *GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType { + return &e +} +func (e *GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType: %v", v) + } +} + +// GetProjectEnvResponseBodyInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type GetProjectEnvResponseBodyInternalContentHint struct { + Type GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *GetProjectEnvResponseBodyInternalContentHint) GetType() GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType { + if o == nil { + return GetProjectEnvResponseBodyProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *GetProjectEnvResponseBodyInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type GetProjectEnvResponseBody1 struct { + Decrypted bool `json:"decrypted"` + Target *GetProjectEnvResponseBodyTarget `json:"target,omitempty"` + Type GetProjectEnvResponseBodyType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *GetProjectEnvResponseBodyContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *GetProjectEnvResponseBodyInternalContentHint `json:"internalContentHint,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *GetProjectEnvResponseBody1) GetDecrypted() bool { + if o == nil { + return false + } + return o.Decrypted +} + +func (o *GetProjectEnvResponseBody1) GetTarget() *GetProjectEnvResponseBodyTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetProjectEnvResponseBody1) GetType() GetProjectEnvResponseBodyType { + if o == nil { + return GetProjectEnvResponseBodyType("") + } + return o.Type +} + +func (o *GetProjectEnvResponseBody1) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *GetProjectEnvResponseBody1) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetProjectEnvResponseBody1) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *GetProjectEnvResponseBody1) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *GetProjectEnvResponseBody1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectEnvResponseBody1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectEnvResponseBody1) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *GetProjectEnvResponseBody1) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *GetProjectEnvResponseBody1) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *GetProjectEnvResponseBody1) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *GetProjectEnvResponseBody1) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *GetProjectEnvResponseBody1) GetContentHint() *GetProjectEnvResponseBodyContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *GetProjectEnvResponseBody1) GetInternalContentHint() *GetProjectEnvResponseBodyInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *GetProjectEnvResponseBody1) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *GetProjectEnvResponseBody1) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *GetProjectEnvResponseBody1) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type GetProjectEnvResponseBodyUnionType string + +const ( + GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody1 GetProjectEnvResponseBodyUnionType = "getProjectEnv_responseBody_1" + GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody2 GetProjectEnvResponseBodyUnionType = "getProjectEnv_responseBody_2" + GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody3 GetProjectEnvResponseBodyUnionType = "getProjectEnv_responseBody_3" +) + +type GetProjectEnvResponseBody struct { + GetProjectEnvResponseBody1 *GetProjectEnvResponseBody1 + GetProjectEnvResponseBody2 *GetProjectEnvResponseBody2 + GetProjectEnvResponseBody3 *GetProjectEnvResponseBody3 + + Type GetProjectEnvResponseBodyUnionType +} + +func CreateGetProjectEnvResponseBodyGetProjectEnvResponseBody1(getProjectEnvResponseBody1 GetProjectEnvResponseBody1) GetProjectEnvResponseBody { + typ := GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody1 + + return GetProjectEnvResponseBody{ + GetProjectEnvResponseBody1: &getProjectEnvResponseBody1, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyGetProjectEnvResponseBody2(getProjectEnvResponseBody2 GetProjectEnvResponseBody2) GetProjectEnvResponseBody { + typ := GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody2 + + return GetProjectEnvResponseBody{ + GetProjectEnvResponseBody2: &getProjectEnvResponseBody2, + Type: typ, + } +} + +func CreateGetProjectEnvResponseBodyGetProjectEnvResponseBody3(getProjectEnvResponseBody3 GetProjectEnvResponseBody3) GetProjectEnvResponseBody { + typ := GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody3 + + return GetProjectEnvResponseBody{ + GetProjectEnvResponseBody3: &getProjectEnvResponseBody3, + Type: typ, + } +} + +func (u *GetProjectEnvResponseBody) UnmarshalJSON(data []byte) error { + + var getProjectEnvResponseBody1 GetProjectEnvResponseBody1 = GetProjectEnvResponseBody1{} + if err := utils.UnmarshalJSON(data, &getProjectEnvResponseBody1, "", true, true); err == nil { + u.GetProjectEnvResponseBody1 = &getProjectEnvResponseBody1 + u.Type = GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody1 + return nil + } + + var getProjectEnvResponseBody3 GetProjectEnvResponseBody3 = GetProjectEnvResponseBody3{} + if err := utils.UnmarshalJSON(data, &getProjectEnvResponseBody3, "", true, true); err == nil { + u.GetProjectEnvResponseBody3 = &getProjectEnvResponseBody3 + u.Type = GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody3 + return nil + } + + var getProjectEnvResponseBody2 GetProjectEnvResponseBody2 = GetProjectEnvResponseBody2{} + if err := utils.UnmarshalJSON(data, &getProjectEnvResponseBody2, "", true, true); err == nil { + u.GetProjectEnvResponseBody2 = &getProjectEnvResponseBody2 + u.Type = GetProjectEnvResponseBodyUnionTypeGetProjectEnvResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectEnvResponseBody", string(data)) +} + +func (u GetProjectEnvResponseBody) MarshalJSON() ([]byte, error) { + if u.GetProjectEnvResponseBody1 != nil { + return utils.MarshalJSON(u.GetProjectEnvResponseBody1, "", true) + } + + if u.GetProjectEnvResponseBody2 != nil { + return utils.MarshalJSON(u.GetProjectEnvResponseBody2, "", true) + } + + if u.GetProjectEnvResponseBody3 != nil { + return utils.MarshalJSON(u.GetProjectEnvResponseBody3, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectEnvResponseBody: all fields are null") +} + +type GetProjectEnvResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *GetProjectEnvResponseBody +} + +func (o *GetProjectEnvResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetProjectEnvResponse) GetOneOf() *GetProjectEnvResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getprojectmembers.go b/src/__tests__/mockserver/internal/sdk/models/operations/getprojectmembers.go new file mode 100644 index 00000000..7281367d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getprojectmembers.go @@ -0,0 +1,405 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetProjectMembersRequest struct { + // The ID or name of the Project. + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // Limit how many project members should be returned + Limit *int64 `queryParam:"style=form,explode=true,name=limit"` + // Timestamp in milliseconds to only include members added since then. + Since *int64 `queryParam:"style=form,explode=true,name=since"` + // Timestamp in milliseconds to only include members added until then. + Until *int64 `queryParam:"style=form,explode=true,name=until"` + // Search project members by their name, username, and email. + Search *string `queryParam:"style=form,explode=true,name=search"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetProjectMembersRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *GetProjectMembersRequest) GetLimit() *int64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetProjectMembersRequest) GetSince() *int64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetProjectMembersRequest) GetUntil() *int64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *GetProjectMembersRequest) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +func (o *GetProjectMembersRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetProjectMembersRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetProjectMembersResponseBodyRole - Role of this user in the project. +type GetProjectMembersResponseBodyRole string + +const ( + GetProjectMembersResponseBodyRoleAdmin GetProjectMembersResponseBodyRole = "ADMIN" + GetProjectMembersResponseBodyRoleProjectDeveloper GetProjectMembersResponseBodyRole = "PROJECT_DEVELOPER" + GetProjectMembersResponseBodyRoleProjectViewer GetProjectMembersResponseBodyRole = "PROJECT_VIEWER" +) + +func (e GetProjectMembersResponseBodyRole) ToPointer() *GetProjectMembersResponseBodyRole { + return &e +} +func (e *GetProjectMembersResponseBodyRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = GetProjectMembersResponseBodyRole(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectMembersResponseBodyRole: %v", v) + } +} + +// ComputedProjectRole - Role of this user in the project. +type ComputedProjectRole string + +const ( + ComputedProjectRoleAdmin ComputedProjectRole = "ADMIN" + ComputedProjectRoleProjectDeveloper ComputedProjectRole = "PROJECT_DEVELOPER" + ComputedProjectRoleProjectViewer ComputedProjectRole = "PROJECT_VIEWER" +) + +func (e ComputedProjectRole) ToPointer() *ComputedProjectRole { + return &e +} +func (e *ComputedProjectRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = ComputedProjectRole(v) + return nil + default: + return fmt.Errorf("invalid value for ComputedProjectRole: %v", v) + } +} + +// ResponseBodyTeamRole - The role of this user in the team. +type ResponseBodyTeamRole string + +const ( + ResponseBodyTeamRoleOwner ResponseBodyTeamRole = "OWNER" + ResponseBodyTeamRoleMember ResponseBodyTeamRole = "MEMBER" + ResponseBodyTeamRoleDeveloper ResponseBodyTeamRole = "DEVELOPER" + ResponseBodyTeamRoleBilling ResponseBodyTeamRole = "BILLING" + ResponseBodyTeamRoleViewer ResponseBodyTeamRole = "VIEWER" + ResponseBodyTeamRoleContributor ResponseBodyTeamRole = "CONTRIBUTOR" +) + +func (e ResponseBodyTeamRole) ToPointer() *ResponseBodyTeamRole { + return &e +} +func (e *ResponseBodyTeamRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "BILLING": + fallthrough + case "VIEWER": + fallthrough + case "CONTRIBUTOR": + *e = ResponseBodyTeamRole(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyTeamRole: %v", v) + } +} + +type ResponseBodyMembers struct { + // ID of the file for the Avatar of this member. + Avatar *string `json:"avatar,omitempty"` + // The email of this member. + Email string `json:"email"` + // Role of this user in the project. + Role GetProjectMembersResponseBodyRole `json:"role"` + // Role of this user in the project. + ComputedProjectRole ComputedProjectRole `json:"computedProjectRole"` + // The ID of this user. + UID string `json:"uid"` + // The unique username of this user. + Username string `json:"username"` + // The name of this user. + Name *string `json:"name,omitempty"` + // Timestamp in milliseconds when this member was added. + CreatedAt float64 `json:"createdAt"` + // The role of this user in the team. + TeamRole ResponseBodyTeamRole `json:"teamRole"` +} + +func (o *ResponseBodyMembers) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +func (o *ResponseBodyMembers) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *ResponseBodyMembers) GetRole() GetProjectMembersResponseBodyRole { + if o == nil { + return GetProjectMembersResponseBodyRole("") + } + return o.Role +} + +func (o *ResponseBodyMembers) GetComputedProjectRole() ComputedProjectRole { + if o == nil { + return ComputedProjectRole("") + } + return o.ComputedProjectRole +} + +func (o *ResponseBodyMembers) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *ResponseBodyMembers) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *ResponseBodyMembers) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *ResponseBodyMembers) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ResponseBodyMembers) GetTeamRole() ResponseBodyTeamRole { + if o == nil { + return ResponseBodyTeamRole("") + } + return o.TeamRole +} + +type GetProjectMembersResponseBodyPagination struct { + HasNext bool `json:"hasNext"` + // Amount of items in the current page. + Count float64 `json:"count"` + // Timestamp that must be used to request the next page. + Next *float64 `json:"next"` + // Timestamp that must be used to request the previous page. + Prev *float64 `json:"prev"` +} + +func (o *GetProjectMembersResponseBodyPagination) GetHasNext() bool { + if o == nil { + return false + } + return o.HasNext +} + +func (o *GetProjectMembersResponseBodyPagination) GetCount() float64 { + if o == nil { + return 0.0 + } + return o.Count +} + +func (o *GetProjectMembersResponseBodyPagination) GetNext() *float64 { + if o == nil { + return nil + } + return o.Next +} + +func (o *GetProjectMembersResponseBodyPagination) GetPrev() *float64 { + if o == nil { + return nil + } + return o.Prev +} + +// GetProjectMembersResponseBody2 - Paginated list of members for the project. +type GetProjectMembersResponseBody2 struct { + Members []ResponseBodyMembers `json:"members"` + Pagination GetProjectMembersResponseBodyPagination `json:"pagination"` +} + +func (o *GetProjectMembersResponseBody2) GetMembers() []ResponseBodyMembers { + if o == nil { + return []ResponseBodyMembers{} + } + return o.Members +} + +func (o *GetProjectMembersResponseBody2) GetPagination() GetProjectMembersResponseBodyPagination { + if o == nil { + return GetProjectMembersResponseBodyPagination{} + } + return o.Pagination +} + +type GetProjectMembersResponseBody1 struct { +} + +type GetProjectMembersResponseBodyType string + +const ( + GetProjectMembersResponseBodyTypeGetProjectMembersResponseBody1 GetProjectMembersResponseBodyType = "getProjectMembers_responseBody_1" + GetProjectMembersResponseBodyTypeGetProjectMembersResponseBody2 GetProjectMembersResponseBodyType = "getProjectMembers_responseBody_2" +) + +// GetProjectMembersResponseBody - Paginated list of members for the project. +type GetProjectMembersResponseBody struct { + GetProjectMembersResponseBody1 *GetProjectMembersResponseBody1 + GetProjectMembersResponseBody2 *GetProjectMembersResponseBody2 + + Type GetProjectMembersResponseBodyType +} + +func CreateGetProjectMembersResponseBodyGetProjectMembersResponseBody1(getProjectMembersResponseBody1 GetProjectMembersResponseBody1) GetProjectMembersResponseBody { + typ := GetProjectMembersResponseBodyTypeGetProjectMembersResponseBody1 + + return GetProjectMembersResponseBody{ + GetProjectMembersResponseBody1: &getProjectMembersResponseBody1, + Type: typ, + } +} + +func CreateGetProjectMembersResponseBodyGetProjectMembersResponseBody2(getProjectMembersResponseBody2 GetProjectMembersResponseBody2) GetProjectMembersResponseBody { + typ := GetProjectMembersResponseBodyTypeGetProjectMembersResponseBody2 + + return GetProjectMembersResponseBody{ + GetProjectMembersResponseBody2: &getProjectMembersResponseBody2, + Type: typ, + } +} + +func (u *GetProjectMembersResponseBody) UnmarshalJSON(data []byte) error { + + var getProjectMembersResponseBody1 GetProjectMembersResponseBody1 = GetProjectMembersResponseBody1{} + if err := utils.UnmarshalJSON(data, &getProjectMembersResponseBody1, "", true, true); err == nil { + u.GetProjectMembersResponseBody1 = &getProjectMembersResponseBody1 + u.Type = GetProjectMembersResponseBodyTypeGetProjectMembersResponseBody1 + return nil + } + + var getProjectMembersResponseBody2 GetProjectMembersResponseBody2 = GetProjectMembersResponseBody2{} + if err := utils.UnmarshalJSON(data, &getProjectMembersResponseBody2, "", true, true); err == nil { + u.GetProjectMembersResponseBody2 = &getProjectMembersResponseBody2 + u.Type = GetProjectMembersResponseBodyTypeGetProjectMembersResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectMembersResponseBody", string(data)) +} + +func (u GetProjectMembersResponseBody) MarshalJSON() ([]byte, error) { + if u.GetProjectMembersResponseBody1 != nil { + return utils.MarshalJSON(u.GetProjectMembersResponseBody1, "", true) + } + + if u.GetProjectMembersResponseBody2 != nil { + return utils.MarshalJSON(u.GetProjectMembersResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectMembersResponseBody: all fields are null") +} + +type GetProjectMembersResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Paginated list of members for the project. + OneOf *GetProjectMembersResponseBody +} + +func (o *GetProjectMembersResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetProjectMembersResponse) GetOneOf() *GetProjectMembersResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getprojects.go b/src/__tests__/mockserver/internal/sdk/models/operations/getprojects.go new file mode 100644 index 00000000..5d76231c --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getprojects.go @@ -0,0 +1,7766 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// GitForkProtection - Specifies whether PRs from Git forks should require a team member's authorization before it can be deployed +type GitForkProtection string + +const ( + GitForkProtectionOne GitForkProtection = "1" + GitForkProtectionZero GitForkProtection = "0" +) + +func (e GitForkProtection) ToPointer() *GitForkProtection { + return &e +} +func (e *GitForkProtection) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "1": + fallthrough + case "0": + *e = GitForkProtection(v) + return nil + default: + return fmt.Errorf("invalid value for GitForkProtection: %v", v) + } +} + +type GetProjectsRequest struct { + // Query only projects updated after the given timestamp + From *string `queryParam:"style=form,explode=true,name=from"` + // Specifies whether PRs from Git forks should require a team member's authorization before it can be deployed + GitForkProtection *GitForkProtection `queryParam:"style=form,explode=true,name=gitForkProtection"` + // Limit the number of projects returned + Limit *string `queryParam:"style=form,explode=true,name=limit"` + // Search projects by the name field + Search *string `queryParam:"style=form,explode=true,name=search"` + // Filter results by repo. Also used for project count + Repo *string `queryParam:"style=form,explode=true,name=repo"` + // Filter results by Repository ID. + RepoID *string `queryParam:"style=form,explode=true,name=repoId"` + // Filter results by Repository URL. + RepoURL *string `queryParam:"style=form,explode=true,name=repoUrl"` + // Filter results by excluding those projects that belong to a repo + ExcludeRepos *string `queryParam:"style=form,explode=true,name=excludeRepos"` + // Filter results by connected Edge Config ID + EdgeConfigID *string `queryParam:"style=form,explode=true,name=edgeConfigId"` + // Filter results by connected Edge Config Token ID + EdgeConfigTokenID *string `queryParam:"style=form,explode=true,name=edgeConfigTokenId"` + Deprecated *bool `queryParam:"style=form,explode=true,name=deprecated"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetProjectsRequest) GetFrom() *string { + if o == nil { + return nil + } + return o.From +} + +func (o *GetProjectsRequest) GetGitForkProtection() *GitForkProtection { + if o == nil { + return nil + } + return o.GitForkProtection +} + +func (o *GetProjectsRequest) GetLimit() *string { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetProjectsRequest) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +func (o *GetProjectsRequest) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +func (o *GetProjectsRequest) GetRepoID() *string { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *GetProjectsRequest) GetRepoURL() *string { + if o == nil { + return nil + } + return o.RepoURL +} + +func (o *GetProjectsRequest) GetExcludeRepos() *string { + if o == nil { + return nil + } + return o.ExcludeRepos +} + +func (o *GetProjectsRequest) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *GetProjectsRequest) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *GetProjectsRequest) GetDeprecated() *bool { + if o == nil { + return nil + } + return o.Deprecated +} + +func (o *GetProjectsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetProjectsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetProjectsAnalytics struct { + ID string `json:"id"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + DisabledAt float64 `json:"disabledAt"` + EnabledAt float64 `json:"enabledAt"` + PaidAt *float64 `json:"paidAt,omitempty"` + SampleRatePercent *float64 `json:"sampleRatePercent,omitempty"` + SpendLimitInDollars *float64 `json:"spendLimitInDollars,omitempty"` +} + +func (o *GetProjectsAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *GetProjectsAnalytics) GetDisabledAt() float64 { + if o == nil { + return 0.0 + } + return o.DisabledAt +} + +func (o *GetProjectsAnalytics) GetEnabledAt() float64 { + if o == nil { + return 0.0 + } + return o.EnabledAt +} + +func (o *GetProjectsAnalytics) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +func (o *GetProjectsAnalytics) GetSampleRatePercent() *float64 { + if o == nil { + return nil + } + return o.SampleRatePercent +} + +func (o *GetProjectsAnalytics) GetSpendLimitInDollars() *float64 { + if o == nil { + return nil + } + return o.SpendLimitInDollars +} + +type GetProjectsSpeedInsights struct { + ID string `json:"id"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` + PaidAt *float64 `json:"paidAt,omitempty"` +} + +func (o *GetProjectsSpeedInsights) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsSpeedInsights) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *GetProjectsSpeedInsights) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetProjectsSpeedInsights) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *GetProjectsSpeedInsights) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +func (o *GetProjectsSpeedInsights) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +type GetProjectsDefinitions struct { + // The hostname that should be used. + Host string `json:"host"` + // The path that should be called for the cronjob. + Path string `json:"path"` + // The cron expression. + Schedule string `json:"schedule"` +} + +func (o *GetProjectsDefinitions) GetHost() string { + if o == nil { + return "" + } + return o.Host +} + +func (o *GetProjectsDefinitions) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *GetProjectsDefinitions) GetSchedule() string { + if o == nil { + return "" + } + return o.Schedule +} + +type GetProjectsCrons struct { + // The time the feature was enabled for this project. Note: It enables automatically with the first Deployment that outputs cronjobs. + EnabledAt float64 `json:"enabledAt"` + // The time the feature was disabled for this project. + DisabledAt *float64 `json:"disabledAt"` + UpdatedAt float64 `json:"updatedAt"` + // The ID of the Deployment from which the definitions originated. + DeploymentID *string `json:"deploymentId"` + Definitions []GetProjectsDefinitions `json:"definitions"` +} + +func (o *GetProjectsCrons) GetEnabledAt() float64 { + if o == nil { + return 0.0 + } + return o.EnabledAt +} + +func (o *GetProjectsCrons) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetProjectsCrons) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetProjectsCrons) GetDeploymentID() *string { + if o == nil { + return nil + } + return o.DeploymentID +} + +func (o *GetProjectsCrons) GetDefinitions() []GetProjectsDefinitions { + if o == nil { + return []GetProjectsDefinitions{} + } + return o.Definitions +} + +type GetProjectsDataCache struct { + UserDisabled bool `json:"userDisabled"` + StorageSizeBytes *float64 `json:"storageSizeBytes,omitempty"` + Unlimited *bool `json:"unlimited,omitempty"` +} + +func (o *GetProjectsDataCache) GetUserDisabled() bool { + if o == nil { + return false + } + return o.UserDisabled +} + +func (o *GetProjectsDataCache) GetStorageSizeBytes() *float64 { + if o == nil { + return nil + } + return o.StorageSizeBytes +} + +func (o *GetProjectsDataCache) GetUnlimited() *bool { + if o == nil { + return nil + } + return o.Unlimited +} + +type GetProjectsDeploymentExpiration struct { + ExpirationDays *float64 `json:"expirationDays,omitempty"` + ExpirationDaysProduction *float64 `json:"expirationDaysProduction,omitempty"` + ExpirationDaysCanceled *float64 `json:"expirationDaysCanceled,omitempty"` + ExpirationDaysErrored *float64 `json:"expirationDaysErrored,omitempty"` + DeploymentsToKeep *float64 `json:"deploymentsToKeep,omitempty"` +} + +func (o *GetProjectsDeploymentExpiration) GetExpirationDays() *float64 { + if o == nil { + return nil + } + return o.ExpirationDays +} + +func (o *GetProjectsDeploymentExpiration) GetExpirationDaysProduction() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysProduction +} + +func (o *GetProjectsDeploymentExpiration) GetExpirationDaysCanceled() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysCanceled +} + +func (o *GetProjectsDeploymentExpiration) GetExpirationDaysErrored() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysErrored +} + +func (o *GetProjectsDeploymentExpiration) GetDeploymentsToKeep() *float64 { + if o == nil { + return nil + } + return o.DeploymentsToKeep +} + +type GetProjectsTarget2 string + +const ( + GetProjectsTarget2Production GetProjectsTarget2 = "production" + GetProjectsTarget2Preview GetProjectsTarget2 = "preview" + GetProjectsTarget2Development GetProjectsTarget2 = "development" +) + +func (e GetProjectsTarget2) ToPointer() *GetProjectsTarget2 { + return &e +} +func (e *GetProjectsTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = GetProjectsTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsTarget2: %v", v) + } +} + +type GetProjectsTarget1 string + +const ( + GetProjectsTarget1Production GetProjectsTarget1 = "production" + GetProjectsTarget1Preview GetProjectsTarget1 = "preview" + GetProjectsTarget1Development GetProjectsTarget1 = "development" +) + +func (e GetProjectsTarget1) ToPointer() *GetProjectsTarget1 { + return &e +} +func (e *GetProjectsTarget1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = GetProjectsTarget1(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsTarget1: %v", v) + } +} + +type GetProjectsTargetType string + +const ( + GetProjectsTargetTypeArrayOfGetProjectsTarget1 GetProjectsTargetType = "arrayOfGetProjectsTarget1" + GetProjectsTargetTypeGetProjectsTarget2 GetProjectsTargetType = "getProjects_target_2" +) + +type GetProjectsTarget struct { + ArrayOfGetProjectsTarget1 []GetProjectsTarget1 + GetProjectsTarget2 *GetProjectsTarget2 + + Type GetProjectsTargetType +} + +func CreateGetProjectsTargetArrayOfGetProjectsTarget1(arrayOfGetProjectsTarget1 []GetProjectsTarget1) GetProjectsTarget { + typ := GetProjectsTargetTypeArrayOfGetProjectsTarget1 + + return GetProjectsTarget{ + ArrayOfGetProjectsTarget1: arrayOfGetProjectsTarget1, + Type: typ, + } +} + +func CreateGetProjectsTargetGetProjectsTarget2(getProjectsTarget2 GetProjectsTarget2) GetProjectsTarget { + typ := GetProjectsTargetTypeGetProjectsTarget2 + + return GetProjectsTarget{ + GetProjectsTarget2: &getProjectsTarget2, + Type: typ, + } +} + +func (u *GetProjectsTarget) UnmarshalJSON(data []byte) error { + + var arrayOfGetProjectsTarget1 []GetProjectsTarget1 = []GetProjectsTarget1{} + if err := utils.UnmarshalJSON(data, &arrayOfGetProjectsTarget1, "", true, true); err == nil { + u.ArrayOfGetProjectsTarget1 = arrayOfGetProjectsTarget1 + u.Type = GetProjectsTargetTypeArrayOfGetProjectsTarget1 + return nil + } + + var getProjectsTarget2 GetProjectsTarget2 = GetProjectsTarget2("") + if err := utils.UnmarshalJSON(data, &getProjectsTarget2, "", true, true); err == nil { + u.GetProjectsTarget2 = &getProjectsTarget2 + u.Type = GetProjectsTargetTypeGetProjectsTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsTarget", string(data)) +} + +func (u GetProjectsTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfGetProjectsTarget1 != nil { + return utils.MarshalJSON(u.ArrayOfGetProjectsTarget1, "", true) + } + + if u.GetProjectsTarget2 != nil { + return utils.MarshalJSON(u.GetProjectsTarget2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsTarget: all fields are null") +} + +type GetProjectsType string + +const ( + GetProjectsTypeSystem GetProjectsType = "system" + GetProjectsTypeEncrypted GetProjectsType = "encrypted" + GetProjectsTypePlain GetProjectsType = "plain" + GetProjectsTypeSensitive GetProjectsType = "sensitive" + GetProjectsTypeSecret GetProjectsType = "secret" +) + +func (e GetProjectsType) ToPointer() *GetProjectsType { + return &e +} +func (e *GetProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = GetProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsType: %v", v) + } +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15TypeFlagsConnectionString GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type = "flags-connection-string" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type: %v", v) + } +} + +type GetProjectsContentHint15 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *GetProjectsContentHint15) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv15Type("") + } + return o.Type +} + +func (o *GetProjectsContentHint15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14TypeIntegrationStoreSecret GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type = "integration-store-secret" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type: %v", v) + } +} + +type GetProjectsContentHint14 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *GetProjectsContentHint14) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv14Type("") + } + return o.Type +} + +func (o *GetProjectsContentHint14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *GetProjectsContentHint14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *GetProjectsContentHint14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *GetProjectsContentHint14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13TypePostgresURLNoSsl GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type = "postgres-url-no-ssl" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type: %v", v) + } +} + +type GetProjectsContentHint13 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint13) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv13Type("") + } + return o.Type +} + +func (o *GetProjectsContentHint13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12TypePostgresDatabase GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type = "postgres-database" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type: %v", v) + } +} + +type GetProjectsContentHint12 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint12) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv12Type("") + } + return o.Type +} + +func (o *GetProjectsContentHint12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11TypePostgresPassword GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type = "postgres-password" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type: %v", v) + } +} + +type GetProjectsContentHint11 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint11) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv11Type("") + } + return o.Type +} + +func (o *GetProjectsContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10TypePostgresHost GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type = "postgres-host" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type: %v", v) + } +} + +type GetProjectsContentHint10 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint10) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv10Type("") + } + return o.Type +} + +func (o *GetProjectsContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9TypePostgresUser GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type = "postgres-user" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type: %v", v) + } +} + +type GetProjectsContentHint9 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint9) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnv9Type("") + } + return o.Type +} + +func (o *GetProjectsContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvTypePostgresPrismaURL GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType = "postgres-prisma-url" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType: %v", v) + } +} + +type GetProjectsContentHint8 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint8) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsEnvType("") + } + return o.Type +} + +func (o *GetProjectsContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsTypePostgresURLNonPooling GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType = "postgres-url-non-pooling" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType: %v", v) + } +} + +type GetProjectsContentHint7 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint7) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyProjectsType("") + } + return o.Type +} + +func (o *GetProjectsContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyTypePostgresURL GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType = "postgres-url" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type GetProjectsContentHint6 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint6) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *GetProjectsContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200ApplicationJSONType string + +const ( + GetProjectsContentHintProjectsResponse200ApplicationJSONTypeBlobReadWriteToken GetProjectsContentHintProjectsResponse200ApplicationJSONType = "blob-read-write-token" +) + +func (e GetProjectsContentHintProjectsResponse200ApplicationJSONType) ToPointer() *GetProjectsContentHintProjectsResponse200ApplicationJSONType { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = GetProjectsContentHintProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type GetProjectsContentHint5 struct { + Type GetProjectsContentHintProjectsResponse200ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint5) GetType() GetProjectsContentHintProjectsResponse200ApplicationJSONType { + if o == nil { + return GetProjectsContentHintProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *GetProjectsContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponse200Type string + +const ( + GetProjectsContentHintProjectsResponse200TypeRedisRestAPIReadOnlyToken GetProjectsContentHintProjectsResponse200Type = "redis-rest-api-read-only-token" +) + +func (e GetProjectsContentHintProjectsResponse200Type) ToPointer() *GetProjectsContentHintProjectsResponse200Type { + return &e +} +func (e *GetProjectsContentHintProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = GetProjectsContentHintProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponse200Type: %v", v) + } +} + +type GetProjectsContentHint4 struct { + Type GetProjectsContentHintProjectsResponse200Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint4) GetType() GetProjectsContentHintProjectsResponse200Type { + if o == nil { + return GetProjectsContentHintProjectsResponse200Type("") + } + return o.Type +} + +func (o *GetProjectsContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsResponseType string + +const ( + GetProjectsContentHintProjectsResponseTypeRedisRestAPIToken GetProjectsContentHintProjectsResponseType = "redis-rest-api-token" +) + +func (e GetProjectsContentHintProjectsResponseType) ToPointer() *GetProjectsContentHintProjectsResponseType { + return &e +} +func (e *GetProjectsContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = GetProjectsContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsResponseType: %v", v) + } +} + +type GetProjectsContentHint3 struct { + Type GetProjectsContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint3) GetType() GetProjectsContentHintProjectsResponseType { + if o == nil { + return GetProjectsContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *GetProjectsContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintProjectsType string + +const ( + GetProjectsContentHintProjectsTypeRedisRestAPIURL GetProjectsContentHintProjectsType = "redis-rest-api-url" +) + +func (e GetProjectsContentHintProjectsType) ToPointer() *GetProjectsContentHintProjectsType { + return &e +} +func (e *GetProjectsContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = GetProjectsContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintProjectsType: %v", v) + } +} + +type GetProjectsContentHint2 struct { + Type GetProjectsContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint2) GetType() GetProjectsContentHintProjectsType { + if o == nil { + return GetProjectsContentHintProjectsType("") + } + return o.Type +} + +func (o *GetProjectsContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintType string + +const ( + GetProjectsContentHintTypeRedisURL GetProjectsContentHintType = "redis-url" +) + +func (e GetProjectsContentHintType) ToPointer() *GetProjectsContentHintType { + return &e +} +func (e *GetProjectsContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = GetProjectsContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsContentHintType: %v", v) + } +} + +type GetProjectsContentHint1 struct { + Type GetProjectsContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *GetProjectsContentHint1) GetType() GetProjectsContentHintType { + if o == nil { + return GetProjectsContentHintType("") + } + return o.Type +} + +func (o *GetProjectsContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type GetProjectsContentHintUnionType string + +const ( + GetProjectsContentHintUnionTypeGetProjectsContentHint1 GetProjectsContentHintUnionType = "getProjects_contentHint_1" + GetProjectsContentHintUnionTypeGetProjectsContentHint2 GetProjectsContentHintUnionType = "getProjects_contentHint_2" + GetProjectsContentHintUnionTypeGetProjectsContentHint3 GetProjectsContentHintUnionType = "getProjects_contentHint_3" + GetProjectsContentHintUnionTypeGetProjectsContentHint4 GetProjectsContentHintUnionType = "getProjects_contentHint_4" + GetProjectsContentHintUnionTypeGetProjectsContentHint5 GetProjectsContentHintUnionType = "getProjects_contentHint_5" + GetProjectsContentHintUnionTypeGetProjectsContentHint6 GetProjectsContentHintUnionType = "getProjects_contentHint_6" + GetProjectsContentHintUnionTypeGetProjectsContentHint7 GetProjectsContentHintUnionType = "getProjects_contentHint_7" + GetProjectsContentHintUnionTypeGetProjectsContentHint8 GetProjectsContentHintUnionType = "getProjects_contentHint_8" + GetProjectsContentHintUnionTypeGetProjectsContentHint9 GetProjectsContentHintUnionType = "getProjects_contentHint_9" + GetProjectsContentHintUnionTypeGetProjectsContentHint10 GetProjectsContentHintUnionType = "getProjects_contentHint_10" + GetProjectsContentHintUnionTypeGetProjectsContentHint11 GetProjectsContentHintUnionType = "getProjects_contentHint_11" + GetProjectsContentHintUnionTypeGetProjectsContentHint12 GetProjectsContentHintUnionType = "getProjects_contentHint_12" + GetProjectsContentHintUnionTypeGetProjectsContentHint13 GetProjectsContentHintUnionType = "getProjects_contentHint_13" + GetProjectsContentHintUnionTypeGetProjectsContentHint14 GetProjectsContentHintUnionType = "getProjects_contentHint_14" + GetProjectsContentHintUnionTypeGetProjectsContentHint15 GetProjectsContentHintUnionType = "getProjects_contentHint_15" +) + +type GetProjectsContentHint struct { + GetProjectsContentHint1 *GetProjectsContentHint1 + GetProjectsContentHint2 *GetProjectsContentHint2 + GetProjectsContentHint3 *GetProjectsContentHint3 + GetProjectsContentHint4 *GetProjectsContentHint4 + GetProjectsContentHint5 *GetProjectsContentHint5 + GetProjectsContentHint6 *GetProjectsContentHint6 + GetProjectsContentHint7 *GetProjectsContentHint7 + GetProjectsContentHint8 *GetProjectsContentHint8 + GetProjectsContentHint9 *GetProjectsContentHint9 + GetProjectsContentHint10 *GetProjectsContentHint10 + GetProjectsContentHint11 *GetProjectsContentHint11 + GetProjectsContentHint12 *GetProjectsContentHint12 + GetProjectsContentHint13 *GetProjectsContentHint13 + GetProjectsContentHint14 *GetProjectsContentHint14 + GetProjectsContentHint15 *GetProjectsContentHint15 + + Type GetProjectsContentHintUnionType +} + +func CreateGetProjectsContentHintGetProjectsContentHint1(getProjectsContentHint1 GetProjectsContentHint1) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint1 + + return GetProjectsContentHint{ + GetProjectsContentHint1: &getProjectsContentHint1, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint2(getProjectsContentHint2 GetProjectsContentHint2) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint2 + + return GetProjectsContentHint{ + GetProjectsContentHint2: &getProjectsContentHint2, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint3(getProjectsContentHint3 GetProjectsContentHint3) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint3 + + return GetProjectsContentHint{ + GetProjectsContentHint3: &getProjectsContentHint3, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint4(getProjectsContentHint4 GetProjectsContentHint4) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint4 + + return GetProjectsContentHint{ + GetProjectsContentHint4: &getProjectsContentHint4, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint5(getProjectsContentHint5 GetProjectsContentHint5) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint5 + + return GetProjectsContentHint{ + GetProjectsContentHint5: &getProjectsContentHint5, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint6(getProjectsContentHint6 GetProjectsContentHint6) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint6 + + return GetProjectsContentHint{ + GetProjectsContentHint6: &getProjectsContentHint6, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint7(getProjectsContentHint7 GetProjectsContentHint7) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint7 + + return GetProjectsContentHint{ + GetProjectsContentHint7: &getProjectsContentHint7, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint8(getProjectsContentHint8 GetProjectsContentHint8) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint8 + + return GetProjectsContentHint{ + GetProjectsContentHint8: &getProjectsContentHint8, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint9(getProjectsContentHint9 GetProjectsContentHint9) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint9 + + return GetProjectsContentHint{ + GetProjectsContentHint9: &getProjectsContentHint9, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint10(getProjectsContentHint10 GetProjectsContentHint10) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint10 + + return GetProjectsContentHint{ + GetProjectsContentHint10: &getProjectsContentHint10, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint11(getProjectsContentHint11 GetProjectsContentHint11) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint11 + + return GetProjectsContentHint{ + GetProjectsContentHint11: &getProjectsContentHint11, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint12(getProjectsContentHint12 GetProjectsContentHint12) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint12 + + return GetProjectsContentHint{ + GetProjectsContentHint12: &getProjectsContentHint12, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint13(getProjectsContentHint13 GetProjectsContentHint13) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint13 + + return GetProjectsContentHint{ + GetProjectsContentHint13: &getProjectsContentHint13, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint14(getProjectsContentHint14 GetProjectsContentHint14) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint14 + + return GetProjectsContentHint{ + GetProjectsContentHint14: &getProjectsContentHint14, + Type: typ, + } +} + +func CreateGetProjectsContentHintGetProjectsContentHint15(getProjectsContentHint15 GetProjectsContentHint15) GetProjectsContentHint { + typ := GetProjectsContentHintUnionTypeGetProjectsContentHint15 + + return GetProjectsContentHint{ + GetProjectsContentHint15: &getProjectsContentHint15, + Type: typ, + } +} + +func (u *GetProjectsContentHint) UnmarshalJSON(data []byte) error { + + var getProjectsContentHint7 GetProjectsContentHint7 = GetProjectsContentHint7{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint7, "", true, true); err == nil { + u.GetProjectsContentHint7 = &getProjectsContentHint7 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint7 + return nil + } + + var getProjectsContentHint9 GetProjectsContentHint9 = GetProjectsContentHint9{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint9, "", true, true); err == nil { + u.GetProjectsContentHint9 = &getProjectsContentHint9 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint9 + return nil + } + + var getProjectsContentHint3 GetProjectsContentHint3 = GetProjectsContentHint3{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint3, "", true, true); err == nil { + u.GetProjectsContentHint3 = &getProjectsContentHint3 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint3 + return nil + } + + var getProjectsContentHint4 GetProjectsContentHint4 = GetProjectsContentHint4{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint4, "", true, true); err == nil { + u.GetProjectsContentHint4 = &getProjectsContentHint4 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint4 + return nil + } + + var getProjectsContentHint5 GetProjectsContentHint5 = GetProjectsContentHint5{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint5, "", true, true); err == nil { + u.GetProjectsContentHint5 = &getProjectsContentHint5 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint5 + return nil + } + + var getProjectsContentHint6 GetProjectsContentHint6 = GetProjectsContentHint6{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint6, "", true, true); err == nil { + u.GetProjectsContentHint6 = &getProjectsContentHint6 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint6 + return nil + } + + var getProjectsContentHint2 GetProjectsContentHint2 = GetProjectsContentHint2{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint2, "", true, true); err == nil { + u.GetProjectsContentHint2 = &getProjectsContentHint2 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint2 + return nil + } + + var getProjectsContentHint8 GetProjectsContentHint8 = GetProjectsContentHint8{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint8, "", true, true); err == nil { + u.GetProjectsContentHint8 = &getProjectsContentHint8 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint8 + return nil + } + + var getProjectsContentHint1 GetProjectsContentHint1 = GetProjectsContentHint1{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint1, "", true, true); err == nil { + u.GetProjectsContentHint1 = &getProjectsContentHint1 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint1 + return nil + } + + var getProjectsContentHint10 GetProjectsContentHint10 = GetProjectsContentHint10{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint10, "", true, true); err == nil { + u.GetProjectsContentHint10 = &getProjectsContentHint10 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint10 + return nil + } + + var getProjectsContentHint11 GetProjectsContentHint11 = GetProjectsContentHint11{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint11, "", true, true); err == nil { + u.GetProjectsContentHint11 = &getProjectsContentHint11 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint11 + return nil + } + + var getProjectsContentHint12 GetProjectsContentHint12 = GetProjectsContentHint12{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint12, "", true, true); err == nil { + u.GetProjectsContentHint12 = &getProjectsContentHint12 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint12 + return nil + } + + var getProjectsContentHint13 GetProjectsContentHint13 = GetProjectsContentHint13{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint13, "", true, true); err == nil { + u.GetProjectsContentHint13 = &getProjectsContentHint13 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint13 + return nil + } + + var getProjectsContentHint15 GetProjectsContentHint15 = GetProjectsContentHint15{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint15, "", true, true); err == nil { + u.GetProjectsContentHint15 = &getProjectsContentHint15 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint15 + return nil + } + + var getProjectsContentHint14 GetProjectsContentHint14 = GetProjectsContentHint14{} + if err := utils.UnmarshalJSON(data, &getProjectsContentHint14, "", true, true); err == nil { + u.GetProjectsContentHint14 = &getProjectsContentHint14 + u.Type = GetProjectsContentHintUnionTypeGetProjectsContentHint14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsContentHint", string(data)) +} + +func (u GetProjectsContentHint) MarshalJSON() ([]byte, error) { + if u.GetProjectsContentHint1 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint1, "", true) + } + + if u.GetProjectsContentHint2 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint2, "", true) + } + + if u.GetProjectsContentHint3 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint3, "", true) + } + + if u.GetProjectsContentHint4 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint4, "", true) + } + + if u.GetProjectsContentHint5 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint5, "", true) + } + + if u.GetProjectsContentHint6 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint6, "", true) + } + + if u.GetProjectsContentHint7 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint7, "", true) + } + + if u.GetProjectsContentHint8 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint8, "", true) + } + + if u.GetProjectsContentHint9 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint9, "", true) + } + + if u.GetProjectsContentHint10 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint10, "", true) + } + + if u.GetProjectsContentHint11 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint11, "", true) + } + + if u.GetProjectsContentHint12 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint12, "", true) + } + + if u.GetProjectsContentHint13 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint13, "", true) + } + + if u.GetProjectsContentHint14 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint14, "", true) + } + + if u.GetProjectsContentHint15 != nil { + return utils.MarshalJSON(u.GetProjectsContentHint15, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsContentHint: all fields are null") +} + +type GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType string + +const ( + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsTypeFlagsSecret GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType = "flags-secret" +) + +func (e GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType) ToPointer() *GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType { + return &e +} +func (e *GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType: %v", v) + } +} + +// GetProjectsInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type GetProjectsInternalContentHint struct { + Type GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *GetProjectsInternalContentHint) GetType() GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType { + if o == nil { + return GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsType("") + } + return o.Type +} + +func (o *GetProjectsInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type GetProjectsEnv struct { + Target *GetProjectsTarget `json:"target,omitempty"` + Type GetProjectsType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *GetProjectsContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *GetProjectsInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *GetProjectsEnv) GetTarget() *GetProjectsTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetProjectsEnv) GetType() GetProjectsType { + if o == nil { + return GetProjectsType("") + } + return o.Type +} + +func (o *GetProjectsEnv) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *GetProjectsEnv) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetProjectsEnv) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *GetProjectsEnv) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *GetProjectsEnv) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *GetProjectsEnv) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectsEnv) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectsEnv) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *GetProjectsEnv) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *GetProjectsEnv) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *GetProjectsEnv) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *GetProjectsEnv) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *GetProjectsEnv) GetContentHint() *GetProjectsContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *GetProjectsEnv) GetInternalContentHint() *GetProjectsInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *GetProjectsEnv) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *GetProjectsEnv) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *GetProjectsEnv) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *GetProjectsEnv) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type GetProjectsCustomEnvironments struct { +} + +type GetProjectsFramework string + +const ( + GetProjectsFrameworkBlitzjs GetProjectsFramework = "blitzjs" + GetProjectsFrameworkNextjs GetProjectsFramework = "nextjs" + GetProjectsFrameworkGatsby GetProjectsFramework = "gatsby" + GetProjectsFrameworkRemix GetProjectsFramework = "remix" + GetProjectsFrameworkAstro GetProjectsFramework = "astro" + GetProjectsFrameworkHexo GetProjectsFramework = "hexo" + GetProjectsFrameworkEleventy GetProjectsFramework = "eleventy" + GetProjectsFrameworkDocusaurus2 GetProjectsFramework = "docusaurus-2" + GetProjectsFrameworkDocusaurus GetProjectsFramework = "docusaurus" + GetProjectsFrameworkPreact GetProjectsFramework = "preact" + GetProjectsFrameworkSolidstart1 GetProjectsFramework = "solidstart-1" + GetProjectsFrameworkSolidstart GetProjectsFramework = "solidstart" + GetProjectsFrameworkDojo GetProjectsFramework = "dojo" + GetProjectsFrameworkEmber GetProjectsFramework = "ember" + GetProjectsFrameworkVue GetProjectsFramework = "vue" + GetProjectsFrameworkScully GetProjectsFramework = "scully" + GetProjectsFrameworkIonicAngular GetProjectsFramework = "ionic-angular" + GetProjectsFrameworkAngular GetProjectsFramework = "angular" + GetProjectsFrameworkPolymer GetProjectsFramework = "polymer" + GetProjectsFrameworkSvelte GetProjectsFramework = "svelte" + GetProjectsFrameworkSveltekit GetProjectsFramework = "sveltekit" + GetProjectsFrameworkSveltekit1 GetProjectsFramework = "sveltekit-1" + GetProjectsFrameworkIonicReact GetProjectsFramework = "ionic-react" + GetProjectsFrameworkCreateReactApp GetProjectsFramework = "create-react-app" + GetProjectsFrameworkGridsome GetProjectsFramework = "gridsome" + GetProjectsFrameworkUmijs GetProjectsFramework = "umijs" + GetProjectsFrameworkSapper GetProjectsFramework = "sapper" + GetProjectsFrameworkSaber GetProjectsFramework = "saber" + GetProjectsFrameworkStencil GetProjectsFramework = "stencil" + GetProjectsFrameworkNuxtjs GetProjectsFramework = "nuxtjs" + GetProjectsFrameworkRedwoodjs GetProjectsFramework = "redwoodjs" + GetProjectsFrameworkHugo GetProjectsFramework = "hugo" + GetProjectsFrameworkJekyll GetProjectsFramework = "jekyll" + GetProjectsFrameworkBrunch GetProjectsFramework = "brunch" + GetProjectsFrameworkMiddleman GetProjectsFramework = "middleman" + GetProjectsFrameworkZola GetProjectsFramework = "zola" + GetProjectsFrameworkHydrogen GetProjectsFramework = "hydrogen" + GetProjectsFrameworkVite GetProjectsFramework = "vite" + GetProjectsFrameworkVitepress GetProjectsFramework = "vitepress" + GetProjectsFrameworkVuepress GetProjectsFramework = "vuepress" + GetProjectsFrameworkParcel GetProjectsFramework = "parcel" + GetProjectsFrameworkFasthtml GetProjectsFramework = "fasthtml" + GetProjectsFrameworkSanityV3 GetProjectsFramework = "sanity-v3" + GetProjectsFrameworkSanity GetProjectsFramework = "sanity" + GetProjectsFrameworkStorybook GetProjectsFramework = "storybook" +) + +func (e GetProjectsFramework) ToPointer() *GetProjectsFramework { + return &e +} +func (e *GetProjectsFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = GetProjectsFramework(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsFramework: %v", v) + } +} + +type GetProjectsIPBuckets struct { + Bucket string `json:"bucket"` + SupportUntil *float64 `json:"supportUntil,omitempty"` +} + +func (o *GetProjectsIPBuckets) GetBucket() string { + if o == nil { + return "" + } + return o.Bucket +} + +func (o *GetProjectsIPBuckets) GetSupportUntil() *float64 { + if o == nil { + return nil + } + return o.SupportUntil +} + +type GetProjectsAliasAssignedType string + +const ( + GetProjectsAliasAssignedTypeNumber GetProjectsAliasAssignedType = "number" + GetProjectsAliasAssignedTypeBoolean GetProjectsAliasAssignedType = "boolean" +) + +type GetProjectsAliasAssigned struct { + Number *float64 + Boolean *bool + + Type GetProjectsAliasAssignedType +} + +func CreateGetProjectsAliasAssignedNumber(number float64) GetProjectsAliasAssigned { + typ := GetProjectsAliasAssignedTypeNumber + + return GetProjectsAliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateGetProjectsAliasAssignedBoolean(boolean bool) GetProjectsAliasAssigned { + typ := GetProjectsAliasAssignedTypeBoolean + + return GetProjectsAliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *GetProjectsAliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetProjectsAliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = GetProjectsAliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsAliasAssigned", string(data)) +} + +func (u GetProjectsAliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsAliasAssigned: all fields are null") +} + +type GetProjectsAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *GetProjectsAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *GetProjectsAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type GetProjectsProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + GetProjectsProjectsResponse200ApplicationJSONResponseBodyTypeEndsWith GetProjectsProjectsResponse200ApplicationJSONResponseBodyType = "endsWith" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyTypeStartsWith GetProjectsProjectsResponse200ApplicationJSONResponseBodyType = "startsWith" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyTypeEquals GetProjectsProjectsResponse200ApplicationJSONResponseBodyType = "equals" +) + +func (e GetProjectsProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *GetProjectsProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *GetProjectsProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "endsWith": + fallthrough + case "startsWith": + fallthrough + case "equals": + *e = GetProjectsProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type GetProjectsBranchMatcher struct { + Type GetProjectsProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + Pattern string `json:"pattern"` +} + +func (o *GetProjectsBranchMatcher) GetType() GetProjectsProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return GetProjectsProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *GetProjectsBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type GetProjectsBuilds struct { + Use string `json:"use"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` +} + +func (o *GetProjectsBuilds) GetUse() string { + if o == nil { + return "" + } + return o.Use +} + +func (o *GetProjectsBuilds) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *GetProjectsBuilds) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +type GetProjectsChecksConclusion string + +const ( + GetProjectsChecksConclusionSucceeded GetProjectsChecksConclusion = "succeeded" + GetProjectsChecksConclusionFailed GetProjectsChecksConclusion = "failed" + GetProjectsChecksConclusionSkipped GetProjectsChecksConclusion = "skipped" + GetProjectsChecksConclusionCanceled GetProjectsChecksConclusion = "canceled" +) + +func (e GetProjectsChecksConclusion) ToPointer() *GetProjectsChecksConclusion { + return &e +} +func (e *GetProjectsChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = GetProjectsChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsChecksConclusion: %v", v) + } +} + +type GetProjectsChecksState string + +const ( + GetProjectsChecksStateRegistered GetProjectsChecksState = "registered" + GetProjectsChecksStateRunning GetProjectsChecksState = "running" + GetProjectsChecksStateCompleted GetProjectsChecksState = "completed" +) + +func (e GetProjectsChecksState) ToPointer() *GetProjectsChecksState { + return &e +} +func (e *GetProjectsChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = GetProjectsChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsChecksState: %v", v) + } +} + +type GetProjectsCreator struct { + Email string `json:"email"` + GithubLogin *string `json:"githubLogin,omitempty"` + GitlabLogin *string `json:"gitlabLogin,omitempty"` + UID string `json:"uid"` + Username string `json:"username"` +} + +func (o *GetProjectsCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *GetProjectsCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *GetProjectsCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +func (o *GetProjectsCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *GetProjectsCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +type GetProjectsOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *GetProjectsOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *GetProjectsOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *GetProjectsOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *GetProjectsOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *GetProjectsOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *GetProjectsOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetProjectsOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *GetProjectsOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *GetProjectsOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type GetProjectsPlan string + +const ( + GetProjectsPlanPro GetProjectsPlan = "pro" + GetProjectsPlanEnterprise GetProjectsPlan = "enterprise" + GetProjectsPlanHobby GetProjectsPlan = "hobby" +) + +func (e GetProjectsPlan) ToPointer() *GetProjectsPlan { + return &e +} +func (e *GetProjectsPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = GetProjectsPlan(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsPlan: %v", v) + } +} + +type GetProjectsReadyState string + +const ( + GetProjectsReadyStateBuilding GetProjectsReadyState = "BUILDING" + GetProjectsReadyStateError GetProjectsReadyState = "ERROR" + GetProjectsReadyStateInitializing GetProjectsReadyState = "INITIALIZING" + GetProjectsReadyStateQueued GetProjectsReadyState = "QUEUED" + GetProjectsReadyStateReady GetProjectsReadyState = "READY" + GetProjectsReadyStateCanceled GetProjectsReadyState = "CANCELED" +) + +func (e GetProjectsReadyState) ToPointer() *GetProjectsReadyState { + return &e +} +func (e *GetProjectsReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = GetProjectsReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsReadyState: %v", v) + } +} + +type GetProjectsReadySubstate string + +const ( + GetProjectsReadySubstateStaged GetProjectsReadySubstate = "STAGED" + GetProjectsReadySubstatePromoted GetProjectsReadySubstate = "PROMOTED" +) + +func (e GetProjectsReadySubstate) ToPointer() *GetProjectsReadySubstate { + return &e +} +func (e *GetProjectsReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = GetProjectsReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsReadySubstate: %v", v) + } +} + +type GetProjectsProjectsType string + +const ( + GetProjectsProjectsTypeLambdas GetProjectsProjectsType = "LAMBDAS" +) + +func (e GetProjectsProjectsType) ToPointer() *GetProjectsProjectsType { + return &e +} +func (e *GetProjectsProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = GetProjectsProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsType: %v", v) + } +} + +type GetProjectsLatestDeployments struct { + ID string `json:"id"` + Alias []string `json:"alias,omitempty"` + AliasAssigned *GetProjectsAliasAssigned `json:"aliasAssigned,omitempty"` + AliasError *GetProjectsAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BranchMatcher *GetProjectsBranchMatcher `json:"branchMatcher,omitempty"` + BuildingAt *float64 `json:"buildingAt,omitempty"` + Builds []GetProjectsBuilds `json:"builds,omitempty"` + ChecksConclusion *GetProjectsChecksConclusion `json:"checksConclusion,omitempty"` + ChecksState *GetProjectsChecksState `json:"checksState,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedAt float64 `json:"createdAt"` + CreatedIn string `json:"createdIn"` + Creator *GetProjectsCreator `json:"creator"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + DeploymentHostname string `json:"deploymentHostname"` + Forced *bool `json:"forced,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OidcTokenClaims *GetProjectsOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + Plan GetProjectsPlan `json:"plan"` + // Whether or not preview comments are enabled for the deployment + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + Private bool `json:"private"` + ReadyAt *float64 `json:"readyAt,omitempty"` + ReadyState GetProjectsReadyState `json:"readyState"` + ReadySubstate *GetProjectsReadySubstate `json:"readySubstate,omitempty"` + RequestedAt *float64 `json:"requestedAt,omitempty"` + Target *string `json:"target,omitempty"` + TeamID *string `json:"teamId,omitempty"` + Type GetProjectsProjectsType `json:"type"` + URL string `json:"url"` + UserID string `json:"userId"` + WithCache *bool `json:"withCache,omitempty"` +} + +func (o *GetProjectsLatestDeployments) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsLatestDeployments) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *GetProjectsLatestDeployments) GetAliasAssigned() *GetProjectsAliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *GetProjectsLatestDeployments) GetAliasError() *GetProjectsAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *GetProjectsLatestDeployments) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *GetProjectsLatestDeployments) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *GetProjectsLatestDeployments) GetBranchMatcher() *GetProjectsBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *GetProjectsLatestDeployments) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *GetProjectsLatestDeployments) GetBuilds() []GetProjectsBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *GetProjectsLatestDeployments) GetChecksConclusion() *GetProjectsChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *GetProjectsLatestDeployments) GetChecksState() *GetProjectsChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *GetProjectsLatestDeployments) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *GetProjectsLatestDeployments) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *GetProjectsLatestDeployments) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetProjectsLatestDeployments) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *GetProjectsLatestDeployments) GetCreator() *GetProjectsCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *GetProjectsLatestDeployments) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetProjectsLatestDeployments) GetDeploymentHostname() string { + if o == nil { + return "" + } + return o.DeploymentHostname +} + +func (o *GetProjectsLatestDeployments) GetForced() *bool { + if o == nil { + return nil + } + return o.Forced +} + +func (o *GetProjectsLatestDeployments) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetProjectsLatestDeployments) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *GetProjectsLatestDeployments) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *GetProjectsLatestDeployments) GetOidcTokenClaims() *GetProjectsOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *GetProjectsLatestDeployments) GetPlan() GetProjectsPlan { + if o == nil { + return GetProjectsPlan("") + } + return o.Plan +} + +func (o *GetProjectsLatestDeployments) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *GetProjectsLatestDeployments) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *GetProjectsLatestDeployments) GetReadyAt() *float64 { + if o == nil { + return nil + } + return o.ReadyAt +} + +func (o *GetProjectsLatestDeployments) GetReadyState() GetProjectsReadyState { + if o == nil { + return GetProjectsReadyState("") + } + return o.ReadyState +} + +func (o *GetProjectsLatestDeployments) GetReadySubstate() *GetProjectsReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *GetProjectsLatestDeployments) GetRequestedAt() *float64 { + if o == nil { + return nil + } + return o.RequestedAt +} + +func (o *GetProjectsLatestDeployments) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetProjectsLatestDeployments) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetProjectsLatestDeployments) GetType() GetProjectsProjectsType { + if o == nil { + return GetProjectsProjectsType("") + } + return o.Type +} + +func (o *GetProjectsLatestDeployments) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetProjectsLatestDeployments) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *GetProjectsLatestDeployments) GetWithCache() *bool { + if o == nil { + return nil + } + return o.WithCache +} + +type GetProjectsLinkProjectsResponseType string + +const ( + GetProjectsLinkProjectsResponseTypeBitbucket GetProjectsLinkProjectsResponseType = "bitbucket" +) + +func (e GetProjectsLinkProjectsResponseType) ToPointer() *GetProjectsLinkProjectsResponseType { + return &e +} +func (e *GetProjectsLinkProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = GetProjectsLinkProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsLinkProjectsResponseType: %v", v) + } +} + +type GetProjectsLinkProjectsResponseDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *GetProjectsLinkProjectsResponseDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectsLinkProjectsResponseDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsLinkProjectsResponseDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetProjectsLinkProjectsResponseDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetProjectsLinkProjectsResponseDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type GetProjectsLink3 struct { + Name *string `json:"name,omitempty"` + Slug *string `json:"slug,omitempty"` + Owner *string `json:"owner,omitempty"` + Type *GetProjectsLinkProjectsResponseType `json:"type,omitempty"` + UUID *string `json:"uuid,omitempty"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []GetProjectsLinkProjectsResponseDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *GetProjectsLink3) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *GetProjectsLink3) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetProjectsLink3) GetOwner() *string { + if o == nil { + return nil + } + return o.Owner +} + +func (o *GetProjectsLink3) GetType() *GetProjectsLinkProjectsResponseType { + if o == nil { + return nil + } + return o.Type +} + +func (o *GetProjectsLink3) GetUUID() *string { + if o == nil { + return nil + } + return o.UUID +} + +func (o *GetProjectsLink3) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +func (o *GetProjectsLink3) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectsLink3) GetDeployHooks() []GetProjectsLinkProjectsResponseDeployHooks { + if o == nil { + return []GetProjectsLinkProjectsResponseDeployHooks{} + } + return o.DeployHooks +} + +func (o *GetProjectsLink3) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *GetProjectsLink3) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectsLink3) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *GetProjectsLink3) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type GetProjectsLinkProjectsType string + +const ( + GetProjectsLinkProjectsTypeGitlab GetProjectsLinkProjectsType = "gitlab" +) + +func (e GetProjectsLinkProjectsType) ToPointer() *GetProjectsLinkProjectsType { + return &e +} +func (e *GetProjectsLinkProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = GetProjectsLinkProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsLinkProjectsType: %v", v) + } +} + +type GetProjectsLinkProjectsDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *GetProjectsLinkProjectsDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectsLinkProjectsDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsLinkProjectsDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetProjectsLinkProjectsDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetProjectsLinkProjectsDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type GetProjectsLink2 struct { + ProjectID *string `json:"projectId,omitempty"` + ProjectName *string `json:"projectName,omitempty"` + ProjectNameWithNamespace *string `json:"projectNameWithNamespace,omitempty"` + ProjectNamespace *string `json:"projectNamespace,omitempty"` + // A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. This is the id of the top level group that a namespace belongs to. Gitlab supports group nesting (up to 20 levels). + ProjectOwnerID *float64 `json:"projectOwnerId,omitempty"` + ProjectURL *string `json:"projectUrl,omitempty"` + Type *GetProjectsLinkProjectsType `json:"type,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []GetProjectsLinkProjectsDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *GetProjectsLink2) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetProjectsLink2) GetProjectName() *string { + if o == nil { + return nil + } + return o.ProjectName +} + +func (o *GetProjectsLink2) GetProjectNameWithNamespace() *string { + if o == nil { + return nil + } + return o.ProjectNameWithNamespace +} + +func (o *GetProjectsLink2) GetProjectNamespace() *string { + if o == nil { + return nil + } + return o.ProjectNamespace +} + +func (o *GetProjectsLink2) GetProjectOwnerID() *float64 { + if o == nil { + return nil + } + return o.ProjectOwnerID +} + +func (o *GetProjectsLink2) GetProjectURL() *string { + if o == nil { + return nil + } + return o.ProjectURL +} + +func (o *GetProjectsLink2) GetType() *GetProjectsLinkProjectsType { + if o == nil { + return nil + } + return o.Type +} + +func (o *GetProjectsLink2) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectsLink2) GetDeployHooks() []GetProjectsLinkProjectsDeployHooks { + if o == nil { + return []GetProjectsLinkProjectsDeployHooks{} + } + return o.DeployHooks +} + +func (o *GetProjectsLink2) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *GetProjectsLink2) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectsLink2) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *GetProjectsLink2) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type GetProjectsLinkType string + +const ( + GetProjectsLinkTypeGithub GetProjectsLinkType = "github" +) + +func (e GetProjectsLinkType) ToPointer() *GetProjectsLinkType { + return &e +} +func (e *GetProjectsLinkType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = GetProjectsLinkType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsLinkType: %v", v) + } +} + +type GetProjectsLinkDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *GetProjectsLinkDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectsLinkDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsLinkDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetProjectsLinkDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *GetProjectsLinkDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type GetProjectsLink1 struct { + Org *string `json:"org,omitempty"` + // A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. + RepoOwnerID *float64 `json:"repoOwnerId,omitempty"` + Repo *string `json:"repo,omitempty"` + RepoID *float64 `json:"repoId,omitempty"` + Type *GetProjectsLinkType `json:"type,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []GetProjectsLinkDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *GetProjectsLink1) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} + +func (o *GetProjectsLink1) GetRepoOwnerID() *float64 { + if o == nil { + return nil + } + return o.RepoOwnerID +} + +func (o *GetProjectsLink1) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +func (o *GetProjectsLink1) GetRepoID() *float64 { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *GetProjectsLink1) GetType() *GetProjectsLinkType { + if o == nil { + return nil + } + return o.Type +} + +func (o *GetProjectsLink1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectsLink1) GetDeployHooks() []GetProjectsLinkDeployHooks { + if o == nil { + return []GetProjectsLinkDeployHooks{} + } + return o.DeployHooks +} + +func (o *GetProjectsLink1) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *GetProjectsLink1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectsLink1) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *GetProjectsLink1) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type GetProjectsLinkUnionType string + +const ( + GetProjectsLinkUnionTypeGetProjectsLink1 GetProjectsLinkUnionType = "getProjects_link_1" + GetProjectsLinkUnionTypeGetProjectsLink2 GetProjectsLinkUnionType = "getProjects_link_2" + GetProjectsLinkUnionTypeGetProjectsLink3 GetProjectsLinkUnionType = "getProjects_link_3" +) + +type GetProjectsLink struct { + GetProjectsLink1 *GetProjectsLink1 + GetProjectsLink2 *GetProjectsLink2 + GetProjectsLink3 *GetProjectsLink3 + + Type GetProjectsLinkUnionType +} + +func CreateGetProjectsLinkGetProjectsLink1(getProjectsLink1 GetProjectsLink1) GetProjectsLink { + typ := GetProjectsLinkUnionTypeGetProjectsLink1 + + return GetProjectsLink{ + GetProjectsLink1: &getProjectsLink1, + Type: typ, + } +} + +func CreateGetProjectsLinkGetProjectsLink2(getProjectsLink2 GetProjectsLink2) GetProjectsLink { + typ := GetProjectsLinkUnionTypeGetProjectsLink2 + + return GetProjectsLink{ + GetProjectsLink2: &getProjectsLink2, + Type: typ, + } +} + +func CreateGetProjectsLinkGetProjectsLink3(getProjectsLink3 GetProjectsLink3) GetProjectsLink { + typ := GetProjectsLinkUnionTypeGetProjectsLink3 + + return GetProjectsLink{ + GetProjectsLink3: &getProjectsLink3, + Type: typ, + } +} + +func (u *GetProjectsLink) UnmarshalJSON(data []byte) error { + + var getProjectsLink1 GetProjectsLink1 = GetProjectsLink1{} + if err := utils.UnmarshalJSON(data, &getProjectsLink1, "", true, true); err == nil { + u.GetProjectsLink1 = &getProjectsLink1 + u.Type = GetProjectsLinkUnionTypeGetProjectsLink1 + return nil + } + + var getProjectsLink3 GetProjectsLink3 = GetProjectsLink3{} + if err := utils.UnmarshalJSON(data, &getProjectsLink3, "", true, true); err == nil { + u.GetProjectsLink3 = &getProjectsLink3 + u.Type = GetProjectsLinkUnionTypeGetProjectsLink3 + return nil + } + + var getProjectsLink2 GetProjectsLink2 = GetProjectsLink2{} + if err := utils.UnmarshalJSON(data, &getProjectsLink2, "", true, true); err == nil { + u.GetProjectsLink2 = &getProjectsLink2 + u.Type = GetProjectsLinkUnionTypeGetProjectsLink2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsLink", string(data)) +} + +func (u GetProjectsLink) MarshalJSON() ([]byte, error) { + if u.GetProjectsLink1 != nil { + return utils.MarshalJSON(u.GetProjectsLink1, "", true) + } + + if u.GetProjectsLink2 != nil { + return utils.MarshalJSON(u.GetProjectsLink2, "", true) + } + + if u.GetProjectsLink3 != nil { + return utils.MarshalJSON(u.GetProjectsLink3, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsLink: all fields are null") +} + +type GetProjectsMicrofrontends struct { + // Timestamp when the microfrontends settings were last updated. + UpdatedAt float64 `json:"updatedAt"` + // The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` + // Whether microfrontends are enabled for this project. + Enabled bool `json:"enabled"` + // Whether this project is the default application for the microfrontends group. The default application is the one that is used as the top level shell for the microfrontends group and hosts the other microfrontends. + IsDefaultApp *bool `json:"isDefaultApp,omitempty"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` +} + +func (o *GetProjectsMicrofrontends) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetProjectsMicrofrontends) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +func (o *GetProjectsMicrofrontends) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *GetProjectsMicrofrontends) GetIsDefaultApp() *bool { + if o == nil { + return nil + } + return o.IsDefaultApp +} + +func (o *GetProjectsMicrofrontends) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +type GetProjectsNodeVersion string + +const ( + GetProjectsNodeVersionTwentyTwoX GetProjectsNodeVersion = "22.x" + GetProjectsNodeVersionTwentyX GetProjectsNodeVersion = "20.x" + GetProjectsNodeVersionEighteenX GetProjectsNodeVersion = "18.x" + GetProjectsNodeVersionSixteenX GetProjectsNodeVersion = "16.x" + GetProjectsNodeVersionFourteenX GetProjectsNodeVersion = "14.x" + GetProjectsNodeVersionTwelveX GetProjectsNodeVersion = "12.x" + GetProjectsNodeVersionTenX GetProjectsNodeVersion = "10.x" + GetProjectsNodeVersionEight10X GetProjectsNodeVersion = "8.10.x" +) + +func (e GetProjectsNodeVersion) ToPointer() *GetProjectsNodeVersion { + return &e +} +func (e *GetProjectsNodeVersion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "22.x": + fallthrough + case "20.x": + fallthrough + case "18.x": + fallthrough + case "16.x": + fallthrough + case "14.x": + fallthrough + case "12.x": + fallthrough + case "10.x": + fallthrough + case "8.10.x": + *e = GetProjectsNodeVersion(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsNodeVersion: %v", v) + } +} + +type GetProjectsPaths struct { + Value string `json:"value"` +} + +func (o *GetProjectsPaths) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type GetProjectsOptionsAllowlist struct { + Paths []GetProjectsPaths `json:"paths"` +} + +func (o *GetProjectsOptionsAllowlist) GetPaths() []GetProjectsPaths { + if o == nil { + return []GetProjectsPaths{} + } + return o.Paths +} + +type GetProjectsPasswordProtection struct { +} + +type GetProjectsFunctionDefaultMemoryType string + +const ( + GetProjectsFunctionDefaultMemoryTypeStandardLegacy GetProjectsFunctionDefaultMemoryType = "standard_legacy" + GetProjectsFunctionDefaultMemoryTypeStandard GetProjectsFunctionDefaultMemoryType = "standard" + GetProjectsFunctionDefaultMemoryTypePerformance GetProjectsFunctionDefaultMemoryType = "performance" +) + +func (e GetProjectsFunctionDefaultMemoryType) ToPointer() *GetProjectsFunctionDefaultMemoryType { + return &e +} +func (e *GetProjectsFunctionDefaultMemoryType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "standard_legacy": + fallthrough + case "standard": + fallthrough + case "performance": + *e = GetProjectsFunctionDefaultMemoryType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsFunctionDefaultMemoryType: %v", v) + } +} + +type GetProjectsResourceConfig struct { + FunctionDefaultRegion *string `json:"functionDefaultRegion,omitempty"` + FunctionDefaultTimeout *float64 `json:"functionDefaultTimeout,omitempty"` + FunctionDefaultMemoryType *GetProjectsFunctionDefaultMemoryType `json:"functionDefaultMemoryType,omitempty"` + FunctionZeroConfigFailover *bool `json:"functionZeroConfigFailover,omitempty"` + AllowServerlessConcurrency *bool `json:"allowServerlessConcurrency,omitempty"` + ElasticConcurrencyEnabled *bool `json:"elasticConcurrencyEnabled,omitempty"` +} + +func (o *GetProjectsResourceConfig) GetFunctionDefaultRegion() *string { + if o == nil { + return nil + } + return o.FunctionDefaultRegion +} + +func (o *GetProjectsResourceConfig) GetFunctionDefaultTimeout() *float64 { + if o == nil { + return nil + } + return o.FunctionDefaultTimeout +} + +func (o *GetProjectsResourceConfig) GetFunctionDefaultMemoryType() *GetProjectsFunctionDefaultMemoryType { + if o == nil { + return nil + } + return o.FunctionDefaultMemoryType +} + +func (o *GetProjectsResourceConfig) GetFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.FunctionZeroConfigFailover +} + +func (o *GetProjectsResourceConfig) GetAllowServerlessConcurrency() *bool { + if o == nil { + return nil + } + return o.AllowServerlessConcurrency +} + +func (o *GetProjectsResourceConfig) GetElasticConcurrencyEnabled() *bool { + if o == nil { + return nil + } + return o.ElasticConcurrencyEnabled +} + +type GetProjectsDeploymentType string + +const ( + GetProjectsDeploymentTypePreview GetProjectsDeploymentType = "preview" + GetProjectsDeploymentTypeAll GetProjectsDeploymentType = "all" + GetProjectsDeploymentTypeProdDeploymentUrlsAndAllPreviews GetProjectsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e GetProjectsDeploymentType) ToPointer() *GetProjectsDeploymentType { + return &e +} +func (e *GetProjectsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = GetProjectsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsDeploymentType: %v", v) + } +} + +type GetProjectsSsoProtection struct { + DeploymentType GetProjectsDeploymentType `json:"deploymentType"` +} + +func (o *GetProjectsSsoProtection) GetDeploymentType() GetProjectsDeploymentType { + if o == nil { + return GetProjectsDeploymentType("") + } + return o.DeploymentType +} + +type GetProjectsProjectsAliasAssignedType string + +const ( + GetProjectsProjectsAliasAssignedTypeNumber GetProjectsProjectsAliasAssignedType = "number" + GetProjectsProjectsAliasAssignedTypeBoolean GetProjectsProjectsAliasAssignedType = "boolean" +) + +type GetProjectsProjectsAliasAssigned struct { + Number *float64 + Boolean *bool + + Type GetProjectsProjectsAliasAssignedType +} + +func CreateGetProjectsProjectsAliasAssignedNumber(number float64) GetProjectsProjectsAliasAssigned { + typ := GetProjectsProjectsAliasAssignedTypeNumber + + return GetProjectsProjectsAliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateGetProjectsProjectsAliasAssignedBoolean(boolean bool) GetProjectsProjectsAliasAssigned { + typ := GetProjectsProjectsAliasAssignedTypeBoolean + + return GetProjectsProjectsAliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *GetProjectsProjectsAliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetProjectsProjectsAliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = GetProjectsProjectsAliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsProjectsAliasAssigned", string(data)) +} + +func (u GetProjectsProjectsAliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsProjectsAliasAssigned: all fields are null") +} + +type GetProjectsProjectsAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *GetProjectsProjectsAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *GetProjectsProjectsAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type GetProjectsProjectsResponse200ApplicationJSONType string + +const ( + GetProjectsProjectsResponse200ApplicationJSONTypeEndsWith GetProjectsProjectsResponse200ApplicationJSONType = "endsWith" + GetProjectsProjectsResponse200ApplicationJSONTypeStartsWith GetProjectsProjectsResponse200ApplicationJSONType = "startsWith" + GetProjectsProjectsResponse200ApplicationJSONTypeEquals GetProjectsProjectsResponse200ApplicationJSONType = "equals" +) + +func (e GetProjectsProjectsResponse200ApplicationJSONType) ToPointer() *GetProjectsProjectsResponse200ApplicationJSONType { + return &e +} +func (e *GetProjectsProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "endsWith": + fallthrough + case "startsWith": + fallthrough + case "equals": + *e = GetProjectsProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type GetProjectsProjectsBranchMatcher struct { + Type GetProjectsProjectsResponse200ApplicationJSONType `json:"type"` + Pattern string `json:"pattern"` +} + +func (o *GetProjectsProjectsBranchMatcher) GetType() GetProjectsProjectsResponse200ApplicationJSONType { + if o == nil { + return GetProjectsProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *GetProjectsProjectsBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type GetProjectsProjectsBuilds struct { + Use string `json:"use"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` +} + +func (o *GetProjectsProjectsBuilds) GetUse() string { + if o == nil { + return "" + } + return o.Use +} + +func (o *GetProjectsProjectsBuilds) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *GetProjectsProjectsBuilds) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +type GetProjectsProjectsChecksConclusion string + +const ( + GetProjectsProjectsChecksConclusionSucceeded GetProjectsProjectsChecksConclusion = "succeeded" + GetProjectsProjectsChecksConclusionFailed GetProjectsProjectsChecksConclusion = "failed" + GetProjectsProjectsChecksConclusionSkipped GetProjectsProjectsChecksConclusion = "skipped" + GetProjectsProjectsChecksConclusionCanceled GetProjectsProjectsChecksConclusion = "canceled" +) + +func (e GetProjectsProjectsChecksConclusion) ToPointer() *GetProjectsProjectsChecksConclusion { + return &e +} +func (e *GetProjectsProjectsChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = GetProjectsProjectsChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsChecksConclusion: %v", v) + } +} + +type GetProjectsProjectsChecksState string + +const ( + GetProjectsProjectsChecksStateRegistered GetProjectsProjectsChecksState = "registered" + GetProjectsProjectsChecksStateRunning GetProjectsProjectsChecksState = "running" + GetProjectsProjectsChecksStateCompleted GetProjectsProjectsChecksState = "completed" +) + +func (e GetProjectsProjectsChecksState) ToPointer() *GetProjectsProjectsChecksState { + return &e +} +func (e *GetProjectsProjectsChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = GetProjectsProjectsChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsChecksState: %v", v) + } +} + +type GetProjectsProjectsCreator struct { + Email string `json:"email"` + GithubLogin *string `json:"githubLogin,omitempty"` + GitlabLogin *string `json:"gitlabLogin,omitempty"` + UID string `json:"uid"` + Username string `json:"username"` +} + +func (o *GetProjectsProjectsCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *GetProjectsProjectsCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *GetProjectsProjectsCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +func (o *GetProjectsProjectsCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *GetProjectsProjectsCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +type GetProjectsProjectsOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *GetProjectsProjectsOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type GetProjectsProjectsPlan string + +const ( + GetProjectsProjectsPlanPro GetProjectsProjectsPlan = "pro" + GetProjectsProjectsPlanEnterprise GetProjectsProjectsPlan = "enterprise" + GetProjectsProjectsPlanHobby GetProjectsProjectsPlan = "hobby" +) + +func (e GetProjectsProjectsPlan) ToPointer() *GetProjectsProjectsPlan { + return &e +} +func (e *GetProjectsProjectsPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = GetProjectsProjectsPlan(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsPlan: %v", v) + } +} + +type GetProjectsProjectsReadyState string + +const ( + GetProjectsProjectsReadyStateBuilding GetProjectsProjectsReadyState = "BUILDING" + GetProjectsProjectsReadyStateError GetProjectsProjectsReadyState = "ERROR" + GetProjectsProjectsReadyStateInitializing GetProjectsProjectsReadyState = "INITIALIZING" + GetProjectsProjectsReadyStateQueued GetProjectsProjectsReadyState = "QUEUED" + GetProjectsProjectsReadyStateReady GetProjectsProjectsReadyState = "READY" + GetProjectsProjectsReadyStateCanceled GetProjectsProjectsReadyState = "CANCELED" +) + +func (e GetProjectsProjectsReadyState) ToPointer() *GetProjectsProjectsReadyState { + return &e +} +func (e *GetProjectsProjectsReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = GetProjectsProjectsReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsReadyState: %v", v) + } +} + +type GetProjectsProjectsReadySubstate string + +const ( + GetProjectsProjectsReadySubstateStaged GetProjectsProjectsReadySubstate = "STAGED" + GetProjectsProjectsReadySubstatePromoted GetProjectsProjectsReadySubstate = "PROMOTED" +) + +func (e GetProjectsProjectsReadySubstate) ToPointer() *GetProjectsProjectsReadySubstate { + return &e +} +func (e *GetProjectsProjectsReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = GetProjectsProjectsReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsReadySubstate: %v", v) + } +} + +type GetProjectsProjectsResponseType string + +const ( + GetProjectsProjectsResponseTypeLambdas GetProjectsProjectsResponseType = "LAMBDAS" +) + +func (e GetProjectsProjectsResponseType) ToPointer() *GetProjectsProjectsResponseType { + return &e +} +func (e *GetProjectsProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = GetProjectsProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsResponseType: %v", v) + } +} + +type GetProjectsTargets struct { + ID string `json:"id"` + Alias []string `json:"alias,omitempty"` + AliasAssigned *GetProjectsProjectsAliasAssigned `json:"aliasAssigned,omitempty"` + AliasError *GetProjectsProjectsAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BranchMatcher *GetProjectsProjectsBranchMatcher `json:"branchMatcher,omitempty"` + BuildingAt *float64 `json:"buildingAt,omitempty"` + Builds []GetProjectsProjectsBuilds `json:"builds,omitempty"` + ChecksConclusion *GetProjectsProjectsChecksConclusion `json:"checksConclusion,omitempty"` + ChecksState *GetProjectsProjectsChecksState `json:"checksState,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedAt float64 `json:"createdAt"` + CreatedIn string `json:"createdIn"` + Creator *GetProjectsProjectsCreator `json:"creator"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + DeploymentHostname string `json:"deploymentHostname"` + Forced *bool `json:"forced,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OidcTokenClaims *GetProjectsProjectsOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + Plan GetProjectsProjectsPlan `json:"plan"` + // Whether or not preview comments are enabled for the deployment + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + Private bool `json:"private"` + ReadyAt *float64 `json:"readyAt,omitempty"` + ReadyState GetProjectsProjectsReadyState `json:"readyState"` + ReadySubstate *GetProjectsProjectsReadySubstate `json:"readySubstate,omitempty"` + RequestedAt *float64 `json:"requestedAt,omitempty"` + Target *string `json:"target,omitempty"` + TeamID *string `json:"teamId,omitempty"` + Type GetProjectsProjectsResponseType `json:"type"` + URL string `json:"url"` + UserID string `json:"userId"` + WithCache *bool `json:"withCache,omitempty"` +} + +func (o *GetProjectsTargets) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsTargets) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *GetProjectsTargets) GetAliasAssigned() *GetProjectsProjectsAliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *GetProjectsTargets) GetAliasError() *GetProjectsProjectsAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *GetProjectsTargets) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *GetProjectsTargets) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *GetProjectsTargets) GetBranchMatcher() *GetProjectsProjectsBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *GetProjectsTargets) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *GetProjectsTargets) GetBuilds() []GetProjectsProjectsBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *GetProjectsTargets) GetChecksConclusion() *GetProjectsProjectsChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *GetProjectsTargets) GetChecksState() *GetProjectsProjectsChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *GetProjectsTargets) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *GetProjectsTargets) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *GetProjectsTargets) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetProjectsTargets) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *GetProjectsTargets) GetCreator() *GetProjectsProjectsCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *GetProjectsTargets) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *GetProjectsTargets) GetDeploymentHostname() string { + if o == nil { + return "" + } + return o.DeploymentHostname +} + +func (o *GetProjectsTargets) GetForced() *bool { + if o == nil { + return nil + } + return o.Forced +} + +func (o *GetProjectsTargets) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetProjectsTargets) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *GetProjectsTargets) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *GetProjectsTargets) GetOidcTokenClaims() *GetProjectsProjectsOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *GetProjectsTargets) GetPlan() GetProjectsProjectsPlan { + if o == nil { + return GetProjectsProjectsPlan("") + } + return o.Plan +} + +func (o *GetProjectsTargets) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *GetProjectsTargets) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *GetProjectsTargets) GetReadyAt() *float64 { + if o == nil { + return nil + } + return o.ReadyAt +} + +func (o *GetProjectsTargets) GetReadyState() GetProjectsProjectsReadyState { + if o == nil { + return GetProjectsProjectsReadyState("") + } + return o.ReadyState +} + +func (o *GetProjectsTargets) GetReadySubstate() *GetProjectsProjectsReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *GetProjectsTargets) GetRequestedAt() *float64 { + if o == nil { + return nil + } + return o.RequestedAt +} + +func (o *GetProjectsTargets) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *GetProjectsTargets) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetProjectsTargets) GetType() GetProjectsProjectsResponseType { + if o == nil { + return GetProjectsProjectsResponseType("") + } + return o.Type +} + +func (o *GetProjectsTargets) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetProjectsTargets) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *GetProjectsTargets) GetWithCache() *bool { + if o == nil { + return nil + } + return o.WithCache +} + +type GetProjectsPermissions struct { + AccessGroup []components.ACLAction `json:"accessGroup,omitempty"` + AliasGlobal []components.ACLAction `json:"aliasGlobal,omitempty"` + AnalyticsSampling []components.ACLAction `json:"analyticsSampling,omitempty"` + AnalyticsUsage []components.ACLAction `json:"analyticsUsage,omitempty"` + AuditLog []components.ACLAction `json:"auditLog,omitempty"` + BillingAddress []components.ACLAction `json:"billingAddress,omitempty"` + BillingInformation []components.ACLAction `json:"billingInformation,omitempty"` + BillingInvoice []components.ACLAction `json:"billingInvoice,omitempty"` + BillingInvoiceEmailRecipient []components.ACLAction `json:"billingInvoiceEmailRecipient,omitempty"` + BillingInvoiceLanguage []components.ACLAction `json:"billingInvoiceLanguage,omitempty"` + BillingPlan []components.ACLAction `json:"billingPlan,omitempty"` + BillingPurchaseOrder []components.ACLAction `json:"billingPurchaseOrder,omitempty"` + BillingTaxID []components.ACLAction `json:"billingTaxId,omitempty"` + Blob []components.ACLAction `json:"blob,omitempty"` + Budget []components.ACLAction `json:"budget,omitempty"` + CacheArtifact []components.ACLAction `json:"cacheArtifact,omitempty"` + CacheArtifactUsageEvent []components.ACLAction `json:"cacheArtifactUsageEvent,omitempty"` + CodeChecks []components.ACLAction `json:"codeChecks,omitempty"` + ConcurrentBuilds []components.ACLAction `json:"concurrentBuilds,omitempty"` + Connect []components.ACLAction `json:"connect,omitempty"` + ConnectConfiguration []components.ACLAction `json:"connectConfiguration,omitempty"` + Domain []components.ACLAction `json:"domain,omitempty"` + DomainAcceptDelegation []components.ACLAction `json:"domainAcceptDelegation,omitempty"` + DomainAuthCodes []components.ACLAction `json:"domainAuthCodes,omitempty"` + DomainCertificate []components.ACLAction `json:"domainCertificate,omitempty"` + DomainCheckConfig []components.ACLAction `json:"domainCheckConfig,omitempty"` + DomainMove []components.ACLAction `json:"domainMove,omitempty"` + DomainPurchase []components.ACLAction `json:"domainPurchase,omitempty"` + DomainRecord []components.ACLAction `json:"domainRecord,omitempty"` + DomainTransferIn []components.ACLAction `json:"domainTransferIn,omitempty"` + Event []components.ACLAction `json:"event,omitempty"` + OwnEvent []components.ACLAction `json:"ownEvent,omitempty"` + SensitiveEnvironmentVariablePolicy []components.ACLAction `json:"sensitiveEnvironmentVariablePolicy,omitempty"` + FileUpload []components.ACLAction `json:"fileUpload,omitempty"` + GitRepository []components.ACLAction `json:"gitRepository,omitempty"` + IPBlocking []components.ACLAction `json:"ipBlocking,omitempty"` + Integration []components.ACLAction `json:"integration,omitempty"` + IntegrationAccount []components.ACLAction `json:"integrationAccount,omitempty"` + IntegrationConfiguration []components.ACLAction `json:"integrationConfiguration,omitempty"` + IntegrationConfigurationTransfer []components.ACLAction `json:"integrationConfigurationTransfer,omitempty"` + IntegrationConfigurationProjects []components.ACLAction `json:"integrationConfigurationProjects,omitempty"` + IntegrationVercelConfigurationOverride []components.ACLAction `json:"integrationVercelConfigurationOverride,omitempty"` + IntegrationConfigurationRole []components.ACLAction `json:"integrationConfigurationRole,omitempty"` + IntegrationResource []components.ACLAction `json:"integrationResource,omitempty"` + IntegrationEvent []components.ACLAction `json:"integrationEvent,omitempty"` + IntegrationResourceSecrets []components.ACLAction `json:"integrationResourceSecrets,omitempty"` + IntegrationDeploymentAction []components.ACLAction `json:"integrationDeploymentAction,omitempty"` + MarketplaceInstallationMember []components.ACLAction `json:"marketplaceInstallationMember,omitempty"` + MarketplaceBillingData []components.ACLAction `json:"marketplaceBillingData,omitempty"` + MarketplaceInvoice []components.ACLAction `json:"marketplaceInvoice,omitempty"` + JobGlobal []components.ACLAction `json:"jobGlobal,omitempty"` + LogDrain []components.ACLAction `json:"logDrain,omitempty"` + Monitoring []components.ACLAction `json:"Monitoring,omitempty"` + MonitoringSettings []components.ACLAction `json:"monitoringSettings,omitempty"` + MonitoringQuery []components.ACLAction `json:"monitoringQuery,omitempty"` + MonitoringChart []components.ACLAction `json:"monitoringChart,omitempty"` + MonitoringAlert []components.ACLAction `json:"monitoringAlert,omitempty"` + NotificationDeploymentFailed []components.ACLAction `json:"notificationDeploymentFailed,omitempty"` + NotificationDomainConfiguration []components.ACLAction `json:"notificationDomainConfiguration,omitempty"` + NotificationDomainExpire []components.ACLAction `json:"notificationDomainExpire,omitempty"` + NotificationDomainMoved []components.ACLAction `json:"notificationDomainMoved,omitempty"` + NotificationDomainPurchase []components.ACLAction `json:"notificationDomainPurchase,omitempty"` + NotificationDomainRenewal []components.ACLAction `json:"notificationDomainRenewal,omitempty"` + NotificationDomainTransfer []components.ACLAction `json:"notificationDomainTransfer,omitempty"` + NotificationDomainUnverified []components.ACLAction `json:"notificationDomainUnverified,omitempty"` + NotificationMonitoringAlert []components.ACLAction `json:"NotificationMonitoringAlert,omitempty"` + NotificationPaymentFailed []components.ACLAction `json:"notificationPaymentFailed,omitempty"` + NotificationUsageAlert []components.ACLAction `json:"notificationUsageAlert,omitempty"` + NotificationCustomerBudget []components.ACLAction `json:"notificationCustomerBudget,omitempty"` + NotificationStatementOfReasons []components.ACLAction `json:"notificationStatementOfReasons,omitempty"` + Oauth2Connection []components.ACLAction `json:"oauth2Connection,omitempty"` + ObservabilityConfiguration []components.ACLAction `json:"observabilityConfiguration,omitempty"` + OpenTelemetryEndpoint []components.ACLAction `json:"openTelemetryEndpoint,omitempty"` + PaymentMethod []components.ACLAction `json:"paymentMethod,omitempty"` + Permissions []components.ACLAction `json:"permissions,omitempty"` + Postgres []components.ACLAction `json:"postgres,omitempty"` + PreviewDeploymentSuffix []components.ACLAction `json:"previewDeploymentSuffix,omitempty"` + ProTrialOnboarding []components.ACLAction `json:"proTrialOnboarding,omitempty"` + SharedEnvVars []components.ACLAction `json:"sharedEnvVars,omitempty"` + SharedEnvVarsProduction []components.ACLAction `json:"sharedEnvVarsProduction,omitempty"` + Space []components.ACLAction `json:"space,omitempty"` + SpaceRun []components.ACLAction `json:"spaceRun,omitempty"` + PasswordProtectionInvoiceItem []components.ACLAction `json:"passwordProtectionInvoiceItem,omitempty"` + RateLimit []components.ACLAction `json:"rateLimit,omitempty"` + Redis []components.ACLAction `json:"redis,omitempty"` + Repository []components.ACLAction `json:"repository,omitempty"` + RemoteCaching []components.ACLAction `json:"remoteCaching,omitempty"` + SamlConfig []components.ACLAction `json:"samlConfig,omitempty"` + Secret []components.ACLAction `json:"secret,omitempty"` + RedisStoreTokenSet []components.ACLAction `json:"redisStoreTokenSet,omitempty"` + BlobStoreTokenSet []components.ACLAction `json:"blobStoreTokenSet,omitempty"` + PostgresStoreTokenSet []components.ACLAction `json:"postgresStoreTokenSet,omitempty"` + IntegrationStoreTokenSet []components.ACLAction `json:"integrationStoreTokenSet,omitempty"` + IntegrationResourceReplCommand []components.ACLAction `json:"integrationResourceReplCommand,omitempty"` + StoreTransfer []components.ACLAction `json:"storeTransfer,omitempty"` + SupportCase []components.ACLAction `json:"supportCase,omitempty"` + SupportCaseComment []components.ACLAction `json:"supportCaseComment,omitempty"` + DataCacheBillingSettings []components.ACLAction `json:"dataCacheBillingSettings,omitempty"` + Team []components.ACLAction `json:"team,omitempty"` + TeamAccessRequest []components.ACLAction `json:"teamAccessRequest,omitempty"` + TeamFellowMembership []components.ACLAction `json:"teamFellowMembership,omitempty"` + TeamGitExclusivity []components.ACLAction `json:"teamGitExclusivity,omitempty"` + TeamInvite []components.ACLAction `json:"teamInvite,omitempty"` + TeamInviteCode []components.ACLAction `json:"teamInviteCode,omitempty"` + TeamJoin []components.ACLAction `json:"teamJoin,omitempty"` + TeamMicrofrontends []components.ACLAction `json:"teamMicrofrontends,omitempty"` + TeamOwnMembership []components.ACLAction `json:"teamOwnMembership,omitempty"` + TeamOwnMembershipDisconnectSAML []components.ACLAction `json:"teamOwnMembershipDisconnectSAML,omitempty"` + Token []components.ACLAction `json:"token,omitempty"` + Usage []components.ACLAction `json:"usage,omitempty"` + UsageCycle []components.ACLAction `json:"usageCycle,omitempty"` + User []components.ACLAction `json:"user,omitempty"` + UserConnection []components.ACLAction `json:"userConnection,omitempty"` + VpcPeeringConnection []components.ACLAction `json:"vpcPeeringConnection,omitempty"` + WebAnalyticsPlan []components.ACLAction `json:"webAnalyticsPlan,omitempty"` + WebAuthn []components.ACLAction `json:"webAuthn,omitempty"` + EdgeConfig []components.ACLAction `json:"edgeConfig,omitempty"` + EdgeConfigItem []components.ACLAction `json:"edgeConfigItem,omitempty"` + EdgeConfigSchema []components.ACLAction `json:"edgeConfigSchema,omitempty"` + EdgeConfigToken []components.ACLAction `json:"edgeConfigToken,omitempty"` + Webhook []components.ACLAction `json:"webhook,omitempty"` + WebhookEvent []components.ACLAction `json:"webhook-event,omitempty"` + EndpointVerification []components.ACLAction `json:"endpointVerification,omitempty"` + ProjectTransferIn []components.ACLAction `json:"projectTransferIn,omitempty"` + Oauth2Application []components.ACLAction `json:"oauth2Application,omitempty"` + AliasProject []components.ACLAction `json:"aliasProject,omitempty"` + AliasProtectionBypass []components.ACLAction `json:"aliasProtectionBypass,omitempty"` + ProductionAliasProtectionBypass []components.ACLAction `json:"productionAliasProtectionBypass,omitempty"` + ConnectConfigurationLink []components.ACLAction `json:"connectConfigurationLink,omitempty"` + DataCacheNamespace []components.ACLAction `json:"dataCacheNamespace,omitempty"` + Deployment []components.ACLAction `json:"deployment,omitempty"` + DeploymentCheck []components.ACLAction `json:"deploymentCheck,omitempty"` + DeploymentCheckPreview []components.ACLAction `json:"deploymentCheckPreview,omitempty"` + DeploymentCheckReRunFromProductionBranch []components.ACLAction `json:"deploymentCheckReRunFromProductionBranch,omitempty"` + DeploymentProductionGit []components.ACLAction `json:"deploymentProductionGit,omitempty"` + DeploymentV0 []components.ACLAction `json:"deploymentV0,omitempty"` + DeploymentPreview []components.ACLAction `json:"deploymentPreview,omitempty"` + DeploymentPrivate []components.ACLAction `json:"deploymentPrivate,omitempty"` + DeploymentPromote []components.ACLAction `json:"deploymentPromote,omitempty"` + DeploymentRollback []components.ACLAction `json:"deploymentRollback,omitempty"` + Environments []components.ACLAction `json:"environments,omitempty"` + Logs []components.ACLAction `json:"logs,omitempty"` + LogsPreset []components.ACLAction `json:"logsPreset,omitempty"` + PasswordProtection []components.ACLAction `json:"passwordProtection,omitempty"` + OptionsAllowlist []components.ACLAction `json:"optionsAllowlist,omitempty"` + Job []components.ACLAction `json:"job,omitempty"` + ObservabilityData []components.ACLAction `json:"observabilityData,omitempty"` + Project []components.ACLAction `json:"project,omitempty"` + ProjectFromV0 []components.ACLAction `json:"projectFromV0,omitempty"` + ProjectAccessGroup []components.ACLAction `json:"projectAccessGroup,omitempty"` + ProjectAnalyticsSampling []components.ACLAction `json:"projectAnalyticsSampling,omitempty"` + ProjectDeploymentHook []components.ACLAction `json:"projectDeploymentHook,omitempty"` + ProjectDomain []components.ACLAction `json:"projectDomain,omitempty"` + ProjectDomainMove []components.ACLAction `json:"projectDomainMove,omitempty"` + ProjectDomainCheckConfig []components.ACLAction `json:"projectDomainCheckConfig,omitempty"` + ProjectEnvVars []components.ACLAction `json:"projectEnvVars,omitempty"` + ProjectEnvVarsProduction []components.ACLAction `json:"projectEnvVarsProduction,omitempty"` + ProjectEnvVarsUnownedByIntegration []components.ACLAction `json:"projectEnvVarsUnownedByIntegration,omitempty"` + ProjectFlags []components.ACLAction `json:"projectFlags,omitempty"` + ProjectID []components.ACLAction `json:"projectId,omitempty"` + ProjectIntegrationConfiguration []components.ACLAction `json:"projectIntegrationConfiguration,omitempty"` + ProjectLink []components.ACLAction `json:"projectLink,omitempty"` + ProjectMember []components.ACLAction `json:"projectMember,omitempty"` + ProjectMonitoring []components.ACLAction `json:"projectMonitoring,omitempty"` + ProjectPermissions []components.ACLAction `json:"projectPermissions,omitempty"` + ProjectProductionBranch []components.ACLAction `json:"projectProductionBranch,omitempty"` + ProjectTransfer []components.ACLAction `json:"projectTransfer,omitempty"` + ProjectTransferOut []components.ACLAction `json:"projectTransferOut,omitempty"` + ProjectProtectionBypass []components.ACLAction `json:"projectProtectionBypass,omitempty"` + ProjectUsage []components.ACLAction `json:"projectUsage,omitempty"` + ProjectAnalyticsUsage []components.ACLAction `json:"projectAnalyticsUsage,omitempty"` + ProjectSupportCase []components.ACLAction `json:"projectSupportCase,omitempty"` + ProjectSupportCaseComment []components.ACLAction `json:"projectSupportCaseComment,omitempty"` + ProjectDeploymentExpiration []components.ACLAction `json:"projectDeploymentExpiration,omitempty"` + ProjectTier []components.ACLAction `json:"projectTier,omitempty"` + SeawallConfig []components.ACLAction `json:"seawallConfig,omitempty"` + SkewProtection []components.ACLAction `json:"skewProtection,omitempty"` + Analytics []components.ACLAction `json:"analytics,omitempty"` + TrustedIps []components.ACLAction `json:"trustedIps,omitempty"` + WebAnalytics []components.ACLAction `json:"webAnalytics,omitempty"` + SharedEnvVarConnection []components.ACLAction `json:"sharedEnvVarConnection,omitempty"` + Sonar []components.ACLAction `json:"sonar,omitempty"` +} + +func (o *GetProjectsPermissions) GetAccessGroup() []components.ACLAction { + if o == nil { + return nil + } + return o.AccessGroup +} + +func (o *GetProjectsPermissions) GetAliasGlobal() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasGlobal +} + +func (o *GetProjectsPermissions) GetAnalyticsSampling() []components.ACLAction { + if o == nil { + return nil + } + return o.AnalyticsSampling +} + +func (o *GetProjectsPermissions) GetAnalyticsUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.AnalyticsUsage +} + +func (o *GetProjectsPermissions) GetAuditLog() []components.ACLAction { + if o == nil { + return nil + } + return o.AuditLog +} + +func (o *GetProjectsPermissions) GetBillingAddress() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingAddress +} + +func (o *GetProjectsPermissions) GetBillingInformation() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInformation +} + +func (o *GetProjectsPermissions) GetBillingInvoice() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoice +} + +func (o *GetProjectsPermissions) GetBillingInvoiceEmailRecipient() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoiceEmailRecipient +} + +func (o *GetProjectsPermissions) GetBillingInvoiceLanguage() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoiceLanguage +} + +func (o *GetProjectsPermissions) GetBillingPlan() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingPlan +} + +func (o *GetProjectsPermissions) GetBillingPurchaseOrder() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingPurchaseOrder +} + +func (o *GetProjectsPermissions) GetBillingTaxID() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingTaxID +} + +func (o *GetProjectsPermissions) GetBlob() []components.ACLAction { + if o == nil { + return nil + } + return o.Blob +} + +func (o *GetProjectsPermissions) GetBudget() []components.ACLAction { + if o == nil { + return nil + } + return o.Budget +} + +func (o *GetProjectsPermissions) GetCacheArtifact() []components.ACLAction { + if o == nil { + return nil + } + return o.CacheArtifact +} + +func (o *GetProjectsPermissions) GetCacheArtifactUsageEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.CacheArtifactUsageEvent +} + +func (o *GetProjectsPermissions) GetCodeChecks() []components.ACLAction { + if o == nil { + return nil + } + return o.CodeChecks +} + +func (o *GetProjectsPermissions) GetConcurrentBuilds() []components.ACLAction { + if o == nil { + return nil + } + return o.ConcurrentBuilds +} + +func (o *GetProjectsPermissions) GetConnect() []components.ACLAction { + if o == nil { + return nil + } + return o.Connect +} + +func (o *GetProjectsPermissions) GetConnectConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ConnectConfiguration +} + +func (o *GetProjectsPermissions) GetDomain() []components.ACLAction { + if o == nil { + return nil + } + return o.Domain +} + +func (o *GetProjectsPermissions) GetDomainAcceptDelegation() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainAcceptDelegation +} + +func (o *GetProjectsPermissions) GetDomainAuthCodes() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainAuthCodes +} + +func (o *GetProjectsPermissions) GetDomainCertificate() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainCertificate +} + +func (o *GetProjectsPermissions) GetDomainCheckConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainCheckConfig +} + +func (o *GetProjectsPermissions) GetDomainMove() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainMove +} + +func (o *GetProjectsPermissions) GetDomainPurchase() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainPurchase +} + +func (o *GetProjectsPermissions) GetDomainRecord() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainRecord +} + +func (o *GetProjectsPermissions) GetDomainTransferIn() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainTransferIn +} + +func (o *GetProjectsPermissions) GetEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.Event +} + +func (o *GetProjectsPermissions) GetOwnEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.OwnEvent +} + +func (o *GetProjectsPermissions) GetSensitiveEnvironmentVariablePolicy() []components.ACLAction { + if o == nil { + return nil + } + return o.SensitiveEnvironmentVariablePolicy +} + +func (o *GetProjectsPermissions) GetFileUpload() []components.ACLAction { + if o == nil { + return nil + } + return o.FileUpload +} + +func (o *GetProjectsPermissions) GetGitRepository() []components.ACLAction { + if o == nil { + return nil + } + return o.GitRepository +} + +func (o *GetProjectsPermissions) GetIPBlocking() []components.ACLAction { + if o == nil { + return nil + } + return o.IPBlocking +} + +func (o *GetProjectsPermissions) GetIntegration() []components.ACLAction { + if o == nil { + return nil + } + return o.Integration +} + +func (o *GetProjectsPermissions) GetIntegrationAccount() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationAccount +} + +func (o *GetProjectsPermissions) GetIntegrationConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfiguration +} + +func (o *GetProjectsPermissions) GetIntegrationConfigurationTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationTransfer +} + +func (o *GetProjectsPermissions) GetIntegrationConfigurationProjects() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationProjects +} + +func (o *GetProjectsPermissions) GetIntegrationVercelConfigurationOverride() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationVercelConfigurationOverride +} + +func (o *GetProjectsPermissions) GetIntegrationConfigurationRole() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationRole +} + +func (o *GetProjectsPermissions) GetIntegrationResource() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResource +} + +func (o *GetProjectsPermissions) GetIntegrationEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationEvent +} + +func (o *GetProjectsPermissions) GetIntegrationResourceSecrets() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResourceSecrets +} + +func (o *GetProjectsPermissions) GetIntegrationDeploymentAction() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationDeploymentAction +} + +func (o *GetProjectsPermissions) GetMarketplaceInstallationMember() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceInstallationMember +} + +func (o *GetProjectsPermissions) GetMarketplaceBillingData() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceBillingData +} + +func (o *GetProjectsPermissions) GetMarketplaceInvoice() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceInvoice +} + +func (o *GetProjectsPermissions) GetJobGlobal() []components.ACLAction { + if o == nil { + return nil + } + return o.JobGlobal +} + +func (o *GetProjectsPermissions) GetLogDrain() []components.ACLAction { + if o == nil { + return nil + } + return o.LogDrain +} + +func (o *GetProjectsPermissions) GetMonitoring() []components.ACLAction { + if o == nil { + return nil + } + return o.Monitoring +} + +func (o *GetProjectsPermissions) GetMonitoringSettings() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringSettings +} + +func (o *GetProjectsPermissions) GetMonitoringQuery() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringQuery +} + +func (o *GetProjectsPermissions) GetMonitoringChart() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringChart +} + +func (o *GetProjectsPermissions) GetMonitoringAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringAlert +} + +func (o *GetProjectsPermissions) GetNotificationDeploymentFailed() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDeploymentFailed +} + +func (o *GetProjectsPermissions) GetNotificationDomainConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainConfiguration +} + +func (o *GetProjectsPermissions) GetNotificationDomainExpire() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainExpire +} + +func (o *GetProjectsPermissions) GetNotificationDomainMoved() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainMoved +} + +func (o *GetProjectsPermissions) GetNotificationDomainPurchase() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainPurchase +} + +func (o *GetProjectsPermissions) GetNotificationDomainRenewal() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainRenewal +} + +func (o *GetProjectsPermissions) GetNotificationDomainTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainTransfer +} + +func (o *GetProjectsPermissions) GetNotificationDomainUnverified() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainUnverified +} + +func (o *GetProjectsPermissions) GetNotificationMonitoringAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationMonitoringAlert +} + +func (o *GetProjectsPermissions) GetNotificationPaymentFailed() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationPaymentFailed +} + +func (o *GetProjectsPermissions) GetNotificationUsageAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationUsageAlert +} + +func (o *GetProjectsPermissions) GetNotificationCustomerBudget() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationCustomerBudget +} + +func (o *GetProjectsPermissions) GetNotificationStatementOfReasons() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationStatementOfReasons +} + +func (o *GetProjectsPermissions) GetOauth2Connection() []components.ACLAction { + if o == nil { + return nil + } + return o.Oauth2Connection +} + +func (o *GetProjectsPermissions) GetObservabilityConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ObservabilityConfiguration +} + +func (o *GetProjectsPermissions) GetOpenTelemetryEndpoint() []components.ACLAction { + if o == nil { + return nil + } + return o.OpenTelemetryEndpoint +} + +func (o *GetProjectsPermissions) GetPaymentMethod() []components.ACLAction { + if o == nil { + return nil + } + return o.PaymentMethod +} + +func (o *GetProjectsPermissions) GetPermissions() []components.ACLAction { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *GetProjectsPermissions) GetPostgres() []components.ACLAction { + if o == nil { + return nil + } + return o.Postgres +} + +func (o *GetProjectsPermissions) GetPreviewDeploymentSuffix() []components.ACLAction { + if o == nil { + return nil + } + return o.PreviewDeploymentSuffix +} + +func (o *GetProjectsPermissions) GetProTrialOnboarding() []components.ACLAction { + if o == nil { + return nil + } + return o.ProTrialOnboarding +} + +func (o *GetProjectsPermissions) GetSharedEnvVars() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVars +} + +func (o *GetProjectsPermissions) GetSharedEnvVarsProduction() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVarsProduction +} + +func (o *GetProjectsPermissions) GetSpace() []components.ACLAction { + if o == nil { + return nil + } + return o.Space +} + +func (o *GetProjectsPermissions) GetSpaceRun() []components.ACLAction { + if o == nil { + return nil + } + return o.SpaceRun +} + +func (o *GetProjectsPermissions) GetPasswordProtectionInvoiceItem() []components.ACLAction { + if o == nil { + return nil + } + return o.PasswordProtectionInvoiceItem +} + +func (o *GetProjectsPermissions) GetRateLimit() []components.ACLAction { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *GetProjectsPermissions) GetRedis() []components.ACLAction { + if o == nil { + return nil + } + return o.Redis +} + +func (o *GetProjectsPermissions) GetRepository() []components.ACLAction { + if o == nil { + return nil + } + return o.Repository +} + +func (o *GetProjectsPermissions) GetRemoteCaching() []components.ACLAction { + if o == nil { + return nil + } + return o.RemoteCaching +} + +func (o *GetProjectsPermissions) GetSamlConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.SamlConfig +} + +func (o *GetProjectsPermissions) GetSecret() []components.ACLAction { + if o == nil { + return nil + } + return o.Secret +} + +func (o *GetProjectsPermissions) GetRedisStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.RedisStoreTokenSet +} + +func (o *GetProjectsPermissions) GetBlobStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.BlobStoreTokenSet +} + +func (o *GetProjectsPermissions) GetPostgresStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.PostgresStoreTokenSet +} + +func (o *GetProjectsPermissions) GetIntegrationStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationStoreTokenSet +} + +func (o *GetProjectsPermissions) GetIntegrationResourceReplCommand() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResourceReplCommand +} + +func (o *GetProjectsPermissions) GetStoreTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.StoreTransfer +} + +func (o *GetProjectsPermissions) GetSupportCase() []components.ACLAction { + if o == nil { + return nil + } + return o.SupportCase +} + +func (o *GetProjectsPermissions) GetSupportCaseComment() []components.ACLAction { + if o == nil { + return nil + } + return o.SupportCaseComment +} + +func (o *GetProjectsPermissions) GetDataCacheBillingSettings() []components.ACLAction { + if o == nil { + return nil + } + return o.DataCacheBillingSettings +} + +func (o *GetProjectsPermissions) GetTeam() []components.ACLAction { + if o == nil { + return nil + } + return o.Team +} + +func (o *GetProjectsPermissions) GetTeamAccessRequest() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamAccessRequest +} + +func (o *GetProjectsPermissions) GetTeamFellowMembership() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamFellowMembership +} + +func (o *GetProjectsPermissions) GetTeamGitExclusivity() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamGitExclusivity +} + +func (o *GetProjectsPermissions) GetTeamInvite() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamInvite +} + +func (o *GetProjectsPermissions) GetTeamInviteCode() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamInviteCode +} + +func (o *GetProjectsPermissions) GetTeamJoin() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamJoin +} + +func (o *GetProjectsPermissions) GetTeamMicrofrontends() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamMicrofrontends +} + +func (o *GetProjectsPermissions) GetTeamOwnMembership() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamOwnMembership +} + +func (o *GetProjectsPermissions) GetTeamOwnMembershipDisconnectSAML() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamOwnMembershipDisconnectSAML +} + +func (o *GetProjectsPermissions) GetToken() []components.ACLAction { + if o == nil { + return nil + } + return o.Token +} + +func (o *GetProjectsPermissions) GetUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.Usage +} + +func (o *GetProjectsPermissions) GetUsageCycle() []components.ACLAction { + if o == nil { + return nil + } + return o.UsageCycle +} + +func (o *GetProjectsPermissions) GetUser() []components.ACLAction { + if o == nil { + return nil + } + return o.User +} + +func (o *GetProjectsPermissions) GetUserConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.UserConnection +} + +func (o *GetProjectsPermissions) GetVpcPeeringConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.VpcPeeringConnection +} + +func (o *GetProjectsPermissions) GetWebAnalyticsPlan() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAnalyticsPlan +} + +func (o *GetProjectsPermissions) GetWebAuthn() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAuthn +} + +func (o *GetProjectsPermissions) GetEdgeConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfig +} + +func (o *GetProjectsPermissions) GetEdgeConfigItem() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigItem +} + +func (o *GetProjectsPermissions) GetEdgeConfigSchema() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigSchema +} + +func (o *GetProjectsPermissions) GetEdgeConfigToken() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigToken +} + +func (o *GetProjectsPermissions) GetWebhook() []components.ACLAction { + if o == nil { + return nil + } + return o.Webhook +} + +func (o *GetProjectsPermissions) GetWebhookEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.WebhookEvent +} + +func (o *GetProjectsPermissions) GetEndpointVerification() []components.ACLAction { + if o == nil { + return nil + } + return o.EndpointVerification +} + +func (o *GetProjectsPermissions) GetProjectTransferIn() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransferIn +} + +func (o *GetProjectsPermissions) GetOauth2Application() []components.ACLAction { + if o == nil { + return nil + } + return o.Oauth2Application +} + +func (o *GetProjectsPermissions) GetAliasProject() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasProject +} + +func (o *GetProjectsPermissions) GetAliasProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasProtectionBypass +} + +func (o *GetProjectsPermissions) GetProductionAliasProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.ProductionAliasProtectionBypass +} + +func (o *GetProjectsPermissions) GetConnectConfigurationLink() []components.ACLAction { + if o == nil { + return nil + } + return o.ConnectConfigurationLink +} + +func (o *GetProjectsPermissions) GetDataCacheNamespace() []components.ACLAction { + if o == nil { + return nil + } + return o.DataCacheNamespace +} + +func (o *GetProjectsPermissions) GetDeployment() []components.ACLAction { + if o == nil { + return nil + } + return o.Deployment +} + +func (o *GetProjectsPermissions) GetDeploymentCheck() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheck +} + +func (o *GetProjectsPermissions) GetDeploymentCheckPreview() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheckPreview +} + +func (o *GetProjectsPermissions) GetDeploymentCheckReRunFromProductionBranch() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheckReRunFromProductionBranch +} + +func (o *GetProjectsPermissions) GetDeploymentProductionGit() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentProductionGit +} + +func (o *GetProjectsPermissions) GetDeploymentV0() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentV0 +} + +func (o *GetProjectsPermissions) GetDeploymentPreview() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPreview +} + +func (o *GetProjectsPermissions) GetDeploymentPrivate() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPrivate +} + +func (o *GetProjectsPermissions) GetDeploymentPromote() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPromote +} + +func (o *GetProjectsPermissions) GetDeploymentRollback() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentRollback +} + +func (o *GetProjectsPermissions) GetEnvironments() []components.ACLAction { + if o == nil { + return nil + } + return o.Environments +} + +func (o *GetProjectsPermissions) GetLogs() []components.ACLAction { + if o == nil { + return nil + } + return o.Logs +} + +func (o *GetProjectsPermissions) GetLogsPreset() []components.ACLAction { + if o == nil { + return nil + } + return o.LogsPreset +} + +func (o *GetProjectsPermissions) GetPasswordProtection() []components.ACLAction { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *GetProjectsPermissions) GetOptionsAllowlist() []components.ACLAction { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +func (o *GetProjectsPermissions) GetJob() []components.ACLAction { + if o == nil { + return nil + } + return o.Job +} + +func (o *GetProjectsPermissions) GetObservabilityData() []components.ACLAction { + if o == nil { + return nil + } + return o.ObservabilityData +} + +func (o *GetProjectsPermissions) GetProject() []components.ACLAction { + if o == nil { + return nil + } + return o.Project +} + +func (o *GetProjectsPermissions) GetProjectFromV0() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectFromV0 +} + +func (o *GetProjectsPermissions) GetProjectAccessGroup() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAccessGroup +} + +func (o *GetProjectsPermissions) GetProjectAnalyticsSampling() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAnalyticsSampling +} + +func (o *GetProjectsPermissions) GetProjectDeploymentHook() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDeploymentHook +} + +func (o *GetProjectsPermissions) GetProjectDomain() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomain +} + +func (o *GetProjectsPermissions) GetProjectDomainMove() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomainMove +} + +func (o *GetProjectsPermissions) GetProjectDomainCheckConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomainCheckConfig +} + +func (o *GetProjectsPermissions) GetProjectEnvVars() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVars +} + +func (o *GetProjectsPermissions) GetProjectEnvVarsProduction() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVarsProduction +} + +func (o *GetProjectsPermissions) GetProjectEnvVarsUnownedByIntegration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVarsUnownedByIntegration +} + +func (o *GetProjectsPermissions) GetProjectFlags() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectFlags +} + +func (o *GetProjectsPermissions) GetProjectID() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetProjectsPermissions) GetProjectIntegrationConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectIntegrationConfiguration +} + +func (o *GetProjectsPermissions) GetProjectLink() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectLink +} + +func (o *GetProjectsPermissions) GetProjectMember() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectMember +} + +func (o *GetProjectsPermissions) GetProjectMonitoring() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectMonitoring +} + +func (o *GetProjectsPermissions) GetProjectPermissions() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectPermissions +} + +func (o *GetProjectsPermissions) GetProjectProductionBranch() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectProductionBranch +} + +func (o *GetProjectsPermissions) GetProjectTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransfer +} + +func (o *GetProjectsPermissions) GetProjectTransferOut() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransferOut +} + +func (o *GetProjectsPermissions) GetProjectProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectProtectionBypass +} + +func (o *GetProjectsPermissions) GetProjectUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectUsage +} + +func (o *GetProjectsPermissions) GetProjectAnalyticsUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAnalyticsUsage +} + +func (o *GetProjectsPermissions) GetProjectSupportCase() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectSupportCase +} + +func (o *GetProjectsPermissions) GetProjectSupportCaseComment() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectSupportCaseComment +} + +func (o *GetProjectsPermissions) GetProjectDeploymentExpiration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDeploymentExpiration +} + +func (o *GetProjectsPermissions) GetProjectTier() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTier +} + +func (o *GetProjectsPermissions) GetSeawallConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.SeawallConfig +} + +func (o *GetProjectsPermissions) GetSkewProtection() []components.ACLAction { + if o == nil { + return nil + } + return o.SkewProtection +} + +func (o *GetProjectsPermissions) GetAnalytics() []components.ACLAction { + if o == nil { + return nil + } + return o.Analytics +} + +func (o *GetProjectsPermissions) GetTrustedIps() []components.ACLAction { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *GetProjectsPermissions) GetWebAnalytics() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *GetProjectsPermissions) GetSharedEnvVarConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVarConnection +} + +func (o *GetProjectsPermissions) GetSonar() []components.ACLAction { + if o == nil { + return nil + } + return o.Sonar +} + +type GetProjectsLastRollbackTarget struct { +} + +type GetProjectsJobStatus string + +const ( + GetProjectsJobStatusSucceeded GetProjectsJobStatus = "succeeded" + GetProjectsJobStatusFailed GetProjectsJobStatus = "failed" + GetProjectsJobStatusSkipped GetProjectsJobStatus = "skipped" + GetProjectsJobStatusPending GetProjectsJobStatus = "pending" + GetProjectsJobStatusInProgress GetProjectsJobStatus = "in-progress" +) + +func (e GetProjectsJobStatus) ToPointer() *GetProjectsJobStatus { + return &e +} +func (e *GetProjectsJobStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "pending": + fallthrough + case "in-progress": + *e = GetProjectsJobStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsJobStatus: %v", v) + } +} + +type GetProjectsProjectsResponse200Type string + +const ( + GetProjectsProjectsResponse200TypePromote GetProjectsProjectsResponse200Type = "promote" + GetProjectsProjectsResponse200TypeRollback GetProjectsProjectsResponse200Type = "rollback" +) + +func (e GetProjectsProjectsResponse200Type) ToPointer() *GetProjectsProjectsResponse200Type { + return &e +} +func (e *GetProjectsProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "promote": + fallthrough + case "rollback": + *e = GetProjectsProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsResponse200Type: %v", v) + } +} + +type GetProjectsLastAliasRequest struct { + FromDeploymentID string `json:"fromDeploymentId"` + ToDeploymentID string `json:"toDeploymentId"` + JobStatus GetProjectsJobStatus `json:"jobStatus"` + RequestedAt float64 `json:"requestedAt"` + Type GetProjectsProjectsResponse200Type `json:"type"` +} + +func (o *GetProjectsLastAliasRequest) GetFromDeploymentID() string { + if o == nil { + return "" + } + return o.FromDeploymentID +} + +func (o *GetProjectsLastAliasRequest) GetToDeploymentID() string { + if o == nil { + return "" + } + return o.ToDeploymentID +} + +func (o *GetProjectsLastAliasRequest) GetJobStatus() GetProjectsJobStatus { + if o == nil { + return GetProjectsJobStatus("") + } + return o.JobStatus +} + +func (o *GetProjectsLastAliasRequest) GetRequestedAt() float64 { + if o == nil { + return 0.0 + } + return o.RequestedAt +} + +func (o *GetProjectsLastAliasRequest) GetType() GetProjectsProjectsResponse200Type { + if o == nil { + return GetProjectsProjectsResponse200Type("") + } + return o.Type +} + +type GetProjectsScope string + +const ( + GetProjectsScopeAutomationBypass GetProjectsScope = "automation-bypass" +) + +func (e GetProjectsScope) ToPointer() *GetProjectsScope { + return &e +} +func (e *GetProjectsScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "automation-bypass": + *e = GetProjectsScope(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsScope: %v", v) + } +} + +type GetProjectsProtectionBypass struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope GetProjectsScope `json:"scope"` +} + +func (o *GetProjectsProtectionBypass) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetProjectsProtectionBypass) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *GetProjectsProtectionBypass) GetScope() GetProjectsScope { + if o == nil { + return GetProjectsScope("") + } + return o.Scope +} + +type GetProjectsTrustedIpsProjectsDeploymentType string + +const ( + GetProjectsTrustedIpsProjectsDeploymentTypeProduction GetProjectsTrustedIpsProjectsDeploymentType = "production" + GetProjectsTrustedIpsProjectsDeploymentTypePreview GetProjectsTrustedIpsProjectsDeploymentType = "preview" + GetProjectsTrustedIpsProjectsDeploymentTypeAll GetProjectsTrustedIpsProjectsDeploymentType = "all" + GetProjectsTrustedIpsProjectsDeploymentTypeProdDeploymentUrlsAndAllPreviews GetProjectsTrustedIpsProjectsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e GetProjectsTrustedIpsProjectsDeploymentType) ToPointer() *GetProjectsTrustedIpsProjectsDeploymentType { + return &e +} +func (e *GetProjectsTrustedIpsProjectsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = GetProjectsTrustedIpsProjectsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsTrustedIpsProjectsDeploymentType: %v", v) + } +} + +type GetProjectsTrustedIps2 struct { + DeploymentType GetProjectsTrustedIpsProjectsDeploymentType `json:"deploymentType"` +} + +func (o *GetProjectsTrustedIps2) GetDeploymentType() GetProjectsTrustedIpsProjectsDeploymentType { + if o == nil { + return GetProjectsTrustedIpsProjectsDeploymentType("") + } + return o.DeploymentType +} + +type GetProjectsTrustedIpsDeploymentType string + +const ( + GetProjectsTrustedIpsDeploymentTypeProduction GetProjectsTrustedIpsDeploymentType = "production" + GetProjectsTrustedIpsDeploymentTypePreview GetProjectsTrustedIpsDeploymentType = "preview" + GetProjectsTrustedIpsDeploymentTypeAll GetProjectsTrustedIpsDeploymentType = "all" + GetProjectsTrustedIpsDeploymentTypeProdDeploymentUrlsAndAllPreviews GetProjectsTrustedIpsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e GetProjectsTrustedIpsDeploymentType) ToPointer() *GetProjectsTrustedIpsDeploymentType { + return &e +} +func (e *GetProjectsTrustedIpsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = GetProjectsTrustedIpsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsTrustedIpsDeploymentType: %v", v) + } +} + +type GetProjectsTrustedIpsAddresses struct { + Value string `json:"value"` + Note *string `json:"note,omitempty"` +} + +func (o *GetProjectsTrustedIpsAddresses) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *GetProjectsTrustedIpsAddresses) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +type GetProjectsTrustedIpsProtectionMode string + +const ( + GetProjectsTrustedIpsProtectionModeAdditional GetProjectsTrustedIpsProtectionMode = "additional" + GetProjectsTrustedIpsProtectionModeExclusive GetProjectsTrustedIpsProtectionMode = "exclusive" +) + +func (e GetProjectsTrustedIpsProtectionMode) ToPointer() *GetProjectsTrustedIpsProtectionMode { + return &e +} +func (e *GetProjectsTrustedIpsProtectionMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "additional": + fallthrough + case "exclusive": + *e = GetProjectsTrustedIpsProtectionMode(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsTrustedIpsProtectionMode: %v", v) + } +} + +type GetProjectsTrustedIps1 struct { + DeploymentType GetProjectsTrustedIpsDeploymentType `json:"deploymentType"` + Addresses []GetProjectsTrustedIpsAddresses `json:"addresses"` + ProtectionMode GetProjectsTrustedIpsProtectionMode `json:"protectionMode"` +} + +func (o *GetProjectsTrustedIps1) GetDeploymentType() GetProjectsTrustedIpsDeploymentType { + if o == nil { + return GetProjectsTrustedIpsDeploymentType("") + } + return o.DeploymentType +} + +func (o *GetProjectsTrustedIps1) GetAddresses() []GetProjectsTrustedIpsAddresses { + if o == nil { + return []GetProjectsTrustedIpsAddresses{} + } + return o.Addresses +} + +func (o *GetProjectsTrustedIps1) GetProtectionMode() GetProjectsTrustedIpsProtectionMode { + if o == nil { + return GetProjectsTrustedIpsProtectionMode("") + } + return o.ProtectionMode +} + +type GetProjectsTrustedIpsType string + +const ( + GetProjectsTrustedIpsTypeGetProjectsTrustedIps1 GetProjectsTrustedIpsType = "getProjects_trustedIps_1" + GetProjectsTrustedIpsTypeGetProjectsTrustedIps2 GetProjectsTrustedIpsType = "getProjects_trustedIps_2" +) + +type GetProjectsTrustedIps struct { + GetProjectsTrustedIps1 *GetProjectsTrustedIps1 + GetProjectsTrustedIps2 *GetProjectsTrustedIps2 + + Type GetProjectsTrustedIpsType +} + +func CreateGetProjectsTrustedIpsGetProjectsTrustedIps1(getProjectsTrustedIps1 GetProjectsTrustedIps1) GetProjectsTrustedIps { + typ := GetProjectsTrustedIpsTypeGetProjectsTrustedIps1 + + return GetProjectsTrustedIps{ + GetProjectsTrustedIps1: &getProjectsTrustedIps1, + Type: typ, + } +} + +func CreateGetProjectsTrustedIpsGetProjectsTrustedIps2(getProjectsTrustedIps2 GetProjectsTrustedIps2) GetProjectsTrustedIps { + typ := GetProjectsTrustedIpsTypeGetProjectsTrustedIps2 + + return GetProjectsTrustedIps{ + GetProjectsTrustedIps2: &getProjectsTrustedIps2, + Type: typ, + } +} + +func (u *GetProjectsTrustedIps) UnmarshalJSON(data []byte) error { + + var getProjectsTrustedIps2 GetProjectsTrustedIps2 = GetProjectsTrustedIps2{} + if err := utils.UnmarshalJSON(data, &getProjectsTrustedIps2, "", true, true); err == nil { + u.GetProjectsTrustedIps2 = &getProjectsTrustedIps2 + u.Type = GetProjectsTrustedIpsTypeGetProjectsTrustedIps2 + return nil + } + + var getProjectsTrustedIps1 GetProjectsTrustedIps1 = GetProjectsTrustedIps1{} + if err := utils.UnmarshalJSON(data, &getProjectsTrustedIps1, "", true, true); err == nil { + u.GetProjectsTrustedIps1 = &getProjectsTrustedIps1 + u.Type = GetProjectsTrustedIpsTypeGetProjectsTrustedIps1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsTrustedIps", string(data)) +} + +func (u GetProjectsTrustedIps) MarshalJSON() ([]byte, error) { + if u.GetProjectsTrustedIps1 != nil { + return utils.MarshalJSON(u.GetProjectsTrustedIps1, "", true) + } + + if u.GetProjectsTrustedIps2 != nil { + return utils.MarshalJSON(u.GetProjectsTrustedIps2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsTrustedIps: all fields are null") +} + +type GetProjectsGitComments struct { + // Whether the Vercel bot should comment on PRs + OnPullRequest bool `json:"onPullRequest"` + // Whether the Vercel bot should comment on commits + OnCommit bool `json:"onCommit"` +} + +func (o *GetProjectsGitComments) GetOnPullRequest() bool { + if o == nil { + return false + } + return o.OnPullRequest +} + +func (o *GetProjectsGitComments) GetOnCommit() bool { + if o == nil { + return false + } + return o.OnCommit +} + +type GetProjectsWebAnalytics struct { + ID string `json:"id"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` +} + +func (o *GetProjectsWebAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsWebAnalytics) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *GetProjectsWebAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *GetProjectsWebAnalytics) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *GetProjectsWebAnalytics) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +type GetProjectsSrc2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *GetProjectsSrc2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *GetProjectsSrc2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *GetProjectsSrc2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *GetProjectsSrc2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *GetProjectsSrc2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *GetProjectsSrc2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *GetProjectsSrc2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *GetProjectsSrc2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *GetProjectsSrc2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *GetProjectsSrc2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *GetProjectsSrc2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type GetProjectsSrcType string + +const ( + GetProjectsSrcTypeStr GetProjectsSrcType = "str" + GetProjectsSrcTypeGetProjectsSrc2 GetProjectsSrcType = "getProjects_src_2" +) + +type GetProjectsSrc struct { + Str *string + GetProjectsSrc2 *GetProjectsSrc2 + + Type GetProjectsSrcType +} + +func CreateGetProjectsSrcStr(str string) GetProjectsSrc { + typ := GetProjectsSrcTypeStr + + return GetProjectsSrc{ + Str: &str, + Type: typ, + } +} + +func CreateGetProjectsSrcGetProjectsSrc2(getProjectsSrc2 GetProjectsSrc2) GetProjectsSrc { + typ := GetProjectsSrcTypeGetProjectsSrc2 + + return GetProjectsSrc{ + GetProjectsSrc2: &getProjectsSrc2, + Type: typ, + } +} + +func (u *GetProjectsSrc) UnmarshalJSON(data []byte) error { + + var getProjectsSrc2 GetProjectsSrc2 = GetProjectsSrc2{} + if err := utils.UnmarshalJSON(data, &getProjectsSrc2, "", true, true); err == nil { + u.GetProjectsSrc2 = &getProjectsSrc2 + u.Type = GetProjectsSrcTypeGetProjectsSrc2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetProjectsSrcTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsSrc", string(data)) +} + +func (u GetProjectsSrc) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.GetProjectsSrc2 != nil { + return utils.MarshalJSON(u.GetProjectsSrc2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsSrc: all fields are null") +} + +type GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType string + +const ( + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypePath GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "path" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeHost GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "host" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeMethod GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "method" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeHeader GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "header" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeCookie GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "cookie" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeQuery GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "query" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeIPAddress GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "ip_address" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeProtocol GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "protocol" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeScheme GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "scheme" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeEnvironment GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "environment" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeRegion GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "region" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityTypeInitialRequestPath GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType = "initial_request_path" +) + +func (e GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType) ToPointer() *GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType { + return &e +} +func (e *GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "path": + fallthrough + case "host": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "region": + fallthrough + case "initial_request_path": + *e = GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType: %v", v) + } +} + +type GetProjectsValue2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *GetProjectsValue2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *GetProjectsValue2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *GetProjectsValue2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *GetProjectsValue2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *GetProjectsValue2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *GetProjectsValue2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *GetProjectsValue2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *GetProjectsValue2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *GetProjectsValue2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *GetProjectsValue2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *GetProjectsValue2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type GetProjectsValueType string + +const ( + GetProjectsValueTypeStr GetProjectsValueType = "str" + GetProjectsValueTypeGetProjectsValue2 GetProjectsValueType = "getProjects_value_2" +) + +type GetProjectsValue struct { + Str *string + GetProjectsValue2 *GetProjectsValue2 + + Type GetProjectsValueType +} + +func CreateGetProjectsValueStr(str string) GetProjectsValue { + typ := GetProjectsValueTypeStr + + return GetProjectsValue{ + Str: &str, + Type: typ, + } +} + +func CreateGetProjectsValueGetProjectsValue2(getProjectsValue2 GetProjectsValue2) GetProjectsValue { + typ := GetProjectsValueTypeGetProjectsValue2 + + return GetProjectsValue{ + GetProjectsValue2: &getProjectsValue2, + Type: typ, + } +} + +func (u *GetProjectsValue) UnmarshalJSON(data []byte) error { + + var getProjectsValue2 GetProjectsValue2 = GetProjectsValue2{} + if err := utils.UnmarshalJSON(data, &getProjectsValue2, "", true, true); err == nil { + u.GetProjectsValue2 = &getProjectsValue2 + u.Type = GetProjectsValueTypeGetProjectsValue2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetProjectsValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsValue", string(data)) +} + +func (u GetProjectsValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.GetProjectsValue2 != nil { + return utils.MarshalJSON(u.GetProjectsValue2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsValue: all fields are null") +} + +type GetProjectsHas struct { + Type GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType `json:"type"` + Key *string `json:"key,omitempty"` + Value *GetProjectsValue `json:"value,omitempty"` +} + +func (o *GetProjectsHas) GetType() GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType { + if o == nil { + return GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityType("") + } + return o.Type +} + +func (o *GetProjectsHas) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *GetProjectsHas) GetValue() *GetProjectsValue { + if o == nil { + return nil + } + return o.Value +} + +type GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType string + +const ( + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypePath GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "path" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeHost GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "host" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeMethod GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "method" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeHeader GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "header" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeCookie GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "cookie" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeQuery GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "query" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeIPAddress GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "ip_address" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeProtocol GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "protocol" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeScheme GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "scheme" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeEnvironment GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "environment" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeRegion GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "region" + GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesTypeInitialRequestPath GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType = "initial_request_path" +) + +func (e GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType) ToPointer() *GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType { + return &e +} +func (e *GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "path": + fallthrough + case "host": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "region": + fallthrough + case "initial_request_path": + *e = GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType: %v", v) + } +} + +type GetProjectsValueProjects2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *GetProjectsValueProjects2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *GetProjectsValueProjects2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *GetProjectsValueProjects2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *GetProjectsValueProjects2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *GetProjectsValueProjects2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *GetProjectsValueProjects2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *GetProjectsValueProjects2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *GetProjectsValueProjects2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *GetProjectsValueProjects2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *GetProjectsValueProjects2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *GetProjectsValueProjects2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type GetProjectsProjectsValueType string + +const ( + GetProjectsProjectsValueTypeStr GetProjectsProjectsValueType = "str" + GetProjectsProjectsValueTypeGetProjectsValueProjects2 GetProjectsProjectsValueType = "getProjects_value_projects_2" +) + +type GetProjectsProjectsValue struct { + Str *string + GetProjectsValueProjects2 *GetProjectsValueProjects2 + + Type GetProjectsProjectsValueType +} + +func CreateGetProjectsProjectsValueStr(str string) GetProjectsProjectsValue { + typ := GetProjectsProjectsValueTypeStr + + return GetProjectsProjectsValue{ + Str: &str, + Type: typ, + } +} + +func CreateGetProjectsProjectsValueGetProjectsValueProjects2(getProjectsValueProjects2 GetProjectsValueProjects2) GetProjectsProjectsValue { + typ := GetProjectsProjectsValueTypeGetProjectsValueProjects2 + + return GetProjectsProjectsValue{ + GetProjectsValueProjects2: &getProjectsValueProjects2, + Type: typ, + } +} + +func (u *GetProjectsProjectsValue) UnmarshalJSON(data []byte) error { + + var getProjectsValueProjects2 GetProjectsValueProjects2 = GetProjectsValueProjects2{} + if err := utils.UnmarshalJSON(data, &getProjectsValueProjects2, "", true, true); err == nil { + u.GetProjectsValueProjects2 = &getProjectsValueProjects2 + u.Type = GetProjectsProjectsValueTypeGetProjectsValueProjects2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetProjectsProjectsValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetProjectsProjectsValue", string(data)) +} + +func (u GetProjectsProjectsValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.GetProjectsValueProjects2 != nil { + return utils.MarshalJSON(u.GetProjectsValueProjects2, "", true) + } + + return nil, errors.New("could not marshal union type GetProjectsProjectsValue: all fields are null") +} + +type GetProjectsMissing struct { + Type GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType `json:"type"` + Key *string `json:"key,omitempty"` + Value *GetProjectsProjectsValue `json:"value,omitempty"` +} + +func (o *GetProjectsMissing) GetType() GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType { + if o == nil { + return GetProjectsProjectsResponse200ApplicationJSONResponseBodyProjectsSecurityFirewallRoutesType("") + } + return o.Type +} + +func (o *GetProjectsMissing) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *GetProjectsMissing) GetValue() *GetProjectsProjectsValue { + if o == nil { + return nil + } + return o.Value +} + +type GetProjectsHandle string + +const ( + GetProjectsHandleInit GetProjectsHandle = "init" + GetProjectsHandleFinalize GetProjectsHandle = "finalize" +) + +func (e GetProjectsHandle) ToPointer() *GetProjectsHandle { + return &e +} +func (e *GetProjectsHandle) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "init": + fallthrough + case "finalize": + *e = GetProjectsHandle(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsHandle: %v", v) + } +} + +type GetProjectsAction string + +const ( + GetProjectsActionDeny GetProjectsAction = "deny" + GetProjectsActionChallenge GetProjectsAction = "challenge" + GetProjectsActionLog GetProjectsAction = "log" + GetProjectsActionBypass GetProjectsAction = "bypass" + GetProjectsActionRateLimit GetProjectsAction = "rate_limit" + GetProjectsActionRedirect GetProjectsAction = "redirect" +) + +func (e GetProjectsAction) ToPointer() *GetProjectsAction { + return &e +} +func (e *GetProjectsAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "challenge": + fallthrough + case "log": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = GetProjectsAction(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsAction: %v", v) + } +} + +type GetProjectsAlgo string + +const ( + GetProjectsAlgoFixedWindow GetProjectsAlgo = "fixed_window" + GetProjectsAlgoTokenBucket GetProjectsAlgo = "token_bucket" +) + +func (e GetProjectsAlgo) ToPointer() *GetProjectsAlgo { + return &e +} +func (e *GetProjectsAlgo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = GetProjectsAlgo(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsAlgo: %v", v) + } +} + +type GetProjectsErl struct { + Algo GetProjectsAlgo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` +} + +func (o *GetProjectsErl) GetAlgo() GetProjectsAlgo { + if o == nil { + return GetProjectsAlgo("") + } + return o.Algo +} + +func (o *GetProjectsErl) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *GetProjectsErl) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *GetProjectsErl) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +type GetProjectsMitigate struct { + Action GetProjectsAction `json:"action"` + RuleID string `json:"rule_id"` + TTL *float64 `json:"ttl,omitempty"` + Erl *GetProjectsErl `json:"erl,omitempty"` +} + +func (o *GetProjectsMitigate) GetAction() GetProjectsAction { + if o == nil { + return GetProjectsAction("") + } + return o.Action +} + +func (o *GetProjectsMitigate) GetRuleID() string { + if o == nil { + return "" + } + return o.RuleID +} + +func (o *GetProjectsMitigate) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *GetProjectsMitigate) GetErl() *GetProjectsErl { + if o == nil { + return nil + } + return o.Erl +} + +type GetProjectsFirewallRoutes struct { + Src *GetProjectsSrc `json:"src,omitempty"` + Has []GetProjectsHas `json:"has,omitempty"` + Missing []GetProjectsMissing `json:"missing,omitempty"` + Dest *string `json:"dest,omitempty"` + Status *float64 `json:"status,omitempty"` + Handle *GetProjectsHandle `json:"handle,omitempty"` + Mitigate *GetProjectsMitigate `json:"mitigate,omitempty"` +} + +func (o *GetProjectsFirewallRoutes) GetSrc() *GetProjectsSrc { + if o == nil { + return nil + } + return o.Src +} + +func (o *GetProjectsFirewallRoutes) GetHas() []GetProjectsHas { + if o == nil { + return nil + } + return o.Has +} + +func (o *GetProjectsFirewallRoutes) GetMissing() []GetProjectsMissing { + if o == nil { + return nil + } + return o.Missing +} + +func (o *GetProjectsFirewallRoutes) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *GetProjectsFirewallRoutes) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +func (o *GetProjectsFirewallRoutes) GetHandle() *GetProjectsHandle { + if o == nil { + return nil + } + return o.Handle +} + +func (o *GetProjectsFirewallRoutes) GetMitigate() *GetProjectsMitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type GetProjectsSecurity struct { + AttackModeEnabled *bool `json:"attackModeEnabled,omitempty"` + AttackModeUpdatedAt *float64 `json:"attackModeUpdatedAt,omitempty"` + FirewallEnabled *bool `json:"firewallEnabled,omitempty"` + FirewallUpdatedAt *float64 `json:"firewallUpdatedAt,omitempty"` + AttackModeActiveUntil *float64 `json:"attackModeActiveUntil,omitempty"` + FirewallConfigVersion *float64 `json:"firewallConfigVersion,omitempty"` + FirewallRoutes []GetProjectsFirewallRoutes `json:"firewallRoutes,omitempty"` + FirewallSeawallEnabled *bool `json:"firewallSeawallEnabled,omitempty"` + Ja3Enabled *bool `json:"ja3Enabled,omitempty"` + Ja4Enabled *bool `json:"ja4Enabled,omitempty"` + FirewallBypassIps []string `json:"firewallBypassIps,omitempty"` +} + +func (o *GetProjectsSecurity) GetAttackModeEnabled() *bool { + if o == nil { + return nil + } + return o.AttackModeEnabled +} + +func (o *GetProjectsSecurity) GetAttackModeUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.AttackModeUpdatedAt +} + +func (o *GetProjectsSecurity) GetFirewallEnabled() *bool { + if o == nil { + return nil + } + return o.FirewallEnabled +} + +func (o *GetProjectsSecurity) GetFirewallUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.FirewallUpdatedAt +} + +func (o *GetProjectsSecurity) GetAttackModeActiveUntil() *float64 { + if o == nil { + return nil + } + return o.AttackModeActiveUntil +} + +func (o *GetProjectsSecurity) GetFirewallConfigVersion() *float64 { + if o == nil { + return nil + } + return o.FirewallConfigVersion +} + +func (o *GetProjectsSecurity) GetFirewallRoutes() []GetProjectsFirewallRoutes { + if o == nil { + return nil + } + return o.FirewallRoutes +} + +func (o *GetProjectsSecurity) GetFirewallSeawallEnabled() *bool { + if o == nil { + return nil + } + return o.FirewallSeawallEnabled +} + +func (o *GetProjectsSecurity) GetJa3Enabled() *bool { + if o == nil { + return nil + } + return o.Ja3Enabled +} + +func (o *GetProjectsSecurity) GetJa4Enabled() *bool { + if o == nil { + return nil + } + return o.Ja4Enabled +} + +func (o *GetProjectsSecurity) GetFirewallBypassIps() []string { + if o == nil { + return nil + } + return o.FirewallBypassIps +} + +// GetProjectsIssuerMode - - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com` +type GetProjectsIssuerMode string + +const ( + GetProjectsIssuerModeTeam GetProjectsIssuerMode = "team" + GetProjectsIssuerModeGlobal GetProjectsIssuerMode = "global" +) + +func (e GetProjectsIssuerMode) ToPointer() *GetProjectsIssuerMode { + return &e +} +func (e *GetProjectsIssuerMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "global": + *e = GetProjectsIssuerMode(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsIssuerMode: %v", v) + } +} + +type GetProjectsOidcTokenConfig struct { + Enabled bool `json:"enabled"` + // - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com` + IssuerMode *GetProjectsIssuerMode `json:"issuerMode,omitempty"` +} + +func (o *GetProjectsOidcTokenConfig) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *GetProjectsOidcTokenConfig) GetIssuerMode() *GetProjectsIssuerMode { + if o == nil { + return nil + } + return o.IssuerMode +} + +type GetProjectsTier string + +const ( + GetProjectsTierStandard GetProjectsTier = "standard" + GetProjectsTierAdvanced GetProjectsTier = "advanced" + GetProjectsTierCritical GetProjectsTier = "critical" +) + +func (e GetProjectsTier) ToPointer() *GetProjectsTier { + return &e +} +func (e *GetProjectsTier) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "standard": + fallthrough + case "advanced": + fallthrough + case "critical": + *e = GetProjectsTier(v) + return nil + default: + return fmt.Errorf("invalid value for GetProjectsTier: %v", v) + } +} + +type GetProjectsProjects struct { + AccountID string `json:"accountId"` + Analytics *GetProjectsAnalytics `json:"analytics,omitempty"` + SpeedInsights *GetProjectsSpeedInsights `json:"speedInsights,omitempty"` + AutoExposeSystemEnvs *bool `json:"autoExposeSystemEnvs,omitempty"` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + AutoAssignCustomDomainsUpdatedBy *string `json:"autoAssignCustomDomainsUpdatedBy,omitempty"` + BuildCommand *string `json:"buildCommand,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + CustomerSupportCodeVisibility *bool `json:"customerSupportCodeVisibility,omitempty"` + Crons *GetProjectsCrons `json:"crons,omitempty"` + DataCache *GetProjectsDataCache `json:"dataCache,omitempty"` + DeploymentExpiration *GetProjectsDeploymentExpiration `json:"deploymentExpiration,omitempty"` + DevCommand *string `json:"devCommand,omitempty"` + DirectoryListing bool `json:"directoryListing"` + InstallCommand *string `json:"installCommand,omitempty"` + Env []GetProjectsEnv `json:"env,omitempty"` + CustomEnvironments []GetProjectsCustomEnvironments `json:"customEnvironments,omitempty"` + Framework *GetProjectsFramework `json:"framework,omitempty"` + GitForkProtection *bool `json:"gitForkProtection,omitempty"` + GitLFS *bool `json:"gitLFS,omitempty"` + ID string `json:"id"` + IPBuckets []GetProjectsIPBuckets `json:"ipBuckets,omitempty"` + LatestDeployments []GetProjectsLatestDeployments `json:"latestDeployments,omitempty"` + Link *GetProjectsLink `json:"link,omitempty"` + Microfrontends *GetProjectsMicrofrontends `json:"microfrontends,omitempty"` + Name string `json:"name"` + NodeVersion GetProjectsNodeVersion `json:"nodeVersion"` + OptionsAllowlist *GetProjectsOptionsAllowlist `json:"optionsAllowlist,omitempty"` + OutputDirectory *string `json:"outputDirectory,omitempty"` + PassiveConnectConfigurationID *string `json:"passiveConnectConfigurationId,omitempty"` + PasswordProtection *GetProjectsPasswordProtection `json:"passwordProtection,omitempty"` + ProductionDeploymentsFastLane *bool `json:"productionDeploymentsFastLane,omitempty"` + PublicSource *bool `json:"publicSource,omitempty"` + ResourceConfig *GetProjectsResourceConfig `json:"resourceConfig,omitempty"` + RootDirectory *string `json:"rootDirectory,omitempty"` + ServerlessFunctionRegion *string `json:"serverlessFunctionRegion,omitempty"` + ServerlessFunctionZeroConfigFailover *bool `json:"serverlessFunctionZeroConfigFailover,omitempty"` + SkewProtectionBoundaryAt *float64 `json:"skewProtectionBoundaryAt,omitempty"` + SkewProtectionMaxAge *float64 `json:"skewProtectionMaxAge,omitempty"` + SkipGitConnectDuringLink *bool `json:"skipGitConnectDuringLink,omitempty"` + SourceFilesOutsideRootDirectory *bool `json:"sourceFilesOutsideRootDirectory,omitempty"` + EnableAffectedProjectsDeployments *bool `json:"enableAffectedProjectsDeployments,omitempty"` + SsoProtection *GetProjectsSsoProtection `json:"ssoProtection,omitempty"` + Targets map[string]GetProjectsTargets `json:"targets,omitempty"` + TransferCompletedAt *float64 `json:"transferCompletedAt,omitempty"` + TransferStartedAt *float64 `json:"transferStartedAt,omitempty"` + TransferToAccountID *string `json:"transferToAccountId,omitempty"` + TransferredFromAccountID *string `json:"transferredFromAccountId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Live *bool `json:"live,omitempty"` + EnablePreviewFeedback *bool `json:"enablePreviewFeedback,omitempty"` + EnableProductionFeedback *bool `json:"enableProductionFeedback,omitempty"` + Permissions *GetProjectsPermissions `json:"permissions,omitempty"` + LastRollbackTarget *GetProjectsLastRollbackTarget `json:"lastRollbackTarget,omitempty"` + LastAliasRequest *GetProjectsLastAliasRequest `json:"lastAliasRequest,omitempty"` + HasFloatingAliases *bool `json:"hasFloatingAliases,omitempty"` + ProtectionBypass map[string]GetProjectsProtectionBypass `json:"protectionBypass,omitempty"` + HasActiveBranches *bool `json:"hasActiveBranches,omitempty"` + TrustedIps *GetProjectsTrustedIps `json:"trustedIps,omitempty"` + GitComments *GetProjectsGitComments `json:"gitComments,omitempty"` + Paused *bool `json:"paused,omitempty"` + ConcurrencyBucketName *string `json:"concurrencyBucketName,omitempty"` + WebAnalytics *GetProjectsWebAnalytics `json:"webAnalytics,omitempty"` + Security *GetProjectsSecurity `json:"security,omitempty"` + OidcTokenConfig *GetProjectsOidcTokenConfig `json:"oidcTokenConfig,omitempty"` + Tier *GetProjectsTier `json:"tier,omitempty"` +} + +func (o *GetProjectsProjects) GetAccountID() string { + if o == nil { + return "" + } + return o.AccountID +} + +func (o *GetProjectsProjects) GetAnalytics() *GetProjectsAnalytics { + if o == nil { + return nil + } + return o.Analytics +} + +func (o *GetProjectsProjects) GetSpeedInsights() *GetProjectsSpeedInsights { + if o == nil { + return nil + } + return o.SpeedInsights +} + +func (o *GetProjectsProjects) GetAutoExposeSystemEnvs() *bool { + if o == nil { + return nil + } + return o.AutoExposeSystemEnvs +} + +func (o *GetProjectsProjects) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *GetProjectsProjects) GetAutoAssignCustomDomainsUpdatedBy() *string { + if o == nil { + return nil + } + return o.AutoAssignCustomDomainsUpdatedBy +} + +func (o *GetProjectsProjects) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *GetProjectsProjects) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *GetProjectsProjects) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *GetProjectsProjects) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *GetProjectsProjects) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *GetProjectsProjects) GetCustomerSupportCodeVisibility() *bool { + if o == nil { + return nil + } + return o.CustomerSupportCodeVisibility +} + +func (o *GetProjectsProjects) GetCrons() *GetProjectsCrons { + if o == nil { + return nil + } + return o.Crons +} + +func (o *GetProjectsProjects) GetDataCache() *GetProjectsDataCache { + if o == nil { + return nil + } + return o.DataCache +} + +func (o *GetProjectsProjects) GetDeploymentExpiration() *GetProjectsDeploymentExpiration { + if o == nil { + return nil + } + return o.DeploymentExpiration +} + +func (o *GetProjectsProjects) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *GetProjectsProjects) GetDirectoryListing() bool { + if o == nil { + return false + } + return o.DirectoryListing +} + +func (o *GetProjectsProjects) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *GetProjectsProjects) GetEnv() []GetProjectsEnv { + if o == nil { + return nil + } + return o.Env +} + +func (o *GetProjectsProjects) GetCustomEnvironments() []GetProjectsCustomEnvironments { + if o == nil { + return nil + } + return o.CustomEnvironments +} + +func (o *GetProjectsProjects) GetFramework() *GetProjectsFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *GetProjectsProjects) GetGitForkProtection() *bool { + if o == nil { + return nil + } + return o.GitForkProtection +} + +func (o *GetProjectsProjects) GetGitLFS() *bool { + if o == nil { + return nil + } + return o.GitLFS +} + +func (o *GetProjectsProjects) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetProjectsProjects) GetIPBuckets() []GetProjectsIPBuckets { + if o == nil { + return nil + } + return o.IPBuckets +} + +func (o *GetProjectsProjects) GetLatestDeployments() []GetProjectsLatestDeployments { + if o == nil { + return nil + } + return o.LatestDeployments +} + +func (o *GetProjectsProjects) GetLink() *GetProjectsLink { + if o == nil { + return nil + } + return o.Link +} + +func (o *GetProjectsProjects) GetMicrofrontends() *GetProjectsMicrofrontends { + if o == nil { + return nil + } + return o.Microfrontends +} + +func (o *GetProjectsProjects) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *GetProjectsProjects) GetNodeVersion() GetProjectsNodeVersion { + if o == nil { + return GetProjectsNodeVersion("") + } + return o.NodeVersion +} + +func (o *GetProjectsProjects) GetOptionsAllowlist() *GetProjectsOptionsAllowlist { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +func (o *GetProjectsProjects) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *GetProjectsProjects) GetPassiveConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.PassiveConnectConfigurationID +} + +func (o *GetProjectsProjects) GetPasswordProtection() *GetProjectsPasswordProtection { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *GetProjectsProjects) GetProductionDeploymentsFastLane() *bool { + if o == nil { + return nil + } + return o.ProductionDeploymentsFastLane +} + +func (o *GetProjectsProjects) GetPublicSource() *bool { + if o == nil { + return nil + } + return o.PublicSource +} + +func (o *GetProjectsProjects) GetResourceConfig() *GetProjectsResourceConfig { + if o == nil { + return nil + } + return o.ResourceConfig +} + +func (o *GetProjectsProjects) GetRootDirectory() *string { + if o == nil { + return nil + } + return o.RootDirectory +} + +func (o *GetProjectsProjects) GetServerlessFunctionRegion() *string { + if o == nil { + return nil + } + return o.ServerlessFunctionRegion +} + +func (o *GetProjectsProjects) GetServerlessFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.ServerlessFunctionZeroConfigFailover +} + +func (o *GetProjectsProjects) GetSkewProtectionBoundaryAt() *float64 { + if o == nil { + return nil + } + return o.SkewProtectionBoundaryAt +} + +func (o *GetProjectsProjects) GetSkewProtectionMaxAge() *float64 { + if o == nil { + return nil + } + return o.SkewProtectionMaxAge +} + +func (o *GetProjectsProjects) GetSkipGitConnectDuringLink() *bool { + if o == nil { + return nil + } + return o.SkipGitConnectDuringLink +} + +func (o *GetProjectsProjects) GetSourceFilesOutsideRootDirectory() *bool { + if o == nil { + return nil + } + return o.SourceFilesOutsideRootDirectory +} + +func (o *GetProjectsProjects) GetEnableAffectedProjectsDeployments() *bool { + if o == nil { + return nil + } + return o.EnableAffectedProjectsDeployments +} + +func (o *GetProjectsProjects) GetSsoProtection() *GetProjectsSsoProtection { + if o == nil { + return nil + } + return o.SsoProtection +} + +func (o *GetProjectsProjects) GetTargets() map[string]GetProjectsTargets { + if o == nil { + return nil + } + return o.Targets +} + +func (o *GetProjectsProjects) GetTransferCompletedAt() *float64 { + if o == nil { + return nil + } + return o.TransferCompletedAt +} + +func (o *GetProjectsProjects) GetTransferStartedAt() *float64 { + if o == nil { + return nil + } + return o.TransferStartedAt +} + +func (o *GetProjectsProjects) GetTransferToAccountID() *string { + if o == nil { + return nil + } + return o.TransferToAccountID +} + +func (o *GetProjectsProjects) GetTransferredFromAccountID() *string { + if o == nil { + return nil + } + return o.TransferredFromAccountID +} + +func (o *GetProjectsProjects) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *GetProjectsProjects) GetLive() *bool { + if o == nil { + return nil + } + return o.Live +} + +func (o *GetProjectsProjects) GetEnablePreviewFeedback() *bool { + if o == nil { + return nil + } + return o.EnablePreviewFeedback +} + +func (o *GetProjectsProjects) GetEnableProductionFeedback() *bool { + if o == nil { + return nil + } + return o.EnableProductionFeedback +} + +func (o *GetProjectsProjects) GetPermissions() *GetProjectsPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *GetProjectsProjects) GetLastRollbackTarget() *GetProjectsLastRollbackTarget { + if o == nil { + return nil + } + return o.LastRollbackTarget +} + +func (o *GetProjectsProjects) GetLastAliasRequest() *GetProjectsLastAliasRequest { + if o == nil { + return nil + } + return o.LastAliasRequest +} + +func (o *GetProjectsProjects) GetHasFloatingAliases() *bool { + if o == nil { + return nil + } + return o.HasFloatingAliases +} + +func (o *GetProjectsProjects) GetProtectionBypass() map[string]GetProjectsProtectionBypass { + if o == nil { + return nil + } + return o.ProtectionBypass +} + +func (o *GetProjectsProjects) GetHasActiveBranches() *bool { + if o == nil { + return nil + } + return o.HasActiveBranches +} + +func (o *GetProjectsProjects) GetTrustedIps() *GetProjectsTrustedIps { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *GetProjectsProjects) GetGitComments() *GetProjectsGitComments { + if o == nil { + return nil + } + return o.GitComments +} + +func (o *GetProjectsProjects) GetPaused() *bool { + if o == nil { + return nil + } + return o.Paused +} + +func (o *GetProjectsProjects) GetConcurrencyBucketName() *string { + if o == nil { + return nil + } + return o.ConcurrencyBucketName +} + +func (o *GetProjectsProjects) GetWebAnalytics() *GetProjectsWebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *GetProjectsProjects) GetSecurity() *GetProjectsSecurity { + if o == nil { + return nil + } + return o.Security +} + +func (o *GetProjectsProjects) GetOidcTokenConfig() *GetProjectsOidcTokenConfig { + if o == nil { + return nil + } + return o.OidcTokenConfig +} + +func (o *GetProjectsProjects) GetTier() *GetProjectsTier { + if o == nil { + return nil + } + return o.Tier +} + +// GetProjectsResponseBody - The paginated list of projects +type GetProjectsResponseBody struct { + Projects []GetProjectsProjects `json:"projects"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *GetProjectsResponseBody) GetProjects() []GetProjectsProjects { + if o == nil { + return []GetProjectsProjects{} + } + return o.Projects +} + +func (o *GetProjectsResponseBody) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type GetProjectsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The paginated list of projects + Object *GetProjectsResponseBody +} + +func (o *GetProjectsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetProjectsResponse) GetObject() *GetProjectsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getrecords.go b/src/__tests__/mockserver/internal/sdk/models/operations/getrecords.go new file mode 100644 index 00000000..695e2f4f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getrecords.go @@ -0,0 +1,503 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetRecordsRequest struct { + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // Maximum number of records to list from a request. + Limit *string `queryParam:"style=form,explode=true,name=limit"` + // Get records created after this JavaScript timestamp. + Since *string `queryParam:"style=form,explode=true,name=since"` + // Get records created before this JavaScript timestamp. + Until *string `queryParam:"style=form,explode=true,name=until"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetRecordsRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *GetRecordsRequest) GetLimit() *string { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetRecordsRequest) GetSince() *string { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetRecordsRequest) GetUntil() *string { + if o == nil { + return nil + } + return o.Until +} + +func (o *GetRecordsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetRecordsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetRecordsResponseBodyDNSType string + +const ( + GetRecordsResponseBodyDNSTypeA GetRecordsResponseBodyDNSType = "A" + GetRecordsResponseBodyDNSTypeAaaa GetRecordsResponseBodyDNSType = "AAAA" + GetRecordsResponseBodyDNSTypeAlias GetRecordsResponseBodyDNSType = "ALIAS" + GetRecordsResponseBodyDNSTypeCaa GetRecordsResponseBodyDNSType = "CAA" + GetRecordsResponseBodyDNSTypeCname GetRecordsResponseBodyDNSType = "CNAME" + GetRecordsResponseBodyDNSTypeHTTPS GetRecordsResponseBodyDNSType = "HTTPS" + GetRecordsResponseBodyDNSTypeMx GetRecordsResponseBodyDNSType = "MX" + GetRecordsResponseBodyDNSTypeSrv GetRecordsResponseBodyDNSType = "SRV" + GetRecordsResponseBodyDNSTypeTxt GetRecordsResponseBodyDNSType = "TXT" + GetRecordsResponseBodyDNSTypeNs GetRecordsResponseBodyDNSType = "NS" +) + +func (e GetRecordsResponseBodyDNSType) ToPointer() *GetRecordsResponseBodyDNSType { + return &e +} +func (e *GetRecordsResponseBodyDNSType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = GetRecordsResponseBodyDNSType(v) + return nil + default: + return fmt.Errorf("invalid value for GetRecordsResponseBodyDNSType: %v", v) + } +} + +type ResponseBodyRecords struct { + ID string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Type GetRecordsResponseBodyDNSType `json:"type"` + Value string `json:"value"` + MxPriority *float64 `json:"mxPriority,omitempty"` + Priority *float64 `json:"priority,omitempty"` + Creator string `json:"creator"` + Created *float64 `json:"created"` + Updated *float64 `json:"updated"` + CreatedAt *float64 `json:"createdAt"` + UpdatedAt *float64 `json:"updatedAt"` +} + +func (o *ResponseBodyRecords) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ResponseBodyRecords) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *ResponseBodyRecords) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ResponseBodyRecords) GetType() GetRecordsResponseBodyDNSType { + if o == nil { + return GetRecordsResponseBodyDNSType("") + } + return o.Type +} + +func (o *ResponseBodyRecords) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *ResponseBodyRecords) GetMxPriority() *float64 { + if o == nil { + return nil + } + return o.MxPriority +} + +func (o *ResponseBodyRecords) GetPriority() *float64 { + if o == nil { + return nil + } + return o.Priority +} + +func (o *ResponseBodyRecords) GetCreator() string { + if o == nil { + return "" + } + return o.Creator +} + +func (o *ResponseBodyRecords) GetCreated() *float64 { + if o == nil { + return nil + } + return o.Created +} + +func (o *ResponseBodyRecords) GetUpdated() *float64 { + if o == nil { + return nil + } + return o.Updated +} + +func (o *ResponseBodyRecords) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *ResponseBodyRecords) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +// ResponseBody3 - Successful response retrieving a list of paginated DNS records. +type ResponseBody3 struct { + Records []ResponseBodyRecords `json:"records"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *ResponseBody3) GetRecords() []ResponseBodyRecords { + if o == nil { + return []ResponseBodyRecords{} + } + return o.Records +} + +func (o *ResponseBody3) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type GetRecordsResponseBodyType string + +const ( + GetRecordsResponseBodyTypeA GetRecordsResponseBodyType = "A" + GetRecordsResponseBodyTypeAaaa GetRecordsResponseBodyType = "AAAA" + GetRecordsResponseBodyTypeAlias GetRecordsResponseBodyType = "ALIAS" + GetRecordsResponseBodyTypeCaa GetRecordsResponseBodyType = "CAA" + GetRecordsResponseBodyTypeCname GetRecordsResponseBodyType = "CNAME" + GetRecordsResponseBodyTypeHTTPS GetRecordsResponseBodyType = "HTTPS" + GetRecordsResponseBodyTypeMx GetRecordsResponseBodyType = "MX" + GetRecordsResponseBodyTypeSrv GetRecordsResponseBodyType = "SRV" + GetRecordsResponseBodyTypeTxt GetRecordsResponseBodyType = "TXT" + GetRecordsResponseBodyTypeNs GetRecordsResponseBodyType = "NS" +) + +func (e GetRecordsResponseBodyType) ToPointer() *GetRecordsResponseBodyType { + return &e +} +func (e *GetRecordsResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = GetRecordsResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for GetRecordsResponseBodyType: %v", v) + } +} + +type Records struct { + ID string `json:"id"` + Slug string `json:"slug"` + Name string `json:"name"` + Type GetRecordsResponseBodyType `json:"type"` + Value string `json:"value"` + MxPriority *float64 `json:"mxPriority,omitempty"` + Priority *float64 `json:"priority,omitempty"` + Creator string `json:"creator"` + Created *float64 `json:"created"` + Updated *float64 `json:"updated"` + CreatedAt *float64 `json:"createdAt"` + UpdatedAt *float64 `json:"updatedAt"` +} + +func (o *Records) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Records) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *Records) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Records) GetType() GetRecordsResponseBodyType { + if o == nil { + return GetRecordsResponseBodyType("") + } + return o.Type +} + +func (o *Records) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Records) GetMxPriority() *float64 { + if o == nil { + return nil + } + return o.MxPriority +} + +func (o *Records) GetPriority() *float64 { + if o == nil { + return nil + } + return o.Priority +} + +func (o *Records) GetCreator() string { + if o == nil { + return "" + } + return o.Creator +} + +func (o *Records) GetCreated() *float64 { + if o == nil { + return nil + } + return o.Created +} + +func (o *Records) GetUpdated() *float64 { + if o == nil { + return nil + } + return o.Updated +} + +func (o *Records) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Records) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +type GetRecordsResponseBody2 struct { + Records []Records `json:"records"` +} + +func (o *GetRecordsResponseBody2) GetRecords() []Records { + if o == nil { + return []Records{} + } + return o.Records +} + +type GetRecordsResponseBodyUnionType string + +const ( + GetRecordsResponseBodyUnionTypeStr GetRecordsResponseBodyUnionType = "str" + GetRecordsResponseBodyUnionTypeGetRecordsResponseBody2 GetRecordsResponseBodyUnionType = "getRecords_responseBody_2" + GetRecordsResponseBodyUnionTypeResponseBody3 GetRecordsResponseBodyUnionType = "responseBody_3" +) + +// GetRecordsResponseBody - Successful response retrieving a list of paginated DNS records. +type GetRecordsResponseBody struct { + Str *string + GetRecordsResponseBody2 *GetRecordsResponseBody2 + ResponseBody3 *ResponseBody3 + + Type GetRecordsResponseBodyUnionType +} + +func CreateGetRecordsResponseBodyStr(str string) GetRecordsResponseBody { + typ := GetRecordsResponseBodyUnionTypeStr + + return GetRecordsResponseBody{ + Str: &str, + Type: typ, + } +} + +func CreateGetRecordsResponseBodyGetRecordsResponseBody2(getRecordsResponseBody2 GetRecordsResponseBody2) GetRecordsResponseBody { + typ := GetRecordsResponseBodyUnionTypeGetRecordsResponseBody2 + + return GetRecordsResponseBody{ + GetRecordsResponseBody2: &getRecordsResponseBody2, + Type: typ, + } +} + +func CreateGetRecordsResponseBodyResponseBody3(responseBody3 ResponseBody3) GetRecordsResponseBody { + typ := GetRecordsResponseBodyUnionTypeResponseBody3 + + return GetRecordsResponseBody{ + ResponseBody3: &responseBody3, + Type: typ, + } +} + +func (u *GetRecordsResponseBody) UnmarshalJSON(data []byte) error { + + var getRecordsResponseBody2 GetRecordsResponseBody2 = GetRecordsResponseBody2{} + if err := utils.UnmarshalJSON(data, &getRecordsResponseBody2, "", true, true); err == nil { + u.GetRecordsResponseBody2 = &getRecordsResponseBody2 + u.Type = GetRecordsResponseBodyUnionTypeGetRecordsResponseBody2 + return nil + } + + var responseBody3 ResponseBody3 = ResponseBody3{} + if err := utils.UnmarshalJSON(data, &responseBody3, "", true, true); err == nil { + u.ResponseBody3 = &responseBody3 + u.Type = GetRecordsResponseBodyUnionTypeResponseBody3 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetRecordsResponseBodyUnionTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetRecordsResponseBody", string(data)) +} + +func (u GetRecordsResponseBody) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.GetRecordsResponseBody2 != nil { + return utils.MarshalJSON(u.GetRecordsResponseBody2, "", true) + } + + if u.ResponseBody3 != nil { + return utils.MarshalJSON(u.ResponseBody3, "", true) + } + + return nil, errors.New("could not marshal union type GetRecordsResponseBody: all fields are null") +} + +type GetRecordsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response retrieving a list of paginated DNS records. + OneOf *GetRecordsResponseBody +} + +func (o *GetRecordsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetRecordsResponse) GetOneOf() *GetRecordsResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getteam.go b/src/__tests__/mockserver/internal/sdk/models/operations/getteam.go new file mode 100644 index 00000000..5311fd5a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getteam.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetTeamRequest struct { + Slug *string `queryParam:"style=form,explode=true,name=slug"` + // The Team identifier to perform the request on behalf of. + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` +} + +func (o *GetTeamRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *GetTeamRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +type GetTeamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The requested team + Team map[string]any +} + +func (o *GetTeamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetTeamResponse) GetTeam() map[string]any { + if o == nil { + return nil + } + return o.Team +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getteamaccessrequest.go b/src/__tests__/mockserver/internal/sdk/models/operations/getteamaccessrequest.go new file mode 100644 index 00000000..6b3bc7f5 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getteamaccessrequest.go @@ -0,0 +1,370 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetTeamAccessRequestRequest struct { + UserID string `pathParam:"style=simple,explode=false,name=userId"` + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` +} + +func (o *GetTeamAccessRequestRequest) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *GetTeamAccessRequestRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +type GetTeamAccessRequestOrigin string + +const ( + GetTeamAccessRequestOriginMail GetTeamAccessRequestOrigin = "mail" + GetTeamAccessRequestOriginLink GetTeamAccessRequestOrigin = "link" + GetTeamAccessRequestOriginImport GetTeamAccessRequestOrigin = "import" + GetTeamAccessRequestOriginTeams GetTeamAccessRequestOrigin = "teams" + GetTeamAccessRequestOriginGithub GetTeamAccessRequestOrigin = "github" + GetTeamAccessRequestOriginGitlab GetTeamAccessRequestOrigin = "gitlab" + GetTeamAccessRequestOriginBitbucket GetTeamAccessRequestOrigin = "bitbucket" + GetTeamAccessRequestOriginSaml GetTeamAccessRequestOrigin = "saml" + GetTeamAccessRequestOriginDsync GetTeamAccessRequestOrigin = "dsync" + GetTeamAccessRequestOriginFeedback GetTeamAccessRequestOrigin = "feedback" + GetTeamAccessRequestOriginOrganizationTeams GetTeamAccessRequestOrigin = "organization-teams" +) + +func (e GetTeamAccessRequestOrigin) ToPointer() *GetTeamAccessRequestOrigin { + return &e +} +func (e *GetTeamAccessRequestOrigin) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "mail": + fallthrough + case "link": + fallthrough + case "import": + fallthrough + case "teams": + fallthrough + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + fallthrough + case "saml": + fallthrough + case "dsync": + fallthrough + case "feedback": + fallthrough + case "organization-teams": + *e = GetTeamAccessRequestOrigin(v) + return nil + default: + return fmt.Errorf("invalid value for GetTeamAccessRequestOrigin: %v", v) + } +} + +type GetTeamAccessRequestGitUserIDType string + +const ( + GetTeamAccessRequestGitUserIDTypeStr GetTeamAccessRequestGitUserIDType = "str" + GetTeamAccessRequestGitUserIDTypeNumber GetTeamAccessRequestGitUserIDType = "number" +) + +type GetTeamAccessRequestGitUserID struct { + Str *string + Number *float64 + + Type GetTeamAccessRequestGitUserIDType +} + +func CreateGetTeamAccessRequestGitUserIDStr(str string) GetTeamAccessRequestGitUserID { + typ := GetTeamAccessRequestGitUserIDTypeStr + + return GetTeamAccessRequestGitUserID{ + Str: &str, + Type: typ, + } +} + +func CreateGetTeamAccessRequestGitUserIDNumber(number float64) GetTeamAccessRequestGitUserID { + typ := GetTeamAccessRequestGitUserIDTypeNumber + + return GetTeamAccessRequestGitUserID{ + Number: &number, + Type: typ, + } +} + +func (u *GetTeamAccessRequestGitUserID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetTeamAccessRequestGitUserIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetTeamAccessRequestGitUserIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetTeamAccessRequestGitUserID", string(data)) +} + +func (u GetTeamAccessRequestGitUserID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GetTeamAccessRequestGitUserID: all fields are null") +} + +// GetTeamAccessRequestJoinedFrom - A map that describes the origin from where the user joined. +type GetTeamAccessRequestJoinedFrom struct { + Origin GetTeamAccessRequestOrigin `json:"origin"` + CommitID *string `json:"commitId,omitempty"` + RepoID *string `json:"repoId,omitempty"` + RepoPath *string `json:"repoPath,omitempty"` + GitUserID *GetTeamAccessRequestGitUserID `json:"gitUserId,omitempty"` + GitUserLogin *string `json:"gitUserLogin,omitempty"` + SsoUserID *string `json:"ssoUserId,omitempty"` + SsoConnectedAt *float64 `json:"ssoConnectedAt,omitempty"` + IdpUserID *string `json:"idpUserId,omitempty"` + DsyncUserID *string `json:"dsyncUserId,omitempty"` + DsyncConnectedAt *float64 `json:"dsyncConnectedAt,omitempty"` +} + +func (o *GetTeamAccessRequestJoinedFrom) GetOrigin() GetTeamAccessRequestOrigin { + if o == nil { + return GetTeamAccessRequestOrigin("") + } + return o.Origin +} + +func (o *GetTeamAccessRequestJoinedFrom) GetCommitID() *string { + if o == nil { + return nil + } + return o.CommitID +} + +func (o *GetTeamAccessRequestJoinedFrom) GetRepoID() *string { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *GetTeamAccessRequestJoinedFrom) GetRepoPath() *string { + if o == nil { + return nil + } + return o.RepoPath +} + +func (o *GetTeamAccessRequestJoinedFrom) GetGitUserID() *GetTeamAccessRequestGitUserID { + if o == nil { + return nil + } + return o.GitUserID +} + +func (o *GetTeamAccessRequestJoinedFrom) GetGitUserLogin() *string { + if o == nil { + return nil + } + return o.GitUserLogin +} + +func (o *GetTeamAccessRequestJoinedFrom) GetSsoUserID() *string { + if o == nil { + return nil + } + return o.SsoUserID +} + +func (o *GetTeamAccessRequestJoinedFrom) GetSsoConnectedAt() *float64 { + if o == nil { + return nil + } + return o.SsoConnectedAt +} + +func (o *GetTeamAccessRequestJoinedFrom) GetIdpUserID() *string { + if o == nil { + return nil + } + return o.IdpUserID +} + +func (o *GetTeamAccessRequestJoinedFrom) GetDsyncUserID() *string { + if o == nil { + return nil + } + return o.DsyncUserID +} + +func (o *GetTeamAccessRequestJoinedFrom) GetDsyncConnectedAt() *float64 { + if o == nil { + return nil + } + return o.DsyncConnectedAt +} + +// GetTeamAccessRequestGithub - Map of the connected GitHub account. +type GetTeamAccessRequestGithub struct { + Login *string `json:"login,omitempty"` +} + +func (o *GetTeamAccessRequestGithub) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +// GetTeamAccessRequestGitlab - Map of the connected GitLab account. +type GetTeamAccessRequestGitlab struct { + Login *string `json:"login,omitempty"` +} + +func (o *GetTeamAccessRequestGitlab) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +// GetTeamAccessRequestBitbucket - Map of the connected Bitbucket account. +type GetTeamAccessRequestBitbucket struct { + Login *string `json:"login,omitempty"` +} + +func (o *GetTeamAccessRequestBitbucket) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +// GetTeamAccessRequestResponseBody - Successfully +type GetTeamAccessRequestResponseBody struct { + // The slug of the team. + TeamSlug string `json:"teamSlug"` + // The name of the team. + TeamName string `json:"teamName"` + // Current status of the membership. Will be `true` if confirmed, if pending it'll be `false`. + Confirmed bool `json:"confirmed"` + // A map that describes the origin from where the user joined. + JoinedFrom GetTeamAccessRequestJoinedFrom `json:"joinedFrom"` + // Timestamp in milliseconds when the user requested access to the team. + AccessRequestedAt float64 `json:"accessRequestedAt"` + // Map of the connected GitHub account. + Github *GetTeamAccessRequestGithub `json:"github"` + // Map of the connected GitLab account. + Gitlab *GetTeamAccessRequestGitlab `json:"gitlab"` + // Map of the connected Bitbucket account. + Bitbucket *GetTeamAccessRequestBitbucket `json:"bitbucket"` +} + +func (o *GetTeamAccessRequestResponseBody) GetTeamSlug() string { + if o == nil { + return "" + } + return o.TeamSlug +} + +func (o *GetTeamAccessRequestResponseBody) GetTeamName() string { + if o == nil { + return "" + } + return o.TeamName +} + +func (o *GetTeamAccessRequestResponseBody) GetConfirmed() bool { + if o == nil { + return false + } + return o.Confirmed +} + +func (o *GetTeamAccessRequestResponseBody) GetJoinedFrom() GetTeamAccessRequestJoinedFrom { + if o == nil { + return GetTeamAccessRequestJoinedFrom{} + } + return o.JoinedFrom +} + +func (o *GetTeamAccessRequestResponseBody) GetAccessRequestedAt() float64 { + if o == nil { + return 0.0 + } + return o.AccessRequestedAt +} + +func (o *GetTeamAccessRequestResponseBody) GetGithub() *GetTeamAccessRequestGithub { + if o == nil { + return nil + } + return o.Github +} + +func (o *GetTeamAccessRequestResponseBody) GetGitlab() *GetTeamAccessRequestGitlab { + if o == nil { + return nil + } + return o.Gitlab +} + +func (o *GetTeamAccessRequestResponseBody) GetBitbucket() *GetTeamAccessRequestBitbucket { + if o == nil { + return nil + } + return o.Bitbucket +} + +type GetTeamAccessRequestResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successfully + Object *GetTeamAccessRequestResponseBody +} + +func (o *GetTeamAccessRequestResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetTeamAccessRequestResponse) GetObject() *GetTeamAccessRequestResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getteammembers.go b/src/__tests__/mockserver/internal/sdk/models/operations/getteammembers.go new file mode 100644 index 00000000..d30b2b79 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getteammembers.go @@ -0,0 +1,829 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// QueryParamRole - Only return members with the specified team role. +type QueryParamRole string + +const ( + QueryParamRoleOwner QueryParamRole = "OWNER" + QueryParamRoleMember QueryParamRole = "MEMBER" + QueryParamRoleDeveloper QueryParamRole = "DEVELOPER" + QueryParamRoleViewer QueryParamRole = "VIEWER" + QueryParamRoleBilling QueryParamRole = "BILLING" + QueryParamRoleContributor QueryParamRole = "CONTRIBUTOR" +) + +func (e QueryParamRole) ToPointer() *QueryParamRole { + return &e +} +func (e *QueryParamRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "VIEWER": + fallthrough + case "BILLING": + fallthrough + case "CONTRIBUTOR": + *e = QueryParamRole(v) + return nil + default: + return fmt.Errorf("invalid value for QueryParamRole: %v", v) + } +} + +type GetTeamMembersRequest struct { + // Limit how many teams should be returned + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Timestamp in milliseconds to only include members added since then. + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Timestamp in milliseconds to only include members added until then. + Until *float64 `queryParam:"style=form,explode=true,name=until"` + // Search team members by their name, username, and email. + Search *string `queryParam:"style=form,explode=true,name=search"` + // Only return members with the specified team role. + Role *QueryParamRole `queryParam:"style=form,explode=true,name=role"` + // Exclude members who belong to the specified project. + ExcludeProject *string `queryParam:"style=form,explode=true,name=excludeProject"` + // Include team members who are eligible to be members of the specified project. + EligibleMembersForProjectID *string `queryParam:"style=form,explode=true,name=eligibleMembersForProjectId"` + // The Team identifier to perform the request on behalf of. + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` +} + +func (o *GetTeamMembersRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetTeamMembersRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetTeamMembersRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *GetTeamMembersRequest) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +func (o *GetTeamMembersRequest) GetRole() *QueryParamRole { + if o == nil { + return nil + } + return o.Role +} + +func (o *GetTeamMembersRequest) GetExcludeProject() *string { + if o == nil { + return nil + } + return o.ExcludeProject +} + +func (o *GetTeamMembersRequest) GetEligibleMembersForProjectID() *string { + if o == nil { + return nil + } + return o.EligibleMembersForProjectID +} + +func (o *GetTeamMembersRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +// GetTeamMembersGithub - Information about the GitHub account for this user. +type GetTeamMembersGithub struct { + Login *string `json:"login,omitempty"` +} + +func (o *GetTeamMembersGithub) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +// GetTeamMembersGitlab - Information about the GitLab account of this user. +type GetTeamMembersGitlab struct { + Login *string `json:"login,omitempty"` +} + +func (o *GetTeamMembersGitlab) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +// GetTeamMembersBitbucket - Information about the Bitbucket account of this user. +type GetTeamMembersBitbucket struct { + Login *string `json:"login,omitempty"` +} + +func (o *GetTeamMembersBitbucket) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +// GetTeamMembersRole - Role of this user in the team. +type GetTeamMembersRole string + +const ( + GetTeamMembersRoleOwner GetTeamMembersRole = "OWNER" + GetTeamMembersRoleMember GetTeamMembersRole = "MEMBER" + GetTeamMembersRoleDeveloper GetTeamMembersRole = "DEVELOPER" + GetTeamMembersRoleViewer GetTeamMembersRole = "VIEWER" + GetTeamMembersRoleBilling GetTeamMembersRole = "BILLING" + GetTeamMembersRoleContributor GetTeamMembersRole = "CONTRIBUTOR" +) + +func (e GetTeamMembersRole) ToPointer() *GetTeamMembersRole { + return &e +} +func (e *GetTeamMembersRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "VIEWER": + fallthrough + case "BILLING": + fallthrough + case "CONTRIBUTOR": + *e = GetTeamMembersRole(v) + return nil + default: + return fmt.Errorf("invalid value for GetTeamMembersRole: %v", v) + } +} + +type GetTeamMembersOrigin string + +const ( + GetTeamMembersOriginTeams GetTeamMembersOrigin = "teams" + GetTeamMembersOriginLink GetTeamMembersOrigin = "link" + GetTeamMembersOriginMail GetTeamMembersOrigin = "mail" + GetTeamMembersOriginImport GetTeamMembersOrigin = "import" + GetTeamMembersOriginGithub GetTeamMembersOrigin = "github" + GetTeamMembersOriginGitlab GetTeamMembersOrigin = "gitlab" + GetTeamMembersOriginBitbucket GetTeamMembersOrigin = "bitbucket" + GetTeamMembersOriginSaml GetTeamMembersOrigin = "saml" + GetTeamMembersOriginDsync GetTeamMembersOrigin = "dsync" + GetTeamMembersOriginFeedback GetTeamMembersOrigin = "feedback" + GetTeamMembersOriginOrganizationTeams GetTeamMembersOrigin = "organization-teams" +) + +func (e GetTeamMembersOrigin) ToPointer() *GetTeamMembersOrigin { + return &e +} +func (e *GetTeamMembersOrigin) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "teams": + fallthrough + case "link": + fallthrough + case "mail": + fallthrough + case "import": + fallthrough + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + fallthrough + case "saml": + fallthrough + case "dsync": + fallthrough + case "feedback": + fallthrough + case "organization-teams": + *e = GetTeamMembersOrigin(v) + return nil + default: + return fmt.Errorf("invalid value for GetTeamMembersOrigin: %v", v) + } +} + +type GetTeamMembersGitUserIDType string + +const ( + GetTeamMembersGitUserIDTypeStr GetTeamMembersGitUserIDType = "str" + GetTeamMembersGitUserIDTypeNumber GetTeamMembersGitUserIDType = "number" +) + +type GetTeamMembersGitUserID struct { + Str *string + Number *float64 + + Type GetTeamMembersGitUserIDType +} + +func CreateGetTeamMembersGitUserIDStr(str string) GetTeamMembersGitUserID { + typ := GetTeamMembersGitUserIDTypeStr + + return GetTeamMembersGitUserID{ + Str: &str, + Type: typ, + } +} + +func CreateGetTeamMembersGitUserIDNumber(number float64) GetTeamMembersGitUserID { + typ := GetTeamMembersGitUserIDTypeNumber + + return GetTeamMembersGitUserID{ + Number: &number, + Type: typ, + } +} + +func (u *GetTeamMembersGitUserID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GetTeamMembersGitUserIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GetTeamMembersGitUserIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetTeamMembersGitUserID", string(data)) +} + +func (u GetTeamMembersGitUserID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GetTeamMembersGitUserID: all fields are null") +} + +// GetTeamMembersJoinedFrom - Map with information about the members origin if they joined by requesting access. +type GetTeamMembersJoinedFrom struct { + Origin GetTeamMembersOrigin `json:"origin"` + CommitID *string `json:"commitId,omitempty"` + RepoID *string `json:"repoId,omitempty"` + RepoPath *string `json:"repoPath,omitempty"` + GitUserID *GetTeamMembersGitUserID `json:"gitUserId,omitempty"` + GitUserLogin *string `json:"gitUserLogin,omitempty"` + SsoUserID *string `json:"ssoUserId,omitempty"` + SsoConnectedAt *float64 `json:"ssoConnectedAt,omitempty"` + IdpUserID *string `json:"idpUserId,omitempty"` + DsyncUserID *string `json:"dsyncUserId,omitempty"` + DsyncConnectedAt *float64 `json:"dsyncConnectedAt,omitempty"` +} + +func (o *GetTeamMembersJoinedFrom) GetOrigin() GetTeamMembersOrigin { + if o == nil { + return GetTeamMembersOrigin("") + } + return o.Origin +} + +func (o *GetTeamMembersJoinedFrom) GetCommitID() *string { + if o == nil { + return nil + } + return o.CommitID +} + +func (o *GetTeamMembersJoinedFrom) GetRepoID() *string { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *GetTeamMembersJoinedFrom) GetRepoPath() *string { + if o == nil { + return nil + } + return o.RepoPath +} + +func (o *GetTeamMembersJoinedFrom) GetGitUserID() *GetTeamMembersGitUserID { + if o == nil { + return nil + } + return o.GitUserID +} + +func (o *GetTeamMembersJoinedFrom) GetGitUserLogin() *string { + if o == nil { + return nil + } + return o.GitUserLogin +} + +func (o *GetTeamMembersJoinedFrom) GetSsoUserID() *string { + if o == nil { + return nil + } + return o.SsoUserID +} + +func (o *GetTeamMembersJoinedFrom) GetSsoConnectedAt() *float64 { + if o == nil { + return nil + } + return o.SsoConnectedAt +} + +func (o *GetTeamMembersJoinedFrom) GetIdpUserID() *string { + if o == nil { + return nil + } + return o.IdpUserID +} + +func (o *GetTeamMembersJoinedFrom) GetDsyncUserID() *string { + if o == nil { + return nil + } + return o.DsyncUserID +} + +func (o *GetTeamMembersJoinedFrom) GetDsyncConnectedAt() *float64 { + if o == nil { + return nil + } + return o.DsyncConnectedAt +} + +type GetTeamMembersTeamsResponseRole string + +const ( + GetTeamMembersTeamsResponseRoleAdmin GetTeamMembersTeamsResponseRole = "ADMIN" + GetTeamMembersTeamsResponseRoleProjectDeveloper GetTeamMembersTeamsResponseRole = "PROJECT_DEVELOPER" + GetTeamMembersTeamsResponseRoleProjectViewer GetTeamMembersTeamsResponseRole = "PROJECT_VIEWER" +) + +func (e GetTeamMembersTeamsResponseRole) ToPointer() *GetTeamMembersTeamsResponseRole { + return &e +} +func (e *GetTeamMembersTeamsResponseRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = GetTeamMembersTeamsResponseRole(v) + return nil + default: + return fmt.Errorf("invalid value for GetTeamMembersTeamsResponseRole: %v", v) + } +} + +// GetTeamMembersProjects - Array of project memberships +type GetTeamMembersProjects struct { + Name *string `json:"name,omitempty"` + ID *string `json:"id,omitempty"` + Role *GetTeamMembersTeamsResponseRole `json:"role,omitempty"` +} + +func (o *GetTeamMembersProjects) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *GetTeamMembersProjects) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetTeamMembersProjects) GetRole() *GetTeamMembersTeamsResponseRole { + if o == nil { + return nil + } + return o.Role +} + +type GetTeamMembersMembers struct { + // ID of the file for the Avatar of this member. + Avatar *string `json:"avatar,omitempty"` + // Boolean that indicates if this member was confirmed by an owner. + Confirmed bool `json:"confirmed"` + // The email of this member. + Email string `json:"email"` + // Information about the GitHub account for this user. + Github *GetTeamMembersGithub `json:"github,omitempty"` + // Information about the GitLab account of this user. + Gitlab *GetTeamMembersGitlab `json:"gitlab,omitempty"` + // Information about the Bitbucket account of this user. + Bitbucket *GetTeamMembersBitbucket `json:"bitbucket,omitempty"` + // Role of this user in the team. + Role GetTeamMembersRole `json:"role"` + // Permissions that this user has in addition to their role. + AdditionalRoles []string `json:"additionalRoles,omitempty"` + // The ID of this user. + UID string `json:"uid"` + // The unique username of this user. + Username string `json:"username"` + // The name of this user. + Name *string `json:"name,omitempty"` + // Timestamp in milliseconds when this member was added. + CreatedAt float64 `json:"createdAt"` + // Timestamp in milliseconds for when this team member was accepted by an owner. + AccessRequestedAt *float64 `json:"accessRequestedAt,omitempty"` + // Map with information about the members origin if they joined by requesting access. + JoinedFrom *GetTeamMembersJoinedFrom `json:"joinedFrom,omitempty"` + // Array of project memberships + Projects []GetTeamMembersProjects `json:"projects,omitempty"` +} + +func (o *GetTeamMembersMembers) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +func (o *GetTeamMembersMembers) GetConfirmed() bool { + if o == nil { + return false + } + return o.Confirmed +} + +func (o *GetTeamMembersMembers) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *GetTeamMembersMembers) GetGithub() *GetTeamMembersGithub { + if o == nil { + return nil + } + return o.Github +} + +func (o *GetTeamMembersMembers) GetGitlab() *GetTeamMembersGitlab { + if o == nil { + return nil + } + return o.Gitlab +} + +func (o *GetTeamMembersMembers) GetBitbucket() *GetTeamMembersBitbucket { + if o == nil { + return nil + } + return o.Bitbucket +} + +func (o *GetTeamMembersMembers) GetRole() GetTeamMembersRole { + if o == nil { + return GetTeamMembersRole("") + } + return o.Role +} + +func (o *GetTeamMembersMembers) GetAdditionalRoles() []string { + if o == nil { + return nil + } + return o.AdditionalRoles +} + +func (o *GetTeamMembersMembers) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *GetTeamMembersMembers) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *GetTeamMembersMembers) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *GetTeamMembersMembers) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetTeamMembersMembers) GetAccessRequestedAt() *float64 { + if o == nil { + return nil + } + return o.AccessRequestedAt +} + +func (o *GetTeamMembersMembers) GetJoinedFrom() *GetTeamMembersJoinedFrom { + if o == nil { + return nil + } + return o.JoinedFrom +} + +func (o *GetTeamMembersMembers) GetProjects() []GetTeamMembersProjects { + if o == nil { + return nil + } + return o.Projects +} + +type GetTeamMembersTeamsRole string + +const ( + GetTeamMembersTeamsRoleOwner GetTeamMembersTeamsRole = "OWNER" + GetTeamMembersTeamsRoleMember GetTeamMembersTeamsRole = "MEMBER" + GetTeamMembersTeamsRoleDeveloper GetTeamMembersTeamsRole = "DEVELOPER" + GetTeamMembersTeamsRoleViewer GetTeamMembersTeamsRole = "VIEWER" + GetTeamMembersTeamsRoleBilling GetTeamMembersTeamsRole = "BILLING" + GetTeamMembersTeamsRoleContributor GetTeamMembersTeamsRole = "CONTRIBUTOR" +) + +func (e GetTeamMembersTeamsRole) ToPointer() *GetTeamMembersTeamsRole { + return &e +} +func (e *GetTeamMembersTeamsRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "VIEWER": + fallthrough + case "BILLING": + fallthrough + case "CONTRIBUTOR": + *e = GetTeamMembersTeamsRole(v) + return nil + default: + return fmt.Errorf("invalid value for GetTeamMembersTeamsRole: %v", v) + } +} + +type GetTeamMembersTeamsProjects string + +const ( + GetTeamMembersTeamsProjectsAdmin GetTeamMembersTeamsProjects = "ADMIN" + GetTeamMembersTeamsProjectsProjectDeveloper GetTeamMembersTeamsProjects = "PROJECT_DEVELOPER" + GetTeamMembersTeamsProjectsProjectViewer GetTeamMembersTeamsProjects = "PROJECT_VIEWER" +) + +func (e GetTeamMembersTeamsProjects) ToPointer() *GetTeamMembersTeamsProjects { + return &e +} +func (e *GetTeamMembersTeamsProjects) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = GetTeamMembersTeamsProjects(v) + return nil + default: + return fmt.Errorf("invalid value for GetTeamMembersTeamsProjects: %v", v) + } +} + +type EmailInviteCodes struct { + AccessGroups []string `json:"accessGroups,omitempty"` + ID string `json:"id"` + Email *string `json:"email,omitempty"` + Role *GetTeamMembersTeamsRole `json:"role,omitempty"` + IsDSyncUser bool `json:"isDSyncUser"` + CreatedAt *float64 `json:"createdAt,omitempty"` + Expired *bool `json:"expired,omitempty"` + Projects map[string]GetTeamMembersTeamsProjects `json:"projects,omitempty"` + Entitlements []string `json:"entitlements,omitempty"` +} + +func (o *EmailInviteCodes) GetAccessGroups() []string { + if o == nil { + return nil + } + return o.AccessGroups +} + +func (o *EmailInviteCodes) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *EmailInviteCodes) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *EmailInviteCodes) GetRole() *GetTeamMembersTeamsRole { + if o == nil { + return nil + } + return o.Role +} + +func (o *EmailInviteCodes) GetIsDSyncUser() bool { + if o == nil { + return false + } + return o.IsDSyncUser +} + +func (o *EmailInviteCodes) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *EmailInviteCodes) GetExpired() *bool { + if o == nil { + return nil + } + return o.Expired +} + +func (o *EmailInviteCodes) GetProjects() map[string]GetTeamMembersTeamsProjects { + if o == nil { + return nil + } + return o.Projects +} + +func (o *EmailInviteCodes) GetEntitlements() []string { + if o == nil { + return nil + } + return o.Entitlements +} + +type GetTeamMembersPagination struct { + HasNext bool `json:"hasNext"` + // Amount of items in the current page. + Count float64 `json:"count"` + // Timestamp that must be used to request the next page. + Next *float64 `json:"next"` + // Timestamp that must be used to request the previous page. + Prev *float64 `json:"prev"` +} + +func (o *GetTeamMembersPagination) GetHasNext() bool { + if o == nil { + return false + } + return o.HasNext +} + +func (o *GetTeamMembersPagination) GetCount() float64 { + if o == nil { + return 0.0 + } + return o.Count +} + +func (o *GetTeamMembersPagination) GetNext() *float64 { + if o == nil { + return nil + } + return o.Next +} + +func (o *GetTeamMembersPagination) GetPrev() *float64 { + if o == nil { + return nil + } + return o.Prev +} + +type GetTeamMembersResponseBody struct { + Members []GetTeamMembersMembers `json:"members"` + EmailInviteCodes []EmailInviteCodes `json:"emailInviteCodes,omitempty"` + Pagination GetTeamMembersPagination `json:"pagination"` +} + +func (o *GetTeamMembersResponseBody) GetMembers() []GetTeamMembersMembers { + if o == nil { + return []GetTeamMembersMembers{} + } + return o.Members +} + +func (o *GetTeamMembersResponseBody) GetEmailInviteCodes() []EmailInviteCodes { + if o == nil { + return nil + } + return o.EmailInviteCodes +} + +func (o *GetTeamMembersResponseBody) GetPagination() GetTeamMembersPagination { + if o == nil { + return GetTeamMembersPagination{} + } + return o.Pagination +} + +type GetTeamMembersResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetTeamMembersResponseBody +} + +func (o *GetTeamMembersResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetTeamMembersResponse) GetObject() *GetTeamMembersResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getteams.go b/src/__tests__/mockserver/internal/sdk/models/operations/getteams.go new file mode 100644 index 00000000..9b7620af --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getteams.go @@ -0,0 +1,144 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetTeamsRequest struct { + // Maximum number of Teams which may be returned. + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Timestamp (in milliseconds) to only include Teams created since then. + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Timestamp (in milliseconds) to only include Teams created until then. + Until *float64 `queryParam:"style=form,explode=true,name=until"` +} + +func (o *GetTeamsRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *GetTeamsRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *GetTeamsRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +type TeamsType string + +const ( + TeamsTypeMapOfAny TeamsType = "mapOfAny" + TeamsTypeTeamLimited TeamsType = "TeamLimited" +) + +type Teams struct { + MapOfAny map[string]any + TeamLimited *components.TeamLimited + + Type TeamsType +} + +func CreateTeamsMapOfAny(mapOfAny map[string]any) Teams { + typ := TeamsTypeMapOfAny + + return Teams{ + MapOfAny: mapOfAny, + Type: typ, + } +} + +func CreateTeamsTeamLimited(teamLimited components.TeamLimited) Teams { + typ := TeamsTypeTeamLimited + + return Teams{ + TeamLimited: &teamLimited, + Type: typ, + } +} + +func (u *Teams) UnmarshalJSON(data []byte) error { + + var teamLimited components.TeamLimited = components.TeamLimited{} + if err := utils.UnmarshalJSON(data, &teamLimited, "", true, true); err == nil { + u.TeamLimited = &teamLimited + u.Type = TeamsTypeTeamLimited + return nil + } + + var mapOfAny map[string]any = map[string]any{} + if err := utils.UnmarshalJSON(data, &mapOfAny, "", true, true); err == nil { + u.MapOfAny = mapOfAny + u.Type = TeamsTypeMapOfAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Teams", string(data)) +} + +func (u Teams) MarshalJSON() ([]byte, error) { + if u.MapOfAny != nil { + return utils.MarshalJSON(u.MapOfAny, "", true) + } + + if u.TeamLimited != nil { + return utils.MarshalJSON(u.TeamLimited, "", true) + } + + return nil, errors.New("could not marshal union type Teams: all fields are null") +} + +// GetTeamsResponseBody - A paginated list of teams. +type GetTeamsResponseBody struct { + Teams []Teams `json:"teams"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *GetTeamsResponseBody) GetTeams() []Teams { + if o == nil { + return []Teams{} + } + return o.Teams +} + +func (o *GetTeamsResponseBody) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type GetTeamsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // A paginated list of teams. + Object *GetTeamsResponseBody +} + +func (o *GetTeamsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetTeamsResponse) GetObject() *GetTeamsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getv9projectsidornamecustomenvironments.go b/src/__tests__/mockserver/internal/sdk/models/operations/getv9projectsidornamecustomenvironments.go new file mode 100644 index 00000000..1b360dca --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getv9projectsidornamecustomenvironments.go @@ -0,0 +1,79 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetV9ProjectsIDOrNameCustomEnvironmentsRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // Fetch custom environments for a specific git branch + GitBranch *string `queryParam:"style=form,explode=true,name=gitBranch"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsRequest) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetV9ProjectsIDOrNameCustomEnvironmentsEnvironments struct { +} + +type GetV9ProjectsIDOrNameCustomEnvironmentsResponseBody struct { + Environments []GetV9ProjectsIDOrNameCustomEnvironmentsEnvironments `json:"environments"` +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsResponseBody) GetEnvironments() []GetV9ProjectsIDOrNameCustomEnvironmentsEnvironments { + if o == nil { + return []GetV9ProjectsIDOrNameCustomEnvironmentsEnvironments{} + } + return o.Environments +} + +type GetV9ProjectsIDOrNameCustomEnvironmentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetV9ProjectsIDOrNameCustomEnvironmentsResponseBody +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsResponse) GetObject() *GetV9ProjectsIDOrNameCustomEnvironmentsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getv9projectsidornamecustomenvironmentsenvironmentslugorid.go b/src/__tests__/mockserver/internal/sdk/models/operations/getv9projectsidornamecustomenvironmentsenvironmentslugorid.go new file mode 100644 index 00000000..29c51b4a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getv9projectsidornamecustomenvironmentsenvironmentslugorid.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The unique custom environment identifier within the project + EnvironmentSlugOrID string `pathParam:"style=simple,explode=false,name=environmentSlugOrId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetEnvironmentSlugOrID() string { + if o == nil { + return "" + } + return o.EnvironmentSlugOrID +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody struct { +} + +type GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse) GetObject() *GetV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getwebhook.go b/src/__tests__/mockserver/internal/sdk/models/operations/getwebhook.go new file mode 100644 index 00000000..c9c4becd --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getwebhook.go @@ -0,0 +1,273 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type GetWebhookRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetWebhookRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetWebhookRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetWebhookRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetWebhookEvents - The webhooks events +type GetWebhookEvents string + +const ( + GetWebhookEventsBudgetReached GetWebhookEvents = "budget.reached" + GetWebhookEventsBudgetReset GetWebhookEvents = "budget.reset" + GetWebhookEventsDomainCreated GetWebhookEvents = "domain.created" + GetWebhookEventsDeploymentCreated GetWebhookEvents = "deployment.created" + GetWebhookEventsDeploymentError GetWebhookEvents = "deployment.error" + GetWebhookEventsDeploymentCanceled GetWebhookEvents = "deployment.canceled" + GetWebhookEventsDeploymentSucceeded GetWebhookEvents = "deployment.succeeded" + GetWebhookEventsDeploymentReady GetWebhookEvents = "deployment.ready" + GetWebhookEventsDeploymentCheckRerequested GetWebhookEvents = "deployment.check-rerequested" + GetWebhookEventsDeploymentPromoted GetWebhookEvents = "deployment.promoted" + GetWebhookEventsDeploymentIntegrationActionStart GetWebhookEvents = "deployment.integration.action.start" + GetWebhookEventsDeploymentIntegrationActionCancel GetWebhookEvents = "deployment.integration.action.cancel" + GetWebhookEventsDeploymentIntegrationActionCleanup GetWebhookEvents = "deployment.integration.action.cleanup" + GetWebhookEventsEdgeConfigCreated GetWebhookEvents = "edge-config.created" + GetWebhookEventsEdgeConfigDeleted GetWebhookEvents = "edge-config.deleted" + GetWebhookEventsEdgeConfigItemsUpdated GetWebhookEvents = "edge-config.items.updated" + GetWebhookEventsFirewallAttack GetWebhookEvents = "firewall.attack" + GetWebhookEventsIntegrationConfigurationPermissionUpgraded GetWebhookEvents = "integration-configuration.permission-upgraded" + GetWebhookEventsIntegrationConfigurationRemoved GetWebhookEvents = "integration-configuration.removed" + GetWebhookEventsIntegrationConfigurationScopeChangeConfirmed GetWebhookEvents = "integration-configuration.scope-change-confirmed" + GetWebhookEventsIntegrationResourceProjectConnected GetWebhookEvents = "integration-resource.project-connected" + GetWebhookEventsIntegrationResourceProjectDisconnected GetWebhookEvents = "integration-resource.project-disconnected" + GetWebhookEventsProjectCreated GetWebhookEvents = "project.created" + GetWebhookEventsProjectRemoved GetWebhookEvents = "project.removed" + GetWebhookEventsDeploymentChecksCompletedLegacy GetWebhookEvents = "deployment-checks-completed" + GetWebhookEventsDeploymentReadyLegacy GetWebhookEvents = "deployment-ready" + GetWebhookEventsDeploymentPreparedLegacy GetWebhookEvents = "deployment-prepared" + GetWebhookEventsDeploymentErrorLegacy GetWebhookEvents = "deployment-error" + GetWebhookEventsDeploymentCheckRerequestedLegacy GetWebhookEvents = "deployment-check-rerequested" + GetWebhookEventsDeploymentCanceledLegacy GetWebhookEvents = "deployment-canceled" + GetWebhookEventsProjectCreatedLegacy GetWebhookEvents = "project-created" + GetWebhookEventsProjectRemovedLegacy GetWebhookEvents = "project-removed" + GetWebhookEventsDomainCreatedLegacy GetWebhookEvents = "domain-created" + GetWebhookEventsDeploymentLegacy GetWebhookEvents = "deployment" + GetWebhookEventsIntegrationConfigurationPermissionUpdatedLegacy GetWebhookEvents = "integration-configuration-permission-updated" + GetWebhookEventsIntegrationConfigurationRemovedLegacy GetWebhookEvents = "integration-configuration-removed" + GetWebhookEventsIntegrationConfigurationScopeChangeConfirmedLegacy GetWebhookEvents = "integration-configuration-scope-change-confirmed" + GetWebhookEventsMarketplaceInvoiceCreated GetWebhookEvents = "marketplace.invoice.created" + GetWebhookEventsMarketplaceInvoicePaid GetWebhookEvents = "marketplace.invoice.paid" + GetWebhookEventsMarketplaceInvoiceNotpaid GetWebhookEvents = "marketplace.invoice.notpaid" + GetWebhookEventsMarketplaceInvoiceRefunded GetWebhookEvents = "marketplace.invoice.refunded" + GetWebhookEventsObservabilityAnomaly GetWebhookEvents = "observability.anomaly" + GetWebhookEventsTestWebhook GetWebhookEvents = "test-webhook" +) + +func (e GetWebhookEvents) ToPointer() *GetWebhookEvents { + return &e +} +func (e *GetWebhookEvents) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "budget.reached": + fallthrough + case "budget.reset": + fallthrough + case "domain.created": + fallthrough + case "deployment.created": + fallthrough + case "deployment.error": + fallthrough + case "deployment.canceled": + fallthrough + case "deployment.succeeded": + fallthrough + case "deployment.ready": + fallthrough + case "deployment.check-rerequested": + fallthrough + case "deployment.promoted": + fallthrough + case "deployment.integration.action.start": + fallthrough + case "deployment.integration.action.cancel": + fallthrough + case "deployment.integration.action.cleanup": + fallthrough + case "edge-config.created": + fallthrough + case "edge-config.deleted": + fallthrough + case "edge-config.items.updated": + fallthrough + case "firewall.attack": + fallthrough + case "integration-configuration.permission-upgraded": + fallthrough + case "integration-configuration.removed": + fallthrough + case "integration-configuration.scope-change-confirmed": + fallthrough + case "integration-resource.project-connected": + fallthrough + case "integration-resource.project-disconnected": + fallthrough + case "project.created": + fallthrough + case "project.removed": + fallthrough + case "deployment-checks-completed": + fallthrough + case "deployment-ready": + fallthrough + case "deployment-prepared": + fallthrough + case "deployment-error": + fallthrough + case "deployment-check-rerequested": + fallthrough + case "deployment-canceled": + fallthrough + case "project-created": + fallthrough + case "project-removed": + fallthrough + case "domain-created": + fallthrough + case "deployment": + fallthrough + case "integration-configuration-permission-updated": + fallthrough + case "integration-configuration-removed": + fallthrough + case "integration-configuration-scope-change-confirmed": + fallthrough + case "marketplace.invoice.created": + fallthrough + case "marketplace.invoice.paid": + fallthrough + case "marketplace.invoice.notpaid": + fallthrough + case "marketplace.invoice.refunded": + fallthrough + case "observability.anomaly": + fallthrough + case "test-webhook": + *e = GetWebhookEvents(v) + return nil + default: + return fmt.Errorf("invalid value for GetWebhookEvents: %v", v) + } +} + +type GetWebhookResponseBody struct { + // The webhooks events + Events []GetWebhookEvents `json:"events"` + // The webhook id + ID string `json:"id"` + // A string with the URL of the webhook + URL string `json:"url"` + // The unique ID of the team the webhook belongs to + OwnerID string `json:"ownerId"` + // A number containing the date when the webhook was created in in milliseconds + CreatedAt float64 `json:"createdAt"` + // A number containing the date when the webhook was updated in in milliseconds + UpdatedAt float64 `json:"updatedAt"` + // The ID of the projects the webhook is associated with + ProjectIds []string `json:"projectIds,omitempty"` +} + +func (o *GetWebhookResponseBody) GetEvents() []GetWebhookEvents { + if o == nil { + return []GetWebhookEvents{} + } + return o.Events +} + +func (o *GetWebhookResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetWebhookResponseBody) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetWebhookResponseBody) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetWebhookResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetWebhookResponseBody) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetWebhookResponseBody) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +type GetWebhookResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *GetWebhookResponseBody +} + +func (o *GetWebhookResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetWebhookResponse) GetObject() *GetWebhookResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/getwebhooks.go b/src/__tests__/mockserver/internal/sdk/models/operations/getwebhooks.go new file mode 100644 index 00000000..778bf92b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/getwebhooks.go @@ -0,0 +1,752 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type GetWebhooksRequest struct { + ProjectID *string `queryParam:"style=form,explode=true,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *GetWebhooksRequest) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *GetWebhooksRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *GetWebhooksRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// GetWebhooksResponseBodyEvents - The webhooks events +type GetWebhooksResponseBodyEvents string + +const ( + GetWebhooksResponseBodyEventsBudgetReached GetWebhooksResponseBodyEvents = "budget.reached" + GetWebhooksResponseBodyEventsBudgetReset GetWebhooksResponseBodyEvents = "budget.reset" + GetWebhooksResponseBodyEventsDomainCreated GetWebhooksResponseBodyEvents = "domain.created" + GetWebhooksResponseBodyEventsDeploymentCreated GetWebhooksResponseBodyEvents = "deployment.created" + GetWebhooksResponseBodyEventsDeploymentError GetWebhooksResponseBodyEvents = "deployment.error" + GetWebhooksResponseBodyEventsDeploymentCanceled GetWebhooksResponseBodyEvents = "deployment.canceled" + GetWebhooksResponseBodyEventsDeploymentSucceeded GetWebhooksResponseBodyEvents = "deployment.succeeded" + GetWebhooksResponseBodyEventsDeploymentReady GetWebhooksResponseBodyEvents = "deployment.ready" + GetWebhooksResponseBodyEventsDeploymentCheckRerequested GetWebhooksResponseBodyEvents = "deployment.check-rerequested" + GetWebhooksResponseBodyEventsDeploymentPromoted GetWebhooksResponseBodyEvents = "deployment.promoted" + GetWebhooksResponseBodyEventsDeploymentIntegrationActionStart GetWebhooksResponseBodyEvents = "deployment.integration.action.start" + GetWebhooksResponseBodyEventsDeploymentIntegrationActionCancel GetWebhooksResponseBodyEvents = "deployment.integration.action.cancel" + GetWebhooksResponseBodyEventsDeploymentIntegrationActionCleanup GetWebhooksResponseBodyEvents = "deployment.integration.action.cleanup" + GetWebhooksResponseBodyEventsEdgeConfigCreated GetWebhooksResponseBodyEvents = "edge-config.created" + GetWebhooksResponseBodyEventsEdgeConfigDeleted GetWebhooksResponseBodyEvents = "edge-config.deleted" + GetWebhooksResponseBodyEventsEdgeConfigItemsUpdated GetWebhooksResponseBodyEvents = "edge-config.items.updated" + GetWebhooksResponseBodyEventsFirewallAttack GetWebhooksResponseBodyEvents = "firewall.attack" + GetWebhooksResponseBodyEventsIntegrationConfigurationPermissionUpgraded GetWebhooksResponseBodyEvents = "integration-configuration.permission-upgraded" + GetWebhooksResponseBodyEventsIntegrationConfigurationRemoved GetWebhooksResponseBodyEvents = "integration-configuration.removed" + GetWebhooksResponseBodyEventsIntegrationConfigurationScopeChangeConfirmed GetWebhooksResponseBodyEvents = "integration-configuration.scope-change-confirmed" + GetWebhooksResponseBodyEventsIntegrationResourceProjectConnected GetWebhooksResponseBodyEvents = "integration-resource.project-connected" + GetWebhooksResponseBodyEventsIntegrationResourceProjectDisconnected GetWebhooksResponseBodyEvents = "integration-resource.project-disconnected" + GetWebhooksResponseBodyEventsProjectCreated GetWebhooksResponseBodyEvents = "project.created" + GetWebhooksResponseBodyEventsProjectRemoved GetWebhooksResponseBodyEvents = "project.removed" + GetWebhooksResponseBodyEventsDeploymentChecksCompletedLegacy GetWebhooksResponseBodyEvents = "deployment-checks-completed" + GetWebhooksResponseBodyEventsDeploymentReadyLegacy GetWebhooksResponseBodyEvents = "deployment-ready" + GetWebhooksResponseBodyEventsDeploymentPreparedLegacy GetWebhooksResponseBodyEvents = "deployment-prepared" + GetWebhooksResponseBodyEventsDeploymentErrorLegacy GetWebhooksResponseBodyEvents = "deployment-error" + GetWebhooksResponseBodyEventsDeploymentCheckRerequestedLegacy GetWebhooksResponseBodyEvents = "deployment-check-rerequested" + GetWebhooksResponseBodyEventsDeploymentCanceledLegacy GetWebhooksResponseBodyEvents = "deployment-canceled" + GetWebhooksResponseBodyEventsProjectCreatedLegacy GetWebhooksResponseBodyEvents = "project-created" + GetWebhooksResponseBodyEventsProjectRemovedLegacy GetWebhooksResponseBodyEvents = "project-removed" + GetWebhooksResponseBodyEventsDomainCreatedLegacy GetWebhooksResponseBodyEvents = "domain-created" + GetWebhooksResponseBodyEventsDeploymentLegacy GetWebhooksResponseBodyEvents = "deployment" + GetWebhooksResponseBodyEventsIntegrationConfigurationPermissionUpdatedLegacy GetWebhooksResponseBodyEvents = "integration-configuration-permission-updated" + GetWebhooksResponseBodyEventsIntegrationConfigurationRemovedLegacy GetWebhooksResponseBodyEvents = "integration-configuration-removed" + GetWebhooksResponseBodyEventsIntegrationConfigurationScopeChangeConfirmedLegacy GetWebhooksResponseBodyEvents = "integration-configuration-scope-change-confirmed" + GetWebhooksResponseBodyEventsMarketplaceInvoiceCreated GetWebhooksResponseBodyEvents = "marketplace.invoice.created" + GetWebhooksResponseBodyEventsMarketplaceInvoicePaid GetWebhooksResponseBodyEvents = "marketplace.invoice.paid" + GetWebhooksResponseBodyEventsMarketplaceInvoiceNotpaid GetWebhooksResponseBodyEvents = "marketplace.invoice.notpaid" + GetWebhooksResponseBodyEventsMarketplaceInvoiceRefunded GetWebhooksResponseBodyEvents = "marketplace.invoice.refunded" + GetWebhooksResponseBodyEventsObservabilityAnomaly GetWebhooksResponseBodyEvents = "observability.anomaly" + GetWebhooksResponseBodyEventsTestWebhook GetWebhooksResponseBodyEvents = "test-webhook" +) + +func (e GetWebhooksResponseBodyEvents) ToPointer() *GetWebhooksResponseBodyEvents { + return &e +} +func (e *GetWebhooksResponseBodyEvents) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "budget.reached": + fallthrough + case "budget.reset": + fallthrough + case "domain.created": + fallthrough + case "deployment.created": + fallthrough + case "deployment.error": + fallthrough + case "deployment.canceled": + fallthrough + case "deployment.succeeded": + fallthrough + case "deployment.ready": + fallthrough + case "deployment.check-rerequested": + fallthrough + case "deployment.promoted": + fallthrough + case "deployment.integration.action.start": + fallthrough + case "deployment.integration.action.cancel": + fallthrough + case "deployment.integration.action.cleanup": + fallthrough + case "edge-config.created": + fallthrough + case "edge-config.deleted": + fallthrough + case "edge-config.items.updated": + fallthrough + case "firewall.attack": + fallthrough + case "integration-configuration.permission-upgraded": + fallthrough + case "integration-configuration.removed": + fallthrough + case "integration-configuration.scope-change-confirmed": + fallthrough + case "integration-resource.project-connected": + fallthrough + case "integration-resource.project-disconnected": + fallthrough + case "project.created": + fallthrough + case "project.removed": + fallthrough + case "deployment-checks-completed": + fallthrough + case "deployment-ready": + fallthrough + case "deployment-prepared": + fallthrough + case "deployment-error": + fallthrough + case "deployment-check-rerequested": + fallthrough + case "deployment-canceled": + fallthrough + case "project-created": + fallthrough + case "project-removed": + fallthrough + case "domain-created": + fallthrough + case "deployment": + fallthrough + case "integration-configuration-permission-updated": + fallthrough + case "integration-configuration-removed": + fallthrough + case "integration-configuration-scope-change-confirmed": + fallthrough + case "marketplace.invoice.created": + fallthrough + case "marketplace.invoice.paid": + fallthrough + case "marketplace.invoice.notpaid": + fallthrough + case "marketplace.invoice.refunded": + fallthrough + case "observability.anomaly": + fallthrough + case "test-webhook": + *e = GetWebhooksResponseBodyEvents(v) + return nil + default: + return fmt.Errorf("invalid value for GetWebhooksResponseBodyEvents: %v", v) + } +} + +type GetWebhooksResponseBody2 struct { + // The webhooks events + Events []GetWebhooksResponseBodyEvents `json:"events"` + // The webhook id + ID string `json:"id"` + // A string with the URL of the webhook + URL string `json:"url"` + // The unique ID of the team the webhook belongs to + OwnerID string `json:"ownerId"` + // A number containing the date when the webhook was created in in milliseconds + CreatedAt float64 `json:"createdAt"` + // A number containing the date when the webhook was updated in in milliseconds + UpdatedAt float64 `json:"updatedAt"` + // The ID of the projects the webhook is associated with + ProjectIds []string `json:"projectIds,omitempty"` +} + +func (o *GetWebhooksResponseBody2) GetEvents() []GetWebhooksResponseBodyEvents { + if o == nil { + return []GetWebhooksResponseBodyEvents{} + } + return o.Events +} + +func (o *GetWebhooksResponseBody2) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetWebhooksResponseBody2) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetWebhooksResponseBody2) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetWebhooksResponseBody2) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetWebhooksResponseBody2) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetWebhooksResponseBody2) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +type GetWebhooksResponseBodyFramework string + +const ( + GetWebhooksResponseBodyFrameworkBlitzjs GetWebhooksResponseBodyFramework = "blitzjs" + GetWebhooksResponseBodyFrameworkNextjs GetWebhooksResponseBodyFramework = "nextjs" + GetWebhooksResponseBodyFrameworkGatsby GetWebhooksResponseBodyFramework = "gatsby" + GetWebhooksResponseBodyFrameworkRemix GetWebhooksResponseBodyFramework = "remix" + GetWebhooksResponseBodyFrameworkAstro GetWebhooksResponseBodyFramework = "astro" + GetWebhooksResponseBodyFrameworkHexo GetWebhooksResponseBodyFramework = "hexo" + GetWebhooksResponseBodyFrameworkEleventy GetWebhooksResponseBodyFramework = "eleventy" + GetWebhooksResponseBodyFrameworkDocusaurus2 GetWebhooksResponseBodyFramework = "docusaurus-2" + GetWebhooksResponseBodyFrameworkDocusaurus GetWebhooksResponseBodyFramework = "docusaurus" + GetWebhooksResponseBodyFrameworkPreact GetWebhooksResponseBodyFramework = "preact" + GetWebhooksResponseBodyFrameworkSolidstart1 GetWebhooksResponseBodyFramework = "solidstart-1" + GetWebhooksResponseBodyFrameworkSolidstart GetWebhooksResponseBodyFramework = "solidstart" + GetWebhooksResponseBodyFrameworkDojo GetWebhooksResponseBodyFramework = "dojo" + GetWebhooksResponseBodyFrameworkEmber GetWebhooksResponseBodyFramework = "ember" + GetWebhooksResponseBodyFrameworkVue GetWebhooksResponseBodyFramework = "vue" + GetWebhooksResponseBodyFrameworkScully GetWebhooksResponseBodyFramework = "scully" + GetWebhooksResponseBodyFrameworkIonicAngular GetWebhooksResponseBodyFramework = "ionic-angular" + GetWebhooksResponseBodyFrameworkAngular GetWebhooksResponseBodyFramework = "angular" + GetWebhooksResponseBodyFrameworkPolymer GetWebhooksResponseBodyFramework = "polymer" + GetWebhooksResponseBodyFrameworkSvelte GetWebhooksResponseBodyFramework = "svelte" + GetWebhooksResponseBodyFrameworkSveltekit GetWebhooksResponseBodyFramework = "sveltekit" + GetWebhooksResponseBodyFrameworkSveltekit1 GetWebhooksResponseBodyFramework = "sveltekit-1" + GetWebhooksResponseBodyFrameworkIonicReact GetWebhooksResponseBodyFramework = "ionic-react" + GetWebhooksResponseBodyFrameworkCreateReactApp GetWebhooksResponseBodyFramework = "create-react-app" + GetWebhooksResponseBodyFrameworkGridsome GetWebhooksResponseBodyFramework = "gridsome" + GetWebhooksResponseBodyFrameworkUmijs GetWebhooksResponseBodyFramework = "umijs" + GetWebhooksResponseBodyFrameworkSapper GetWebhooksResponseBodyFramework = "sapper" + GetWebhooksResponseBodyFrameworkSaber GetWebhooksResponseBodyFramework = "saber" + GetWebhooksResponseBodyFrameworkStencil GetWebhooksResponseBodyFramework = "stencil" + GetWebhooksResponseBodyFrameworkNuxtjs GetWebhooksResponseBodyFramework = "nuxtjs" + GetWebhooksResponseBodyFrameworkRedwoodjs GetWebhooksResponseBodyFramework = "redwoodjs" + GetWebhooksResponseBodyFrameworkHugo GetWebhooksResponseBodyFramework = "hugo" + GetWebhooksResponseBodyFrameworkJekyll GetWebhooksResponseBodyFramework = "jekyll" + GetWebhooksResponseBodyFrameworkBrunch GetWebhooksResponseBodyFramework = "brunch" + GetWebhooksResponseBodyFrameworkMiddleman GetWebhooksResponseBodyFramework = "middleman" + GetWebhooksResponseBodyFrameworkZola GetWebhooksResponseBodyFramework = "zola" + GetWebhooksResponseBodyFrameworkHydrogen GetWebhooksResponseBodyFramework = "hydrogen" + GetWebhooksResponseBodyFrameworkVite GetWebhooksResponseBodyFramework = "vite" + GetWebhooksResponseBodyFrameworkVitepress GetWebhooksResponseBodyFramework = "vitepress" + GetWebhooksResponseBodyFrameworkVuepress GetWebhooksResponseBodyFramework = "vuepress" + GetWebhooksResponseBodyFrameworkParcel GetWebhooksResponseBodyFramework = "parcel" + GetWebhooksResponseBodyFrameworkFasthtml GetWebhooksResponseBodyFramework = "fasthtml" + GetWebhooksResponseBodyFrameworkSanityV3 GetWebhooksResponseBodyFramework = "sanity-v3" + GetWebhooksResponseBodyFrameworkSanity GetWebhooksResponseBodyFramework = "sanity" + GetWebhooksResponseBodyFrameworkStorybook GetWebhooksResponseBodyFramework = "storybook" +) + +func (e GetWebhooksResponseBodyFramework) ToPointer() *GetWebhooksResponseBodyFramework { + return &e +} +func (e *GetWebhooksResponseBodyFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = GetWebhooksResponseBodyFramework(v) + return nil + default: + return fmt.Errorf("invalid value for GetWebhooksResponseBodyFramework: %v", v) + } +} + +type ProjectsMetadata struct { + ID string `json:"id"` + Name string `json:"name"` + Framework *GetWebhooksResponseBodyFramework `json:"framework,omitempty"` + LatestDeployment *string `json:"latestDeployment,omitempty"` +} + +func (o *ProjectsMetadata) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ProjectsMetadata) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ProjectsMetadata) GetFramework() *GetWebhooksResponseBodyFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *ProjectsMetadata) GetLatestDeployment() *string { + if o == nil { + return nil + } + return o.LatestDeployment +} + +// ResponseBodyEvents - The webhooks events +type ResponseBodyEvents string + +const ( + ResponseBodyEventsBudgetReached ResponseBodyEvents = "budget.reached" + ResponseBodyEventsBudgetReset ResponseBodyEvents = "budget.reset" + ResponseBodyEventsDomainCreated ResponseBodyEvents = "domain.created" + ResponseBodyEventsDeploymentCreated ResponseBodyEvents = "deployment.created" + ResponseBodyEventsDeploymentError ResponseBodyEvents = "deployment.error" + ResponseBodyEventsDeploymentCanceled ResponseBodyEvents = "deployment.canceled" + ResponseBodyEventsDeploymentSucceeded ResponseBodyEvents = "deployment.succeeded" + ResponseBodyEventsDeploymentReady ResponseBodyEvents = "deployment.ready" + ResponseBodyEventsDeploymentCheckRerequested ResponseBodyEvents = "deployment.check-rerequested" + ResponseBodyEventsDeploymentPromoted ResponseBodyEvents = "deployment.promoted" + ResponseBodyEventsDeploymentIntegrationActionStart ResponseBodyEvents = "deployment.integration.action.start" + ResponseBodyEventsDeploymentIntegrationActionCancel ResponseBodyEvents = "deployment.integration.action.cancel" + ResponseBodyEventsDeploymentIntegrationActionCleanup ResponseBodyEvents = "deployment.integration.action.cleanup" + ResponseBodyEventsEdgeConfigCreated ResponseBodyEvents = "edge-config.created" + ResponseBodyEventsEdgeConfigDeleted ResponseBodyEvents = "edge-config.deleted" + ResponseBodyEventsEdgeConfigItemsUpdated ResponseBodyEvents = "edge-config.items.updated" + ResponseBodyEventsFirewallAttack ResponseBodyEvents = "firewall.attack" + ResponseBodyEventsIntegrationConfigurationPermissionUpgraded ResponseBodyEvents = "integration-configuration.permission-upgraded" + ResponseBodyEventsIntegrationConfigurationRemoved ResponseBodyEvents = "integration-configuration.removed" + ResponseBodyEventsIntegrationConfigurationScopeChangeConfirmed ResponseBodyEvents = "integration-configuration.scope-change-confirmed" + ResponseBodyEventsIntegrationResourceProjectConnected ResponseBodyEvents = "integration-resource.project-connected" + ResponseBodyEventsIntegrationResourceProjectDisconnected ResponseBodyEvents = "integration-resource.project-disconnected" + ResponseBodyEventsProjectCreated ResponseBodyEvents = "project.created" + ResponseBodyEventsProjectRemoved ResponseBodyEvents = "project.removed" + ResponseBodyEventsDeploymentChecksCompletedLegacy ResponseBodyEvents = "deployment-checks-completed" + ResponseBodyEventsDeploymentReadyLegacy ResponseBodyEvents = "deployment-ready" + ResponseBodyEventsDeploymentPreparedLegacy ResponseBodyEvents = "deployment-prepared" + ResponseBodyEventsDeploymentErrorLegacy ResponseBodyEvents = "deployment-error" + ResponseBodyEventsDeploymentCheckRerequestedLegacy ResponseBodyEvents = "deployment-check-rerequested" + ResponseBodyEventsDeploymentCanceledLegacy ResponseBodyEvents = "deployment-canceled" + ResponseBodyEventsProjectCreatedLegacy ResponseBodyEvents = "project-created" + ResponseBodyEventsProjectRemovedLegacy ResponseBodyEvents = "project-removed" + ResponseBodyEventsDomainCreatedLegacy ResponseBodyEvents = "domain-created" + ResponseBodyEventsDeploymentLegacy ResponseBodyEvents = "deployment" + ResponseBodyEventsIntegrationConfigurationPermissionUpdatedLegacy ResponseBodyEvents = "integration-configuration-permission-updated" + ResponseBodyEventsIntegrationConfigurationRemovedLegacy ResponseBodyEvents = "integration-configuration-removed" + ResponseBodyEventsIntegrationConfigurationScopeChangeConfirmedLegacy ResponseBodyEvents = "integration-configuration-scope-change-confirmed" + ResponseBodyEventsMarketplaceInvoiceCreated ResponseBodyEvents = "marketplace.invoice.created" + ResponseBodyEventsMarketplaceInvoicePaid ResponseBodyEvents = "marketplace.invoice.paid" + ResponseBodyEventsMarketplaceInvoiceNotpaid ResponseBodyEvents = "marketplace.invoice.notpaid" + ResponseBodyEventsMarketplaceInvoiceRefunded ResponseBodyEvents = "marketplace.invoice.refunded" + ResponseBodyEventsObservabilityAnomaly ResponseBodyEvents = "observability.anomaly" + ResponseBodyEventsTestWebhook ResponseBodyEvents = "test-webhook" +) + +func (e ResponseBodyEvents) ToPointer() *ResponseBodyEvents { + return &e +} +func (e *ResponseBodyEvents) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "budget.reached": + fallthrough + case "budget.reset": + fallthrough + case "domain.created": + fallthrough + case "deployment.created": + fallthrough + case "deployment.error": + fallthrough + case "deployment.canceled": + fallthrough + case "deployment.succeeded": + fallthrough + case "deployment.ready": + fallthrough + case "deployment.check-rerequested": + fallthrough + case "deployment.promoted": + fallthrough + case "deployment.integration.action.start": + fallthrough + case "deployment.integration.action.cancel": + fallthrough + case "deployment.integration.action.cleanup": + fallthrough + case "edge-config.created": + fallthrough + case "edge-config.deleted": + fallthrough + case "edge-config.items.updated": + fallthrough + case "firewall.attack": + fallthrough + case "integration-configuration.permission-upgraded": + fallthrough + case "integration-configuration.removed": + fallthrough + case "integration-configuration.scope-change-confirmed": + fallthrough + case "integration-resource.project-connected": + fallthrough + case "integration-resource.project-disconnected": + fallthrough + case "project.created": + fallthrough + case "project.removed": + fallthrough + case "deployment-checks-completed": + fallthrough + case "deployment-ready": + fallthrough + case "deployment-prepared": + fallthrough + case "deployment-error": + fallthrough + case "deployment-check-rerequested": + fallthrough + case "deployment-canceled": + fallthrough + case "project-created": + fallthrough + case "project-removed": + fallthrough + case "domain-created": + fallthrough + case "deployment": + fallthrough + case "integration-configuration-permission-updated": + fallthrough + case "integration-configuration-removed": + fallthrough + case "integration-configuration-scope-change-confirmed": + fallthrough + case "marketplace.invoice.created": + fallthrough + case "marketplace.invoice.paid": + fallthrough + case "marketplace.invoice.notpaid": + fallthrough + case "marketplace.invoice.refunded": + fallthrough + case "observability.anomaly": + fallthrough + case "test-webhook": + *e = ResponseBodyEvents(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyEvents: %v", v) + } +} + +type GetWebhooksResponseBody1 struct { + ProjectsMetadata []ProjectsMetadata `json:"projectsMetadata"` + // The webhooks events + Events []ResponseBodyEvents `json:"events"` + // The webhook id + ID string `json:"id"` + // A string with the URL of the webhook + URL string `json:"url"` + // The unique ID of the team the webhook belongs to + OwnerID string `json:"ownerId"` + // A number containing the date when the webhook was created in in milliseconds + CreatedAt float64 `json:"createdAt"` + // A number containing the date when the webhook was updated in in milliseconds + UpdatedAt float64 `json:"updatedAt"` + // The ID of the projects the webhook is associated with + ProjectIds []string `json:"projectIds,omitempty"` +} + +func (o *GetWebhooksResponseBody1) GetProjectsMetadata() []ProjectsMetadata { + if o == nil { + return nil + } + return o.ProjectsMetadata +} + +func (o *GetWebhooksResponseBody1) GetEvents() []ResponseBodyEvents { + if o == nil { + return []ResponseBodyEvents{} + } + return o.Events +} + +func (o *GetWebhooksResponseBody1) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetWebhooksResponseBody1) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *GetWebhooksResponseBody1) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *GetWebhooksResponseBody1) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *GetWebhooksResponseBody1) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *GetWebhooksResponseBody1) GetProjectIds() []string { + if o == nil { + return nil + } + return o.ProjectIds +} + +type GetWebhooksResponseBodyType string + +const ( + GetWebhooksResponseBodyTypeArrayOfGetWebhooksResponseBody1 GetWebhooksResponseBodyType = "arrayOfGetWebhooksResponseBody1" + GetWebhooksResponseBodyTypeArrayOfGetWebhooksResponseBody2 GetWebhooksResponseBodyType = "arrayOfGetWebhooksResponseBody2" +) + +type GetWebhooksResponseBody struct { + ArrayOfGetWebhooksResponseBody1 []GetWebhooksResponseBody1 + ArrayOfGetWebhooksResponseBody2 []GetWebhooksResponseBody2 + + Type GetWebhooksResponseBodyType +} + +func CreateGetWebhooksResponseBodyArrayOfGetWebhooksResponseBody1(arrayOfGetWebhooksResponseBody1 []GetWebhooksResponseBody1) GetWebhooksResponseBody { + typ := GetWebhooksResponseBodyTypeArrayOfGetWebhooksResponseBody1 + + return GetWebhooksResponseBody{ + ArrayOfGetWebhooksResponseBody1: arrayOfGetWebhooksResponseBody1, + Type: typ, + } +} + +func CreateGetWebhooksResponseBodyArrayOfGetWebhooksResponseBody2(arrayOfGetWebhooksResponseBody2 []GetWebhooksResponseBody2) GetWebhooksResponseBody { + typ := GetWebhooksResponseBodyTypeArrayOfGetWebhooksResponseBody2 + + return GetWebhooksResponseBody{ + ArrayOfGetWebhooksResponseBody2: arrayOfGetWebhooksResponseBody2, + Type: typ, + } +} + +func (u *GetWebhooksResponseBody) UnmarshalJSON(data []byte) error { + + var arrayOfGetWebhooksResponseBody1 []GetWebhooksResponseBody1 = []GetWebhooksResponseBody1{} + if err := utils.UnmarshalJSON(data, &arrayOfGetWebhooksResponseBody1, "", true, true); err == nil { + u.ArrayOfGetWebhooksResponseBody1 = arrayOfGetWebhooksResponseBody1 + u.Type = GetWebhooksResponseBodyTypeArrayOfGetWebhooksResponseBody1 + return nil + } + + var arrayOfGetWebhooksResponseBody2 []GetWebhooksResponseBody2 = []GetWebhooksResponseBody2{} + if err := utils.UnmarshalJSON(data, &arrayOfGetWebhooksResponseBody2, "", true, true); err == nil { + u.ArrayOfGetWebhooksResponseBody2 = arrayOfGetWebhooksResponseBody2 + u.Type = GetWebhooksResponseBodyTypeArrayOfGetWebhooksResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetWebhooksResponseBody", string(data)) +} + +func (u GetWebhooksResponseBody) MarshalJSON() ([]byte, error) { + if u.ArrayOfGetWebhooksResponseBody1 != nil { + return utils.MarshalJSON(u.ArrayOfGetWebhooksResponseBody1, "", true) + } + + if u.ArrayOfGetWebhooksResponseBody2 != nil { + return utils.MarshalJSON(u.ArrayOfGetWebhooksResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type GetWebhooksResponseBody: all fields are null") +} + +type GetWebhooksResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *GetWebhooksResponseBody +} + +func (o *GetWebhooksResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetWebhooksResponse) GetOneOf() *GetWebhooksResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/gitnamespaces.go b/src/__tests__/mockserver/internal/sdk/models/operations/gitnamespaces.go new file mode 100644 index 00000000..c2ab5c7f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/gitnamespaces.go @@ -0,0 +1,212 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type Provider string + +const ( + ProviderGithub Provider = "github" + ProviderGithubCustomHost Provider = "github-custom-host" + ProviderGitlab Provider = "gitlab" + ProviderBitbucket Provider = "bitbucket" +) + +func (e Provider) ToPointer() *Provider { + return &e +} +func (e *Provider) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + fallthrough + case "github-custom-host": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + *e = Provider(v) + return nil + default: + return fmt.Errorf("invalid value for Provider: %v", v) + } +} + +type GitNamespacesRequest struct { + // The custom Git host if using a custom Git provider, like GitHub Enterprise Server + Host *string `queryParam:"style=form,explode=true,name=host"` + Provider *Provider `queryParam:"style=form,explode=true,name=provider"` +} + +func (o *GitNamespacesRequest) GetHost() *string { + if o == nil { + return nil + } + return o.Host +} + +func (o *GitNamespacesRequest) GetProvider() *Provider { + if o == nil { + return nil + } + return o.Provider +} + +type GitNamespacesIDType string + +const ( + GitNamespacesIDTypeStr GitNamespacesIDType = "str" + GitNamespacesIDTypeNumber GitNamespacesIDType = "number" +) + +type GitNamespacesID struct { + Str *string + Number *float64 + + Type GitNamespacesIDType +} + +func CreateGitNamespacesIDStr(str string) GitNamespacesID { + typ := GitNamespacesIDTypeStr + + return GitNamespacesID{ + Str: &str, + Type: typ, + } +} + +func CreateGitNamespacesIDNumber(number float64) GitNamespacesID { + typ := GitNamespacesIDTypeNumber + + return GitNamespacesID{ + Number: &number, + Type: typ, + } +} + +func (u *GitNamespacesID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GitNamespacesIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GitNamespacesIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GitNamespacesID", string(data)) +} + +func (u GitNamespacesID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GitNamespacesID: all fields are null") +} + +type GitNamespacesResponseBody struct { + Provider string `json:"provider"` + Slug string `json:"slug"` + ID GitNamespacesID `json:"id"` + OwnerType string `json:"ownerType"` + Name *string `json:"name,omitempty"` + IsAccessRestricted *bool `json:"isAccessRestricted,omitempty"` + InstallationID *float64 `json:"installationId,omitempty"` + RequireReauth *bool `json:"requireReauth,omitempty"` +} + +func (o *GitNamespacesResponseBody) GetProvider() string { + if o == nil { + return "" + } + return o.Provider +} + +func (o *GitNamespacesResponseBody) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *GitNamespacesResponseBody) GetID() GitNamespacesID { + if o == nil { + return GitNamespacesID{} + } + return o.ID +} + +func (o *GitNamespacesResponseBody) GetOwnerType() string { + if o == nil { + return "" + } + return o.OwnerType +} + +func (o *GitNamespacesResponseBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *GitNamespacesResponseBody) GetIsAccessRestricted() *bool { + if o == nil { + return nil + } + return o.IsAccessRestricted +} + +func (o *GitNamespacesResponseBody) GetInstallationID() *float64 { + if o == nil { + return nil + } + return o.InstallationID +} + +func (o *GitNamespacesResponseBody) GetRequireReauth() *bool { + if o == nil { + return nil + } + return o.RequireReauth +} + +type GitNamespacesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + ResponseBodies []GitNamespacesResponseBody +} + +func (o *GitNamespacesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GitNamespacesResponse) GetResponseBodies() []GitNamespacesResponseBody { + if o == nil { + return nil + } + return o.ResponseBodies +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/inviteusertoteam.go b/src/__tests__/mockserver/internal/sdk/models/operations/inviteusertoteam.go new file mode 100644 index 00000000..96038b0b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/inviteusertoteam.go @@ -0,0 +1,397 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// InviteUserToTeamRole - The role of the user to invite +type InviteUserToTeamRole string + +const ( + InviteUserToTeamRoleOwner InviteUserToTeamRole = "OWNER" + InviteUserToTeamRoleMember InviteUserToTeamRole = "MEMBER" + InviteUserToTeamRoleDeveloper InviteUserToTeamRole = "DEVELOPER" + InviteUserToTeamRoleBilling InviteUserToTeamRole = "BILLING" + InviteUserToTeamRoleViewer InviteUserToTeamRole = "VIEWER" + InviteUserToTeamRoleContributor InviteUserToTeamRole = "CONTRIBUTOR" +) + +func (e InviteUserToTeamRole) ToPointer() *InviteUserToTeamRole { + return &e +} +func (e *InviteUserToTeamRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "BILLING": + fallthrough + case "VIEWER": + fallthrough + case "CONTRIBUTOR": + *e = InviteUserToTeamRole(v) + return nil + default: + return fmt.Errorf("invalid value for InviteUserToTeamRole: %v", v) + } +} + +// InviteUserToTeamTeamsRole - Sets the project roles for the invited user +type InviteUserToTeamTeamsRole string + +const ( + InviteUserToTeamTeamsRoleAdmin InviteUserToTeamTeamsRole = "ADMIN" + InviteUserToTeamTeamsRoleProjectViewer InviteUserToTeamTeamsRole = "PROJECT_VIEWER" + InviteUserToTeamTeamsRoleProjectDeveloper InviteUserToTeamTeamsRole = "PROJECT_DEVELOPER" +) + +func (e InviteUserToTeamTeamsRole) ToPointer() *InviteUserToTeamTeamsRole { + return &e +} +func (e *InviteUserToTeamTeamsRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_VIEWER": + fallthrough + case "PROJECT_DEVELOPER": + *e = InviteUserToTeamTeamsRole(v) + return nil + default: + return fmt.Errorf("invalid value for InviteUserToTeamTeamsRole: %v", v) + } +} + +type InviteUserToTeamProjects struct { + // The ID of the project. + ProjectID string `json:"projectId"` + // Sets the project roles for the invited user + Role InviteUserToTeamTeamsRole `json:"role"` +} + +func (o *InviteUserToTeamProjects) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *InviteUserToTeamProjects) GetRole() InviteUserToTeamTeamsRole { + if o == nil { + return InviteUserToTeamTeamsRole("") + } + return o.Role +} + +type InviteUserToTeamRequestBody struct { + // The id of the user to invite + UID *string `json:"uid,omitempty"` + // The email address of the user to invite + Email *string `json:"email,omitempty"` + // The role of the user to invite + Role *InviteUserToTeamRole `default:"MEMBER" json:"role"` + Projects []InviteUserToTeamProjects `json:"projects,omitempty"` +} + +func (i InviteUserToTeamRequestBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(i, "", false) +} + +func (i *InviteUserToTeamRequestBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &i, "", false, false); err != nil { + return err + } + return nil +} + +func (o *InviteUserToTeamRequestBody) GetUID() *string { + if o == nil { + return nil + } + return o.UID +} + +func (o *InviteUserToTeamRequestBody) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *InviteUserToTeamRequestBody) GetRole() *InviteUserToTeamRole { + if o == nil { + return nil + } + return o.Role +} + +func (o *InviteUserToTeamRequestBody) GetProjects() []InviteUserToTeamProjects { + if o == nil { + return nil + } + return o.Projects +} + +type InviteUserToTeamRequest struct { + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` + RequestBody InviteUserToTeamRequestBody `request:"mediaType=application/json"` +} + +func (o *InviteUserToTeamRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *InviteUserToTeamRequest) GetRequestBody() InviteUserToTeamRequestBody { + if o == nil { + return InviteUserToTeamRequestBody{} + } + return o.RequestBody +} + +type InviteUserToTeamResponseBodyRole string + +const ( + InviteUserToTeamResponseBodyRoleOwner InviteUserToTeamResponseBodyRole = "OWNER" + InviteUserToTeamResponseBodyRoleMember InviteUserToTeamResponseBodyRole = "MEMBER" + InviteUserToTeamResponseBodyRoleDeveloper InviteUserToTeamResponseBodyRole = "DEVELOPER" + InviteUserToTeamResponseBodyRoleBilling InviteUserToTeamResponseBodyRole = "BILLING" + InviteUserToTeamResponseBodyRoleViewer InviteUserToTeamResponseBodyRole = "VIEWER" + InviteUserToTeamResponseBodyRoleContributor InviteUserToTeamResponseBodyRole = "CONTRIBUTOR" +) + +func (e InviteUserToTeamResponseBodyRole) ToPointer() *InviteUserToTeamResponseBodyRole { + return &e +} +func (e *InviteUserToTeamResponseBodyRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "BILLING": + fallthrough + case "VIEWER": + fallthrough + case "CONTRIBUTOR": + *e = InviteUserToTeamResponseBodyRole(v) + return nil + default: + return fmt.Errorf("invalid value for InviteUserToTeamResponseBodyRole: %v", v) + } +} + +type InviteUserToTeamResponseBody2 struct { + UID string `json:"uid"` + Username string `json:"username"` + Role InviteUserToTeamResponseBodyRole `json:"role"` +} + +func (o *InviteUserToTeamResponseBody2) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *InviteUserToTeamResponseBody2) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *InviteUserToTeamResponseBody2) GetRole() InviteUserToTeamResponseBodyRole { + if o == nil { + return InviteUserToTeamResponseBodyRole("") + } + return o.Role +} + +// ResponseBodyRole - The role used for the invitation +type ResponseBodyRole string + +const ( + ResponseBodyRoleOwner ResponseBodyRole = "OWNER" + ResponseBodyRoleMember ResponseBodyRole = "MEMBER" + ResponseBodyRoleDeveloper ResponseBodyRole = "DEVELOPER" + ResponseBodyRoleBilling ResponseBodyRole = "BILLING" + ResponseBodyRoleViewer ResponseBodyRole = "VIEWER" + ResponseBodyRoleContributor ResponseBodyRole = "CONTRIBUTOR" +) + +func (e ResponseBodyRole) ToPointer() *ResponseBodyRole { + return &e +} +func (e *ResponseBodyRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "BILLING": + fallthrough + case "VIEWER": + fallthrough + case "CONTRIBUTOR": + *e = ResponseBodyRole(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyRole: %v", v) + } +} + +// InviteUserToTeamResponseBody1 - The member was successfully added to the team +type InviteUserToTeamResponseBody1 struct { + // The ID of the invited user + UID string `json:"uid"` + // The username of the invited user + Username string `json:"username"` + // The email of the invited user. Not included if the user was invited via their UID. + Email *string `json:"email,omitempty"` + // The role used for the invitation + Role ResponseBodyRole `json:"role"` +} + +func (o *InviteUserToTeamResponseBody1) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *InviteUserToTeamResponseBody1) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *InviteUserToTeamResponseBody1) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *InviteUserToTeamResponseBody1) GetRole() ResponseBodyRole { + if o == nil { + return ResponseBodyRole("") + } + return o.Role +} + +type InviteUserToTeamResponseBodyType string + +const ( + InviteUserToTeamResponseBodyTypeInviteUserToTeamResponseBody1 InviteUserToTeamResponseBodyType = "inviteUserToTeam_responseBody_1" + InviteUserToTeamResponseBodyTypeInviteUserToTeamResponseBody2 InviteUserToTeamResponseBodyType = "inviteUserToTeam_responseBody_2" +) + +// InviteUserToTeamResponseBody - The member was successfully added to the team +type InviteUserToTeamResponseBody struct { + InviteUserToTeamResponseBody1 *InviteUserToTeamResponseBody1 + InviteUserToTeamResponseBody2 *InviteUserToTeamResponseBody2 + + Type InviteUserToTeamResponseBodyType +} + +func CreateInviteUserToTeamResponseBodyInviteUserToTeamResponseBody1(inviteUserToTeamResponseBody1 InviteUserToTeamResponseBody1) InviteUserToTeamResponseBody { + typ := InviteUserToTeamResponseBodyTypeInviteUserToTeamResponseBody1 + + return InviteUserToTeamResponseBody{ + InviteUserToTeamResponseBody1: &inviteUserToTeamResponseBody1, + Type: typ, + } +} + +func CreateInviteUserToTeamResponseBodyInviteUserToTeamResponseBody2(inviteUserToTeamResponseBody2 InviteUserToTeamResponseBody2) InviteUserToTeamResponseBody { + typ := InviteUserToTeamResponseBodyTypeInviteUserToTeamResponseBody2 + + return InviteUserToTeamResponseBody{ + InviteUserToTeamResponseBody2: &inviteUserToTeamResponseBody2, + Type: typ, + } +} + +func (u *InviteUserToTeamResponseBody) UnmarshalJSON(data []byte) error { + + var inviteUserToTeamResponseBody2 InviteUserToTeamResponseBody2 = InviteUserToTeamResponseBody2{} + if err := utils.UnmarshalJSON(data, &inviteUserToTeamResponseBody2, "", true, true); err == nil { + u.InviteUserToTeamResponseBody2 = &inviteUserToTeamResponseBody2 + u.Type = InviteUserToTeamResponseBodyTypeInviteUserToTeamResponseBody2 + return nil + } + + var inviteUserToTeamResponseBody1 InviteUserToTeamResponseBody1 = InviteUserToTeamResponseBody1{} + if err := utils.UnmarshalJSON(data, &inviteUserToTeamResponseBody1, "", true, true); err == nil { + u.InviteUserToTeamResponseBody1 = &inviteUserToTeamResponseBody1 + u.Type = InviteUserToTeamResponseBodyTypeInviteUserToTeamResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for InviteUserToTeamResponseBody", string(data)) +} + +func (u InviteUserToTeamResponseBody) MarshalJSON() ([]byte, error) { + if u.InviteUserToTeamResponseBody1 != nil { + return utils.MarshalJSON(u.InviteUserToTeamResponseBody1, "", true) + } + + if u.InviteUserToTeamResponseBody2 != nil { + return utils.MarshalJSON(u.InviteUserToTeamResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type InviteUserToTeamResponseBody: all fields are null") +} + +type InviteUserToTeamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The member was successfully added to the team + OneOf *InviteUserToTeamResponseBody +} + +func (o *InviteUserToTeamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *InviteUserToTeamResponse) GetOneOf() *InviteUserToTeamResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/issuecert.go b/src/__tests__/mockserver/internal/sdk/models/operations/issuecert.go new file mode 100644 index 00000000..032297ca --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/issuecert.go @@ -0,0 +1,110 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type IssueCertRequestBody struct { + // The common names the cert should be issued for + Cns []string `json:"cns,omitempty"` +} + +func (o *IssueCertRequestBody) GetCns() []string { + if o == nil { + return nil + } + return o.Cns +} + +type IssueCertRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody IssueCertRequestBody `request:"mediaType=application/json"` +} + +func (o *IssueCertRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *IssueCertRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *IssueCertRequest) GetRequestBody() IssueCertRequestBody { + if o == nil { + return IssueCertRequestBody{} + } + return o.RequestBody +} + +type IssueCertResponseBody struct { + ID string `json:"id"` + CreatedAt float64 `json:"createdAt"` + ExpiresAt float64 `json:"expiresAt"` + AutoRenew bool `json:"autoRenew"` + Cns []string `json:"cns"` +} + +func (o *IssueCertResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *IssueCertResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *IssueCertResponseBody) GetExpiresAt() float64 { + if o == nil { + return 0.0 + } + return o.ExpiresAt +} + +func (o *IssueCertResponseBody) GetAutoRenew() bool { + if o == nil { + return false + } + return o.AutoRenew +} + +func (o *IssueCertResponseBody) GetCns() []string { + if o == nil { + return []string{} + } + return o.Cns +} + +type IssueCertResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *IssueCertResponseBody +} + +func (o *IssueCertResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *IssueCertResponse) GetObject() *IssueCertResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/jointeam.go b/src/__tests__/mockserver/internal/sdk/models/operations/jointeam.go new file mode 100644 index 00000000..3f3f1d2c --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/jointeam.go @@ -0,0 +1,98 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type JoinTeamRequestBody struct { + // The invite code to join the team. + InviteCode *string `json:"inviteCode,omitempty"` +} + +func (o *JoinTeamRequestBody) GetInviteCode() *string { + if o == nil { + return nil + } + return o.InviteCode +} + +type JoinTeamRequest struct { + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` + RequestBody JoinTeamRequestBody `request:"mediaType=application/json"` +} + +func (o *JoinTeamRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *JoinTeamRequest) GetRequestBody() JoinTeamRequestBody { + if o == nil { + return JoinTeamRequestBody{} + } + return o.RequestBody +} + +// JoinTeamResponseBody - Successfully joined a team. +type JoinTeamResponseBody struct { + // The ID of the team the user joined. + TeamID string `json:"teamId"` + // The slug of the team the user joined. + Slug string `json:"slug"` + // The name of the team the user joined. + Name string `json:"name"` + // The origin of how the user joined. + From string `json:"from"` +} + +func (o *JoinTeamResponseBody) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *JoinTeamResponseBody) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *JoinTeamResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *JoinTeamResponseBody) GetFrom() string { + if o == nil { + return "" + } + return o.From +} + +type JoinTeamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successfully joined a team. + Object *JoinTeamResponseBody +} + +func (o *JoinTeamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *JoinTeamResponse) GetObject() *JoinTeamResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroupmembers.go b/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroupmembers.go new file mode 100644 index 00000000..18f60ed4 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroupmembers.go @@ -0,0 +1,220 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type ListAccessGroupMembersRequest struct { + // The ID or name of the Access Group. + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // Limit how many access group members should be returned. + Limit *int64 `queryParam:"style=form,explode=true,name=limit"` + // Continuation cursor to retrieve the next page of results. + Next *string `queryParam:"style=form,explode=true,name=next"` + // Search project members by their name, username, and email. + Search *string `queryParam:"style=form,explode=true,name=search"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ListAccessGroupMembersRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *ListAccessGroupMembersRequest) GetLimit() *int64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *ListAccessGroupMembersRequest) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *ListAccessGroupMembersRequest) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +func (o *ListAccessGroupMembersRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ListAccessGroupMembersRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type TeamRole string + +const ( + TeamRoleOwner TeamRole = "OWNER" + TeamRoleMember TeamRole = "MEMBER" + TeamRoleDeveloper TeamRole = "DEVELOPER" + TeamRoleBilling TeamRole = "BILLING" + TeamRoleViewer TeamRole = "VIEWER" + TeamRoleContributor TeamRole = "CONTRIBUTOR" +) + +func (e TeamRole) ToPointer() *TeamRole { + return &e +} +func (e *TeamRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "BILLING": + fallthrough + case "VIEWER": + fallthrough + case "CONTRIBUTOR": + *e = TeamRole(v) + return nil + default: + return fmt.Errorf("invalid value for TeamRole: %v", v) + } +} + +type Members struct { + Avatar *string `json:"avatar,omitempty"` + Email string `json:"email"` + UID string `json:"uid"` + Username string `json:"username"` + Name *string `json:"name,omitempty"` + CreatedAt *string `json:"createdAt,omitempty"` + TeamRole TeamRole `json:"teamRole"` +} + +func (o *Members) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +func (o *Members) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *Members) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *Members) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +func (o *Members) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *Members) GetCreatedAt() *string { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Members) GetTeamRole() TeamRole { + if o == nil { + return TeamRole("") + } + return o.TeamRole +} + +type Pagination struct { + Count float64 `json:"count"` + Next *string `json:"next"` +} + +func (o *Pagination) GetCount() float64 { + if o == nil { + return 0.0 + } + return o.Count +} + +func (o *Pagination) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +type ListAccessGroupMembersResponseBody struct { + Members []Members `json:"members"` + Pagination Pagination `json:"pagination"` +} + +func (o *ListAccessGroupMembersResponseBody) GetMembers() []Members { + if o == nil { + return []Members{} + } + return o.Members +} + +func (o *ListAccessGroupMembersResponseBody) GetPagination() Pagination { + if o == nil { + return Pagination{} + } + return o.Pagination +} + +type ListAccessGroupMembersResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *ListAccessGroupMembersResponseBody +} + +func (o *ListAccessGroupMembersResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListAccessGroupMembersResponse) GetObject() *ListAccessGroupMembersResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroupprojects.go b/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroupprojects.go new file mode 100644 index 00000000..d1a76777 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroupprojects.go @@ -0,0 +1,213 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type ListAccessGroupProjectsRequest struct { + // The ID or name of the Access Group. + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // Limit how many access group projects should be returned. + Limit *int64 `queryParam:"style=form,explode=true,name=limit"` + // Continuation cursor to retrieve the next page of results. + Next *string `queryParam:"style=form,explode=true,name=next"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ListAccessGroupProjectsRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *ListAccessGroupProjectsRequest) GetLimit() *int64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *ListAccessGroupProjectsRequest) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *ListAccessGroupProjectsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ListAccessGroupProjectsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ListAccessGroupProjectsRole string + +const ( + ListAccessGroupProjectsRoleAdmin ListAccessGroupProjectsRole = "ADMIN" + ListAccessGroupProjectsRoleProjectDeveloper ListAccessGroupProjectsRole = "PROJECT_DEVELOPER" + ListAccessGroupProjectsRoleProjectViewer ListAccessGroupProjectsRole = "PROJECT_VIEWER" +) + +func (e ListAccessGroupProjectsRole) ToPointer() *ListAccessGroupProjectsRole { + return &e +} +func (e *ListAccessGroupProjectsRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = ListAccessGroupProjectsRole(v) + return nil + default: + return fmt.Errorf("invalid value for ListAccessGroupProjectsRole: %v", v) + } +} + +type ListAccessGroupProjectsProject struct { + Name *string `json:"name,omitempty"` + Framework *string `json:"framework,omitempty"` + LatestDeploymentID *string `json:"latestDeploymentId,omitempty"` +} + +func (o *ListAccessGroupProjectsProject) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *ListAccessGroupProjectsProject) GetFramework() *string { + if o == nil { + return nil + } + return o.Framework +} + +func (o *ListAccessGroupProjectsProject) GetLatestDeploymentID() *string { + if o == nil { + return nil + } + return o.LatestDeploymentID +} + +type ListAccessGroupProjectsProjects struct { + ProjectID string `json:"projectId"` + Role ListAccessGroupProjectsRole `json:"role"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` + Project ListAccessGroupProjectsProject `json:"project"` +} + +func (o *ListAccessGroupProjectsProjects) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *ListAccessGroupProjectsProjects) GetRole() ListAccessGroupProjectsRole { + if o == nil { + return ListAccessGroupProjectsRole("") + } + return o.Role +} + +func (o *ListAccessGroupProjectsProjects) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *ListAccessGroupProjectsProjects) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *ListAccessGroupProjectsProjects) GetProject() ListAccessGroupProjectsProject { + if o == nil { + return ListAccessGroupProjectsProject{} + } + return o.Project +} + +type ListAccessGroupProjectsPagination struct { + Count float64 `json:"count"` + Next *string `json:"next"` +} + +func (o *ListAccessGroupProjectsPagination) GetCount() float64 { + if o == nil { + return 0.0 + } + return o.Count +} + +func (o *ListAccessGroupProjectsPagination) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +type ListAccessGroupProjectsResponseBody struct { + Projects []ListAccessGroupProjectsProjects `json:"projects"` + Pagination ListAccessGroupProjectsPagination `json:"pagination"` +} + +func (o *ListAccessGroupProjectsResponseBody) GetProjects() []ListAccessGroupProjectsProjects { + if o == nil { + return []ListAccessGroupProjectsProjects{} + } + return o.Projects +} + +func (o *ListAccessGroupProjectsResponseBody) GetPagination() ListAccessGroupProjectsPagination { + if o == nil { + return ListAccessGroupProjectsPagination{} + } + return o.Pagination +} + +type ListAccessGroupProjectsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *ListAccessGroupProjectsResponseBody +} + +func (o *ListAccessGroupProjectsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListAccessGroupProjectsResponse) GetObject() *ListAccessGroupProjectsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroups.go b/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroups.go new file mode 100644 index 00000000..000700a1 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listaccessgroups.go @@ -0,0 +1,306 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type ListAccessGroupsRequest struct { + // Filter access groups by project. + ProjectID *string `queryParam:"style=form,explode=true,name=projectId"` + // Search for access groups by name. + Search *string `queryParam:"style=form,explode=true,name=search"` + // Number of members to include in the response. + MembersLimit *int64 `queryParam:"style=form,explode=true,name=membersLimit"` + // Number of projects to include in the response. + ProjectsLimit *int64 `queryParam:"style=form,explode=true,name=projectsLimit"` + // Limit how many access group should be returned. + Limit *int64 `queryParam:"style=form,explode=true,name=limit"` + // Continuation cursor to retrieve the next page of results. + Next *string `queryParam:"style=form,explode=true,name=next"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ListAccessGroupsRequest) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *ListAccessGroupsRequest) GetSearch() *string { + if o == nil { + return nil + } + return o.Search +} + +func (o *ListAccessGroupsRequest) GetMembersLimit() *int64 { + if o == nil { + return nil + } + return o.MembersLimit +} + +func (o *ListAccessGroupsRequest) GetProjectsLimit() *int64 { + if o == nil { + return nil + } + return o.ProjectsLimit +} + +func (o *ListAccessGroupsRequest) GetLimit() *int64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *ListAccessGroupsRequest) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +func (o *ListAccessGroupsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ListAccessGroupsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type AccessGroups struct { + Members []string `json:"members,omitempty"` + Projects []string `json:"projects,omitempty"` + Entitlements []string `json:"entitlements,omitempty"` + IsDsyncManaged bool `json:"isDsyncManaged"` + // The name of this access group. + Name string `json:"name"` + // Timestamp in milliseconds when the access group was created. + CreatedAt string `json:"createdAt"` + // ID of the team that this access group belongs to. + TeamID string `json:"teamId"` + // Timestamp in milliseconds when the access group was last updated. + UpdatedAt string `json:"updatedAt"` + // ID of the access group. + AccessGroupID string `json:"accessGroupId"` + // Number of members in the access group. + MembersCount float64 `json:"membersCount"` + // Number of projects in the access group. + ProjectsCount float64 `json:"projectsCount"` +} + +func (o *AccessGroups) GetMembers() []string { + if o == nil { + return nil + } + return o.Members +} + +func (o *AccessGroups) GetProjects() []string { + if o == nil { + return nil + } + return o.Projects +} + +func (o *AccessGroups) GetEntitlements() []string { + if o == nil { + return nil + } + return o.Entitlements +} + +func (o *AccessGroups) GetIsDsyncManaged() bool { + if o == nil { + return false + } + return o.IsDsyncManaged +} + +func (o *AccessGroups) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *AccessGroups) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *AccessGroups) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *AccessGroups) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *AccessGroups) GetAccessGroupID() string { + if o == nil { + return "" + } + return o.AccessGroupID +} + +func (o *AccessGroups) GetMembersCount() float64 { + if o == nil { + return 0.0 + } + return o.MembersCount +} + +func (o *AccessGroups) GetProjectsCount() float64 { + if o == nil { + return 0.0 + } + return o.ProjectsCount +} + +type ResponseBodyPagination struct { + Count float64 `json:"count"` + Next *string `json:"next"` +} + +func (o *ResponseBodyPagination) GetCount() float64 { + if o == nil { + return 0.0 + } + return o.Count +} + +func (o *ResponseBodyPagination) GetNext() *string { + if o == nil { + return nil + } + return o.Next +} + +type ListAccessGroupsResponseBody2 struct { + AccessGroups []AccessGroups `json:"accessGroups"` + Pagination ResponseBodyPagination `json:"pagination"` +} + +func (o *ListAccessGroupsResponseBody2) GetAccessGroups() []AccessGroups { + if o == nil { + return []AccessGroups{} + } + return o.AccessGroups +} + +func (o *ListAccessGroupsResponseBody2) GetPagination() ResponseBodyPagination { + if o == nil { + return ResponseBodyPagination{} + } + return o.Pagination +} + +type ListAccessGroupsResponseBody1 struct { +} + +type ListAccessGroupsResponseBodyType string + +const ( + ListAccessGroupsResponseBodyTypeListAccessGroupsResponseBody1 ListAccessGroupsResponseBodyType = "listAccessGroups_responseBody_1" + ListAccessGroupsResponseBodyTypeListAccessGroupsResponseBody2 ListAccessGroupsResponseBodyType = "listAccessGroups_responseBody_2" +) + +type ListAccessGroupsResponseBody struct { + ListAccessGroupsResponseBody1 *ListAccessGroupsResponseBody1 + ListAccessGroupsResponseBody2 *ListAccessGroupsResponseBody2 + + Type ListAccessGroupsResponseBodyType +} + +func CreateListAccessGroupsResponseBodyListAccessGroupsResponseBody1(listAccessGroupsResponseBody1 ListAccessGroupsResponseBody1) ListAccessGroupsResponseBody { + typ := ListAccessGroupsResponseBodyTypeListAccessGroupsResponseBody1 + + return ListAccessGroupsResponseBody{ + ListAccessGroupsResponseBody1: &listAccessGroupsResponseBody1, + Type: typ, + } +} + +func CreateListAccessGroupsResponseBodyListAccessGroupsResponseBody2(listAccessGroupsResponseBody2 ListAccessGroupsResponseBody2) ListAccessGroupsResponseBody { + typ := ListAccessGroupsResponseBodyTypeListAccessGroupsResponseBody2 + + return ListAccessGroupsResponseBody{ + ListAccessGroupsResponseBody2: &listAccessGroupsResponseBody2, + Type: typ, + } +} + +func (u *ListAccessGroupsResponseBody) UnmarshalJSON(data []byte) error { + + var listAccessGroupsResponseBody1 ListAccessGroupsResponseBody1 = ListAccessGroupsResponseBody1{} + if err := utils.UnmarshalJSON(data, &listAccessGroupsResponseBody1, "", true, true); err == nil { + u.ListAccessGroupsResponseBody1 = &listAccessGroupsResponseBody1 + u.Type = ListAccessGroupsResponseBodyTypeListAccessGroupsResponseBody1 + return nil + } + + var listAccessGroupsResponseBody2 ListAccessGroupsResponseBody2 = ListAccessGroupsResponseBody2{} + if err := utils.UnmarshalJSON(data, &listAccessGroupsResponseBody2, "", true, true); err == nil { + u.ListAccessGroupsResponseBody2 = &listAccessGroupsResponseBody2 + u.Type = ListAccessGroupsResponseBodyTypeListAccessGroupsResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ListAccessGroupsResponseBody", string(data)) +} + +func (u ListAccessGroupsResponseBody) MarshalJSON() ([]byte, error) { + if u.ListAccessGroupsResponseBody1 != nil { + return utils.MarshalJSON(u.ListAccessGroupsResponseBody1, "", true) + } + + if u.ListAccessGroupsResponseBody2 != nil { + return utils.MarshalJSON(u.ListAccessGroupsResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type ListAccessGroupsResponseBody: all fields are null") +} + +type ListAccessGroupsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *ListAccessGroupsResponseBody +} + +func (o *ListAccessGroupsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListAccessGroupsResponse) GetOneOf() *ListAccessGroupsResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listaliases.go b/src/__tests__/mockserver/internal/sdk/models/operations/listaliases.go new file mode 100644 index 00000000..01440a36 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listaliases.go @@ -0,0 +1,755 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "time" +) + +type DomainType string + +const ( + DomainTypeArrayOfStr DomainType = "arrayOfStr" + DomainTypeStr DomainType = "str" +) + +// Domain - Get only aliases of the given domain name +type Domain struct { + ArrayOfStr []string + Str *string + + Type DomainType +} + +func CreateDomainArrayOfStr(arrayOfStr []string) Domain { + typ := DomainTypeArrayOfStr + + return Domain{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateDomainStr(str string) Domain { + typ := DomainTypeStr + + return Domain{ + Str: &str, + Type: typ, + } +} + +func (u *Domain) UnmarshalJSON(data []byte) error { + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = DomainTypeArrayOfStr + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = DomainTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Domain", string(data)) +} + +func (u Domain) MarshalJSON() ([]byte, error) { + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + return nil, errors.New("could not marshal union type Domain: all fields are null") +} + +type ListAliasesRequest struct { + // Get only aliases of the given domain name + Domain *Domain `queryParam:"style=form,explode=true,name=domain"` + // Get only aliases created after the provided timestamp + From *float64 `queryParam:"style=form,explode=true,name=from"` + // Maximum number of aliases to list from a request + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Filter aliases from the given `projectId` + ProjectID *string `queryParam:"style=form,explode=true,name=projectId"` + // Get aliases created after this JavaScript timestamp + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Get aliases created before this JavaScript timestamp + Until *float64 `queryParam:"style=form,explode=true,name=until"` + // Get aliases that would be rolled back for the given deployment + RollbackDeploymentID *string `queryParam:"style=form,explode=true,name=rollbackDeploymentId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ListAliasesRequest) GetDomain() *Domain { + if o == nil { + return nil + } + return o.Domain +} + +func (o *ListAliasesRequest) GetFrom() *float64 { + if o == nil { + return nil + } + return o.From +} + +func (o *ListAliasesRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *ListAliasesRequest) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *ListAliasesRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *ListAliasesRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *ListAliasesRequest) GetRollbackDeploymentID() *string { + if o == nil { + return nil + } + return o.RollbackDeploymentID +} + +func (o *ListAliasesRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ListAliasesRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// ListAliasesCreator - Information of the user who created the alias +type ListAliasesCreator struct { + // ID of the user who created the alias + UID string `json:"uid"` + // Email of the user who created the alias + Email string `json:"email"` + // Username of the user who created the alias + Username string `json:"username"` +} + +func (o *ListAliasesCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *ListAliasesCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *ListAliasesCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +// ListAliasesDeployment - A map with the deployment ID, URL and metadata +type ListAliasesDeployment struct { + // The deployment unique identifier + ID string `json:"id"` + // The deployment unique URL + URL string `json:"url"` + // The deployment metadata + Meta *string `json:"meta,omitempty"` +} + +func (o *ListAliasesDeployment) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ListAliasesDeployment) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *ListAliasesDeployment) GetMeta() *string { + if o == nil { + return nil + } + return o.Meta +} + +type ListAliasesProtectionBypassAliasesResponseScope string + +const ( + ListAliasesProtectionBypassAliasesResponseScopeEmailInvite ListAliasesProtectionBypassAliasesResponseScope = "email_invite" +) + +func (e ListAliasesProtectionBypassAliasesResponseScope) ToPointer() *ListAliasesProtectionBypassAliasesResponseScope { + return &e +} +func (e *ListAliasesProtectionBypassAliasesResponseScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "email_invite": + *e = ListAliasesProtectionBypassAliasesResponseScope(v) + return nil + default: + return fmt.Errorf("invalid value for ListAliasesProtectionBypassAliasesResponseScope: %v", v) + } +} + +// ListAliasesProtectionBypass4 - The protection bypass for the alias +type ListAliasesProtectionBypass4 struct { + CreatedAt float64 `json:"createdAt"` + LastUpdatedAt float64 `json:"lastUpdatedAt"` + LastUpdatedBy string `json:"lastUpdatedBy"` + Scope ListAliasesProtectionBypassAliasesResponseScope `json:"scope"` +} + +func (o *ListAliasesProtectionBypass4) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ListAliasesProtectionBypass4) GetLastUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.LastUpdatedAt +} + +func (o *ListAliasesProtectionBypass4) GetLastUpdatedBy() string { + if o == nil { + return "" + } + return o.LastUpdatedBy +} + +func (o *ListAliasesProtectionBypass4) GetScope() ListAliasesProtectionBypassAliasesResponseScope { + if o == nil { + return ListAliasesProtectionBypassAliasesResponseScope("") + } + return o.Scope +} + +type ListAliasesProtectionBypassAliasesScope string + +const ( + ListAliasesProtectionBypassAliasesScopeAliasProtectionOverride ListAliasesProtectionBypassAliasesScope = "alias-protection-override" +) + +func (e ListAliasesProtectionBypassAliasesScope) ToPointer() *ListAliasesProtectionBypassAliasesScope { + return &e +} +func (e *ListAliasesProtectionBypassAliasesScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "alias-protection-override": + *e = ListAliasesProtectionBypassAliasesScope(v) + return nil + default: + return fmt.Errorf("invalid value for ListAliasesProtectionBypassAliasesScope: %v", v) + } +} + +// ListAliasesProtectionBypass3 - The protection bypass for the alias +type ListAliasesProtectionBypass3 struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope ListAliasesProtectionBypassAliasesScope `json:"scope"` +} + +func (o *ListAliasesProtectionBypass3) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ListAliasesProtectionBypass3) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *ListAliasesProtectionBypass3) GetScope() ListAliasesProtectionBypassAliasesScope { + if o == nil { + return ListAliasesProtectionBypassAliasesScope("") + } + return o.Scope +} + +type ProtectionBypassAccess string + +const ( + ProtectionBypassAccessRequested ProtectionBypassAccess = "requested" + ProtectionBypassAccessGranted ProtectionBypassAccess = "granted" +) + +func (e ProtectionBypassAccess) ToPointer() *ProtectionBypassAccess { + return &e +} +func (e *ProtectionBypassAccess) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "requested": + fallthrough + case "granted": + *e = ProtectionBypassAccess(v) + return nil + default: + return fmt.Errorf("invalid value for ProtectionBypassAccess: %v", v) + } +} + +type ListAliasesProtectionBypassScope string + +const ( + ListAliasesProtectionBypassScopeUser ListAliasesProtectionBypassScope = "user" +) + +func (e ListAliasesProtectionBypassScope) ToPointer() *ListAliasesProtectionBypassScope { + return &e +} +func (e *ListAliasesProtectionBypassScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "user": + *e = ListAliasesProtectionBypassScope(v) + return nil + default: + return fmt.Errorf("invalid value for ListAliasesProtectionBypassScope: %v", v) + } +} + +// ListAliasesProtectionBypass2 - The protection bypass for the alias +type ListAliasesProtectionBypass2 struct { + CreatedAt float64 `json:"createdAt"` + LastUpdatedAt float64 `json:"lastUpdatedAt"` + LastUpdatedBy string `json:"lastUpdatedBy"` + Access ProtectionBypassAccess `json:"access"` + Scope ListAliasesProtectionBypassScope `json:"scope"` +} + +func (o *ListAliasesProtectionBypass2) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ListAliasesProtectionBypass2) GetLastUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.LastUpdatedAt +} + +func (o *ListAliasesProtectionBypass2) GetLastUpdatedBy() string { + if o == nil { + return "" + } + return o.LastUpdatedBy +} + +func (o *ListAliasesProtectionBypass2) GetAccess() ProtectionBypassAccess { + if o == nil { + return ProtectionBypassAccess("") + } + return o.Access +} + +func (o *ListAliasesProtectionBypass2) GetScope() ListAliasesProtectionBypassScope { + if o == nil { + return ListAliasesProtectionBypassScope("") + } + return o.Scope +} + +type ListAliasesProtectionBypassAliasesResponse200Scope string + +const ( + ListAliasesProtectionBypassAliasesResponse200ScopeShareableLink ListAliasesProtectionBypassAliasesResponse200Scope = "shareable-link" +) + +func (e ListAliasesProtectionBypassAliasesResponse200Scope) ToPointer() *ListAliasesProtectionBypassAliasesResponse200Scope { + return &e +} +func (e *ListAliasesProtectionBypassAliasesResponse200Scope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "shareable-link": + *e = ListAliasesProtectionBypassAliasesResponse200Scope(v) + return nil + default: + return fmt.Errorf("invalid value for ListAliasesProtectionBypassAliasesResponse200Scope: %v", v) + } +} + +// ListAliasesProtectionBypass1 - The protection bypass for the alias +type ListAliasesProtectionBypass1 struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope ListAliasesProtectionBypassAliasesResponse200Scope `json:"scope"` +} + +func (o *ListAliasesProtectionBypass1) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ListAliasesProtectionBypass1) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *ListAliasesProtectionBypass1) GetScope() ListAliasesProtectionBypassAliasesResponse200Scope { + if o == nil { + return ListAliasesProtectionBypassAliasesResponse200Scope("") + } + return o.Scope +} + +type ListAliasesProtectionBypassType string + +const ( + ListAliasesProtectionBypassTypeListAliasesProtectionBypass1 ListAliasesProtectionBypassType = "listAliases_protectionBypass_1" + ListAliasesProtectionBypassTypeListAliasesProtectionBypass2 ListAliasesProtectionBypassType = "listAliases_protectionBypass_2" + ListAliasesProtectionBypassTypeListAliasesProtectionBypass3 ListAliasesProtectionBypassType = "listAliases_protectionBypass_3" + ListAliasesProtectionBypassTypeListAliasesProtectionBypass4 ListAliasesProtectionBypassType = "listAliases_protectionBypass_4" +) + +type ListAliasesProtectionBypass struct { + ListAliasesProtectionBypass1 *ListAliasesProtectionBypass1 + ListAliasesProtectionBypass2 *ListAliasesProtectionBypass2 + ListAliasesProtectionBypass3 *ListAliasesProtectionBypass3 + ListAliasesProtectionBypass4 *ListAliasesProtectionBypass4 + + Type ListAliasesProtectionBypassType +} + +func CreateListAliasesProtectionBypassListAliasesProtectionBypass1(listAliasesProtectionBypass1 ListAliasesProtectionBypass1) ListAliasesProtectionBypass { + typ := ListAliasesProtectionBypassTypeListAliasesProtectionBypass1 + + return ListAliasesProtectionBypass{ + ListAliasesProtectionBypass1: &listAliasesProtectionBypass1, + Type: typ, + } +} + +func CreateListAliasesProtectionBypassListAliasesProtectionBypass2(listAliasesProtectionBypass2 ListAliasesProtectionBypass2) ListAliasesProtectionBypass { + typ := ListAliasesProtectionBypassTypeListAliasesProtectionBypass2 + + return ListAliasesProtectionBypass{ + ListAliasesProtectionBypass2: &listAliasesProtectionBypass2, + Type: typ, + } +} + +func CreateListAliasesProtectionBypassListAliasesProtectionBypass3(listAliasesProtectionBypass3 ListAliasesProtectionBypass3) ListAliasesProtectionBypass { + typ := ListAliasesProtectionBypassTypeListAliasesProtectionBypass3 + + return ListAliasesProtectionBypass{ + ListAliasesProtectionBypass3: &listAliasesProtectionBypass3, + Type: typ, + } +} + +func CreateListAliasesProtectionBypassListAliasesProtectionBypass4(listAliasesProtectionBypass4 ListAliasesProtectionBypass4) ListAliasesProtectionBypass { + typ := ListAliasesProtectionBypassTypeListAliasesProtectionBypass4 + + return ListAliasesProtectionBypass{ + ListAliasesProtectionBypass4: &listAliasesProtectionBypass4, + Type: typ, + } +} + +func (u *ListAliasesProtectionBypass) UnmarshalJSON(data []byte) error { + + var listAliasesProtectionBypass1 ListAliasesProtectionBypass1 = ListAliasesProtectionBypass1{} + if err := utils.UnmarshalJSON(data, &listAliasesProtectionBypass1, "", true, true); err == nil { + u.ListAliasesProtectionBypass1 = &listAliasesProtectionBypass1 + u.Type = ListAliasesProtectionBypassTypeListAliasesProtectionBypass1 + return nil + } + + var listAliasesProtectionBypass3 ListAliasesProtectionBypass3 = ListAliasesProtectionBypass3{} + if err := utils.UnmarshalJSON(data, &listAliasesProtectionBypass3, "", true, true); err == nil { + u.ListAliasesProtectionBypass3 = &listAliasesProtectionBypass3 + u.Type = ListAliasesProtectionBypassTypeListAliasesProtectionBypass3 + return nil + } + + var listAliasesProtectionBypass4 ListAliasesProtectionBypass4 = ListAliasesProtectionBypass4{} + if err := utils.UnmarshalJSON(data, &listAliasesProtectionBypass4, "", true, true); err == nil { + u.ListAliasesProtectionBypass4 = &listAliasesProtectionBypass4 + u.Type = ListAliasesProtectionBypassTypeListAliasesProtectionBypass4 + return nil + } + + var listAliasesProtectionBypass2 ListAliasesProtectionBypass2 = ListAliasesProtectionBypass2{} + if err := utils.UnmarshalJSON(data, &listAliasesProtectionBypass2, "", true, true); err == nil { + u.ListAliasesProtectionBypass2 = &listAliasesProtectionBypass2 + u.Type = ListAliasesProtectionBypassTypeListAliasesProtectionBypass2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ListAliasesProtectionBypass", string(data)) +} + +func (u ListAliasesProtectionBypass) MarshalJSON() ([]byte, error) { + if u.ListAliasesProtectionBypass1 != nil { + return utils.MarshalJSON(u.ListAliasesProtectionBypass1, "", true) + } + + if u.ListAliasesProtectionBypass2 != nil { + return utils.MarshalJSON(u.ListAliasesProtectionBypass2, "", true) + } + + if u.ListAliasesProtectionBypass3 != nil { + return utils.MarshalJSON(u.ListAliasesProtectionBypass3, "", true) + } + + if u.ListAliasesProtectionBypass4 != nil { + return utils.MarshalJSON(u.ListAliasesProtectionBypass4, "", true) + } + + return nil, errors.New("could not marshal union type ListAliasesProtectionBypass: all fields are null") +} + +type Aliases struct { + // The alias name, it could be a `.vercel.app` subdomain or a custom domain + Alias string `json:"alias"` + // The date when the alias was created + Created time.Time `json:"created"` + // The date when the alias was created in milliseconds since the UNIX epoch + CreatedAt *float64 `json:"createdAt,omitempty"` + // Information of the user who created the alias + Creator *ListAliasesCreator `json:"creator,omitempty"` + // The date when the alias was deleted in milliseconds since the UNIX epoch + DeletedAt *float64 `json:"deletedAt,omitempty"` + // A map with the deployment ID, URL and metadata + Deployment *ListAliasesDeployment `json:"deployment,omitempty"` + // The deployment ID + DeploymentID *string `json:"deploymentId"` + // The unique identifier of the project + ProjectID *string `json:"projectId"` + // Target destination domain for redirect when the alias is a redirect + Redirect *string `json:"redirect,omitempty"` + // Status code to be used on redirect + RedirectStatusCode *float64 `json:"redirectStatusCode,omitempty"` + // The unique identifier of the alias + UID string `json:"uid"` + // The date when the alias was updated in milliseconds since the UNIX epoch + UpdatedAt *float64 `json:"updatedAt,omitempty"` + // The protection bypass for the alias + ProtectionBypass map[string]ListAliasesProtectionBypass `json:"protectionBypass,omitempty"` +} + +func (a Aliases) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *Aliases) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Aliases) GetAlias() string { + if o == nil { + return "" + } + return o.Alias +} + +func (o *Aliases) GetCreated() time.Time { + if o == nil { + return time.Time{} + } + return o.Created +} + +func (o *Aliases) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Aliases) GetCreator() *ListAliasesCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *Aliases) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *Aliases) GetDeployment() *ListAliasesDeployment { + if o == nil { + return nil + } + return o.Deployment +} + +func (o *Aliases) GetDeploymentID() *string { + if o == nil { + return nil + } + return o.DeploymentID +} + +func (o *Aliases) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *Aliases) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *Aliases) GetRedirectStatusCode() *float64 { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +func (o *Aliases) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *Aliases) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Aliases) GetProtectionBypass() map[string]ListAliasesProtectionBypass { + if o == nil { + return nil + } + return o.ProtectionBypass +} + +// ListAliasesResponseBody - The paginated list of aliases +type ListAliasesResponseBody struct { + Aliases []Aliases `json:"aliases"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *ListAliasesResponseBody) GetAliases() []Aliases { + if o == nil { + return []Aliases{} + } + return o.Aliases +} + +func (o *ListAliasesResponseBody) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type ListAliasesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The paginated list of aliases + Object *ListAliasesResponseBody +} + +func (o *ListAliasesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListAliasesResponse) GetObject() *ListAliasesResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listauthtokens.go b/src/__tests__/mockserver/internal/sdk/models/operations/listauthtokens.go new file mode 100644 index 00000000..3cb2a27f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listauthtokens.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListAuthTokensResponseBody struct { + Tokens []components.AuthToken `json:"tokens"` + // Authentication token metadata. + TestingToken *components.AuthToken `json:"testingToken,omitempty"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *ListAuthTokensResponseBody) GetTokens() []components.AuthToken { + if o == nil { + return []components.AuthToken{} + } + return o.Tokens +} + +func (o *ListAuthTokensResponseBody) GetTestingToken() *components.AuthToken { + if o == nil { + return nil + } + return o.TestingToken +} + +func (o *ListAuthTokensResponseBody) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type ListAuthTokensResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *ListAuthTokensResponseBody +} + +func (o *ListAuthTokensResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListAuthTokensResponse) GetObject() *ListAuthTokensResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listdeploymentaliases.go b/src/__tests__/mockserver/internal/sdk/models/operations/listdeploymentaliases.go new file mode 100644 index 00000000..3d2da93a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listdeploymentaliases.go @@ -0,0 +1,496 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "time" +) + +type ListDeploymentAliasesRequest struct { + // The ID of the deployment the aliases should be listed for + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ListDeploymentAliasesRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ListDeploymentAliasesRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ListDeploymentAliasesRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ListDeploymentAliasesProtectionBypassAliasesResponse200Scope string + +const ( + ListDeploymentAliasesProtectionBypassAliasesResponse200ScopeEmailInvite ListDeploymentAliasesProtectionBypassAliasesResponse200Scope = "email_invite" +) + +func (e ListDeploymentAliasesProtectionBypassAliasesResponse200Scope) ToPointer() *ListDeploymentAliasesProtectionBypassAliasesResponse200Scope { + return &e +} +func (e *ListDeploymentAliasesProtectionBypassAliasesResponse200Scope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "email_invite": + *e = ListDeploymentAliasesProtectionBypassAliasesResponse200Scope(v) + return nil + default: + return fmt.Errorf("invalid value for ListDeploymentAliasesProtectionBypassAliasesResponse200Scope: %v", v) + } +} + +// ListDeploymentAliasesProtectionBypass4 - The protection bypass for the alias +type ListDeploymentAliasesProtectionBypass4 struct { + CreatedAt float64 `json:"createdAt"` + LastUpdatedAt float64 `json:"lastUpdatedAt"` + LastUpdatedBy string `json:"lastUpdatedBy"` + Scope ListDeploymentAliasesProtectionBypassAliasesResponse200Scope `json:"scope"` +} + +func (o *ListDeploymentAliasesProtectionBypass4) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ListDeploymentAliasesProtectionBypass4) GetLastUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.LastUpdatedAt +} + +func (o *ListDeploymentAliasesProtectionBypass4) GetLastUpdatedBy() string { + if o == nil { + return "" + } + return o.LastUpdatedBy +} + +func (o *ListDeploymentAliasesProtectionBypass4) GetScope() ListDeploymentAliasesProtectionBypassAliasesResponse200Scope { + if o == nil { + return ListDeploymentAliasesProtectionBypassAliasesResponse200Scope("") + } + return o.Scope +} + +type ListDeploymentAliasesProtectionBypassAliasesResponseScope string + +const ( + ListDeploymentAliasesProtectionBypassAliasesResponseScopeAliasProtectionOverride ListDeploymentAliasesProtectionBypassAliasesResponseScope = "alias-protection-override" +) + +func (e ListDeploymentAliasesProtectionBypassAliasesResponseScope) ToPointer() *ListDeploymentAliasesProtectionBypassAliasesResponseScope { + return &e +} +func (e *ListDeploymentAliasesProtectionBypassAliasesResponseScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "alias-protection-override": + *e = ListDeploymentAliasesProtectionBypassAliasesResponseScope(v) + return nil + default: + return fmt.Errorf("invalid value for ListDeploymentAliasesProtectionBypassAliasesResponseScope: %v", v) + } +} + +// ListDeploymentAliasesProtectionBypass3 - The protection bypass for the alias +type ListDeploymentAliasesProtectionBypass3 struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope ListDeploymentAliasesProtectionBypassAliasesResponseScope `json:"scope"` +} + +func (o *ListDeploymentAliasesProtectionBypass3) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ListDeploymentAliasesProtectionBypass3) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *ListDeploymentAliasesProtectionBypass3) GetScope() ListDeploymentAliasesProtectionBypassAliasesResponseScope { + if o == nil { + return ListDeploymentAliasesProtectionBypassAliasesResponseScope("") + } + return o.Scope +} + +type ListDeploymentAliasesProtectionBypassAccess string + +const ( + ListDeploymentAliasesProtectionBypassAccessRequested ListDeploymentAliasesProtectionBypassAccess = "requested" + ListDeploymentAliasesProtectionBypassAccessGranted ListDeploymentAliasesProtectionBypassAccess = "granted" +) + +func (e ListDeploymentAliasesProtectionBypassAccess) ToPointer() *ListDeploymentAliasesProtectionBypassAccess { + return &e +} +func (e *ListDeploymentAliasesProtectionBypassAccess) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "requested": + fallthrough + case "granted": + *e = ListDeploymentAliasesProtectionBypassAccess(v) + return nil + default: + return fmt.Errorf("invalid value for ListDeploymentAliasesProtectionBypassAccess: %v", v) + } +} + +type ListDeploymentAliasesProtectionBypassAliasesScope string + +const ( + ListDeploymentAliasesProtectionBypassAliasesScopeUser ListDeploymentAliasesProtectionBypassAliasesScope = "user" +) + +func (e ListDeploymentAliasesProtectionBypassAliasesScope) ToPointer() *ListDeploymentAliasesProtectionBypassAliasesScope { + return &e +} +func (e *ListDeploymentAliasesProtectionBypassAliasesScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "user": + *e = ListDeploymentAliasesProtectionBypassAliasesScope(v) + return nil + default: + return fmt.Errorf("invalid value for ListDeploymentAliasesProtectionBypassAliasesScope: %v", v) + } +} + +// ListDeploymentAliasesProtectionBypass2 - The protection bypass for the alias +type ListDeploymentAliasesProtectionBypass2 struct { + CreatedAt float64 `json:"createdAt"` + LastUpdatedAt float64 `json:"lastUpdatedAt"` + LastUpdatedBy string `json:"lastUpdatedBy"` + Access ListDeploymentAliasesProtectionBypassAccess `json:"access"` + Scope ListDeploymentAliasesProtectionBypassAliasesScope `json:"scope"` +} + +func (o *ListDeploymentAliasesProtectionBypass2) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ListDeploymentAliasesProtectionBypass2) GetLastUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.LastUpdatedAt +} + +func (o *ListDeploymentAliasesProtectionBypass2) GetLastUpdatedBy() string { + if o == nil { + return "" + } + return o.LastUpdatedBy +} + +func (o *ListDeploymentAliasesProtectionBypass2) GetAccess() ListDeploymentAliasesProtectionBypassAccess { + if o == nil { + return ListDeploymentAliasesProtectionBypassAccess("") + } + return o.Access +} + +func (o *ListDeploymentAliasesProtectionBypass2) GetScope() ListDeploymentAliasesProtectionBypassAliasesScope { + if o == nil { + return ListDeploymentAliasesProtectionBypassAliasesScope("") + } + return o.Scope +} + +type ListDeploymentAliasesProtectionBypassScope string + +const ( + ListDeploymentAliasesProtectionBypassScopeShareableLink ListDeploymentAliasesProtectionBypassScope = "shareable-link" +) + +func (e ListDeploymentAliasesProtectionBypassScope) ToPointer() *ListDeploymentAliasesProtectionBypassScope { + return &e +} +func (e *ListDeploymentAliasesProtectionBypassScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "shareable-link": + *e = ListDeploymentAliasesProtectionBypassScope(v) + return nil + default: + return fmt.Errorf("invalid value for ListDeploymentAliasesProtectionBypassScope: %v", v) + } +} + +// ListDeploymentAliasesProtectionBypass1 - The protection bypass for the alias +type ListDeploymentAliasesProtectionBypass1 struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope ListDeploymentAliasesProtectionBypassScope `json:"scope"` +} + +func (o *ListDeploymentAliasesProtectionBypass1) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ListDeploymentAliasesProtectionBypass1) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *ListDeploymentAliasesProtectionBypass1) GetScope() ListDeploymentAliasesProtectionBypassScope { + if o == nil { + return ListDeploymentAliasesProtectionBypassScope("") + } + return o.Scope +} + +type ListDeploymentAliasesProtectionBypassType string + +const ( + ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass1 ListDeploymentAliasesProtectionBypassType = "listDeploymentAliases_protectionBypass_1" + ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass2 ListDeploymentAliasesProtectionBypassType = "listDeploymentAliases_protectionBypass_2" + ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass3 ListDeploymentAliasesProtectionBypassType = "listDeploymentAliases_protectionBypass_3" + ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass4 ListDeploymentAliasesProtectionBypassType = "listDeploymentAliases_protectionBypass_4" +) + +type ListDeploymentAliasesProtectionBypass struct { + ListDeploymentAliasesProtectionBypass1 *ListDeploymentAliasesProtectionBypass1 + ListDeploymentAliasesProtectionBypass2 *ListDeploymentAliasesProtectionBypass2 + ListDeploymentAliasesProtectionBypass3 *ListDeploymentAliasesProtectionBypass3 + ListDeploymentAliasesProtectionBypass4 *ListDeploymentAliasesProtectionBypass4 + + Type ListDeploymentAliasesProtectionBypassType +} + +func CreateListDeploymentAliasesProtectionBypassListDeploymentAliasesProtectionBypass1(listDeploymentAliasesProtectionBypass1 ListDeploymentAliasesProtectionBypass1) ListDeploymentAliasesProtectionBypass { + typ := ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass1 + + return ListDeploymentAliasesProtectionBypass{ + ListDeploymentAliasesProtectionBypass1: &listDeploymentAliasesProtectionBypass1, + Type: typ, + } +} + +func CreateListDeploymentAliasesProtectionBypassListDeploymentAliasesProtectionBypass2(listDeploymentAliasesProtectionBypass2 ListDeploymentAliasesProtectionBypass2) ListDeploymentAliasesProtectionBypass { + typ := ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass2 + + return ListDeploymentAliasesProtectionBypass{ + ListDeploymentAliasesProtectionBypass2: &listDeploymentAliasesProtectionBypass2, + Type: typ, + } +} + +func CreateListDeploymentAliasesProtectionBypassListDeploymentAliasesProtectionBypass3(listDeploymentAliasesProtectionBypass3 ListDeploymentAliasesProtectionBypass3) ListDeploymentAliasesProtectionBypass { + typ := ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass3 + + return ListDeploymentAliasesProtectionBypass{ + ListDeploymentAliasesProtectionBypass3: &listDeploymentAliasesProtectionBypass3, + Type: typ, + } +} + +func CreateListDeploymentAliasesProtectionBypassListDeploymentAliasesProtectionBypass4(listDeploymentAliasesProtectionBypass4 ListDeploymentAliasesProtectionBypass4) ListDeploymentAliasesProtectionBypass { + typ := ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass4 + + return ListDeploymentAliasesProtectionBypass{ + ListDeploymentAliasesProtectionBypass4: &listDeploymentAliasesProtectionBypass4, + Type: typ, + } +} + +func (u *ListDeploymentAliasesProtectionBypass) UnmarshalJSON(data []byte) error { + + var listDeploymentAliasesProtectionBypass1 ListDeploymentAliasesProtectionBypass1 = ListDeploymentAliasesProtectionBypass1{} + if err := utils.UnmarshalJSON(data, &listDeploymentAliasesProtectionBypass1, "", true, true); err == nil { + u.ListDeploymentAliasesProtectionBypass1 = &listDeploymentAliasesProtectionBypass1 + u.Type = ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass1 + return nil + } + + var listDeploymentAliasesProtectionBypass3 ListDeploymentAliasesProtectionBypass3 = ListDeploymentAliasesProtectionBypass3{} + if err := utils.UnmarshalJSON(data, &listDeploymentAliasesProtectionBypass3, "", true, true); err == nil { + u.ListDeploymentAliasesProtectionBypass3 = &listDeploymentAliasesProtectionBypass3 + u.Type = ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass3 + return nil + } + + var listDeploymentAliasesProtectionBypass4 ListDeploymentAliasesProtectionBypass4 = ListDeploymentAliasesProtectionBypass4{} + if err := utils.UnmarshalJSON(data, &listDeploymentAliasesProtectionBypass4, "", true, true); err == nil { + u.ListDeploymentAliasesProtectionBypass4 = &listDeploymentAliasesProtectionBypass4 + u.Type = ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass4 + return nil + } + + var listDeploymentAliasesProtectionBypass2 ListDeploymentAliasesProtectionBypass2 = ListDeploymentAliasesProtectionBypass2{} + if err := utils.UnmarshalJSON(data, &listDeploymentAliasesProtectionBypass2, "", true, true); err == nil { + u.ListDeploymentAliasesProtectionBypass2 = &listDeploymentAliasesProtectionBypass2 + u.Type = ListDeploymentAliasesProtectionBypassTypeListDeploymentAliasesProtectionBypass2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ListDeploymentAliasesProtectionBypass", string(data)) +} + +func (u ListDeploymentAliasesProtectionBypass) MarshalJSON() ([]byte, error) { + if u.ListDeploymentAliasesProtectionBypass1 != nil { + return utils.MarshalJSON(u.ListDeploymentAliasesProtectionBypass1, "", true) + } + + if u.ListDeploymentAliasesProtectionBypass2 != nil { + return utils.MarshalJSON(u.ListDeploymentAliasesProtectionBypass2, "", true) + } + + if u.ListDeploymentAliasesProtectionBypass3 != nil { + return utils.MarshalJSON(u.ListDeploymentAliasesProtectionBypass3, "", true) + } + + if u.ListDeploymentAliasesProtectionBypass4 != nil { + return utils.MarshalJSON(u.ListDeploymentAliasesProtectionBypass4, "", true) + } + + return nil, errors.New("could not marshal union type ListDeploymentAliasesProtectionBypass: all fields are null") +} + +// ListDeploymentAliasesAliases - A list of the aliases assigned to the deployment +type ListDeploymentAliasesAliases struct { + // The unique identifier of the alias + UID string `json:"uid"` + // The alias name, it could be a `.vercel.app` subdomain or a custom domain + Alias string `json:"alias"` + // The date when the alias was created + Created time.Time `json:"created"` + // Target destination domain for redirect when the alias is a redirect + Redirect *string `json:"redirect,omitempty"` + // The protection bypass for the alias + ProtectionBypass map[string]ListDeploymentAliasesProtectionBypass `json:"protectionBypass,omitempty"` +} + +func (l ListDeploymentAliasesAliases) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *ListDeploymentAliasesAliases) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ListDeploymentAliasesAliases) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *ListDeploymentAliasesAliases) GetAlias() string { + if o == nil { + return "" + } + return o.Alias +} + +func (o *ListDeploymentAliasesAliases) GetCreated() time.Time { + if o == nil { + return time.Time{} + } + return o.Created +} + +func (o *ListDeploymentAliasesAliases) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *ListDeploymentAliasesAliases) GetProtectionBypass() map[string]ListDeploymentAliasesProtectionBypass { + if o == nil { + return nil + } + return o.ProtectionBypass +} + +// ListDeploymentAliasesResponseBody - The list of aliases assigned to the deployment +type ListDeploymentAliasesResponseBody struct { + // A list of the aliases assigned to the deployment + Aliases []ListDeploymentAliasesAliases `json:"aliases"` +} + +func (o *ListDeploymentAliasesResponseBody) GetAliases() []ListDeploymentAliasesAliases { + if o == nil { + return []ListDeploymentAliasesAliases{} + } + return o.Aliases +} + +type ListDeploymentAliasesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The list of aliases assigned to the deployment + Object *ListDeploymentAliasesResponseBody +} + +func (o *ListDeploymentAliasesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListDeploymentAliasesResponse) GetObject() *ListDeploymentAliasesResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listdeploymentfiles.go b/src/__tests__/mockserver/internal/sdk/models/operations/listdeploymentfiles.go new file mode 100644 index 00000000..5d6e234a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listdeploymentfiles.go @@ -0,0 +1,57 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListDeploymentFilesRequest struct { + // The unique deployment identifier + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ListDeploymentFilesRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *ListDeploymentFilesRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ListDeploymentFilesRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ListDeploymentFilesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Retrieved the file tree successfully + FileTrees []components.FileTree +} + +func (o *ListDeploymentFilesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListDeploymentFilesResponse) GetFileTrees() []components.FileTree { + if o == nil { + return nil + } + return o.FileTrees +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listpromotealiases.go b/src/__tests__/mockserver/internal/sdk/models/operations/listpromotealiases.go new file mode 100644 index 00000000..201c3664 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listpromotealiases.go @@ -0,0 +1,207 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type ListPromoteAliasesRequest struct { + ProjectID string `pathParam:"style=simple,explode=false,name=projectId"` + // Maximum number of aliases to list from a request (max 100). + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Get aliases created after this epoch timestamp. + Since *float64 `queryParam:"style=form,explode=true,name=since"` + // Get aliases created before this epoch timestamp. + Until *float64 `queryParam:"style=form,explode=true,name=until"` + // Filter results down to aliases that failed to map to the requested deployment + FailedOnly *bool `queryParam:"style=form,explode=true,name=failedOnly"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ListPromoteAliasesRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *ListPromoteAliasesRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *ListPromoteAliasesRequest) GetSince() *float64 { + if o == nil { + return nil + } + return o.Since +} + +func (o *ListPromoteAliasesRequest) GetUntil() *float64 { + if o == nil { + return nil + } + return o.Until +} + +func (o *ListPromoteAliasesRequest) GetFailedOnly() *bool { + if o == nil { + return nil + } + return o.FailedOnly +} + +func (o *ListPromoteAliasesRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ListPromoteAliasesRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ResponseBodyAliases struct { + Status string `json:"status"` + Alias string `json:"alias"` + ID string `json:"id"` +} + +func (o *ResponseBodyAliases) GetStatus() string { + if o == nil { + return "" + } + return o.Status +} + +func (o *ResponseBodyAliases) GetAlias() string { + if o == nil { + return "" + } + return o.Alias +} + +func (o *ResponseBodyAliases) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type ListPromoteAliasesResponseBody2 struct { + Aliases []ResponseBodyAliases `json:"aliases"` + // This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. + Pagination components.Pagination `json:"pagination"` +} + +func (o *ListPromoteAliasesResponseBody2) GetAliases() []ResponseBodyAliases { + if o == nil { + return []ResponseBodyAliases{} + } + return o.Aliases +} + +func (o *ListPromoteAliasesResponseBody2) GetPagination() components.Pagination { + if o == nil { + return components.Pagination{} + } + return o.Pagination +} + +type ListPromoteAliasesResponseBody1 struct { +} + +type ListPromoteAliasesResponseBodyType string + +const ( + ListPromoteAliasesResponseBodyTypeListPromoteAliasesResponseBody1 ListPromoteAliasesResponseBodyType = "listPromoteAliases_responseBody_1" + ListPromoteAliasesResponseBodyTypeListPromoteAliasesResponseBody2 ListPromoteAliasesResponseBodyType = "listPromoteAliases_responseBody_2" +) + +type ListPromoteAliasesResponseBody struct { + ListPromoteAliasesResponseBody1 *ListPromoteAliasesResponseBody1 + ListPromoteAliasesResponseBody2 *ListPromoteAliasesResponseBody2 + + Type ListPromoteAliasesResponseBodyType +} + +func CreateListPromoteAliasesResponseBodyListPromoteAliasesResponseBody1(listPromoteAliasesResponseBody1 ListPromoteAliasesResponseBody1) ListPromoteAliasesResponseBody { + typ := ListPromoteAliasesResponseBodyTypeListPromoteAliasesResponseBody1 + + return ListPromoteAliasesResponseBody{ + ListPromoteAliasesResponseBody1: &listPromoteAliasesResponseBody1, + Type: typ, + } +} + +func CreateListPromoteAliasesResponseBodyListPromoteAliasesResponseBody2(listPromoteAliasesResponseBody2 ListPromoteAliasesResponseBody2) ListPromoteAliasesResponseBody { + typ := ListPromoteAliasesResponseBodyTypeListPromoteAliasesResponseBody2 + + return ListPromoteAliasesResponseBody{ + ListPromoteAliasesResponseBody2: &listPromoteAliasesResponseBody2, + Type: typ, + } +} + +func (u *ListPromoteAliasesResponseBody) UnmarshalJSON(data []byte) error { + + var listPromoteAliasesResponseBody1 ListPromoteAliasesResponseBody1 = ListPromoteAliasesResponseBody1{} + if err := utils.UnmarshalJSON(data, &listPromoteAliasesResponseBody1, "", true, true); err == nil { + u.ListPromoteAliasesResponseBody1 = &listPromoteAliasesResponseBody1 + u.Type = ListPromoteAliasesResponseBodyTypeListPromoteAliasesResponseBody1 + return nil + } + + var listPromoteAliasesResponseBody2 ListPromoteAliasesResponseBody2 = ListPromoteAliasesResponseBody2{} + if err := utils.UnmarshalJSON(data, &listPromoteAliasesResponseBody2, "", true, true); err == nil { + u.ListPromoteAliasesResponseBody2 = &listPromoteAliasesResponseBody2 + u.Type = ListPromoteAliasesResponseBodyTypeListPromoteAliasesResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ListPromoteAliasesResponseBody", string(data)) +} + +func (u ListPromoteAliasesResponseBody) MarshalJSON() ([]byte, error) { + if u.ListPromoteAliasesResponseBody1 != nil { + return utils.MarshalJSON(u.ListPromoteAliasesResponseBody1, "", true) + } + + if u.ListPromoteAliasesResponseBody2 != nil { + return utils.MarshalJSON(u.ListPromoteAliasesResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type ListPromoteAliasesResponseBody: all fields are null") +} + +type ListPromoteAliasesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *ListPromoteAliasesResponseBody +} + +func (o *ListPromoteAliasesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListPromoteAliasesResponse) GetOneOf() *ListPromoteAliasesResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/listuserevents.go b/src/__tests__/mockserver/internal/sdk/models/operations/listuserevents.go new file mode 100644 index 00000000..0276d062 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/listuserevents.go @@ -0,0 +1,115 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListUserEventsRequest struct { + // Maximum number of items which may be returned. + Limit *float64 `queryParam:"style=form,explode=true,name=limit"` + // Timestamp to only include items created since then. + Since *string `queryParam:"style=form,explode=true,name=since"` + // Timestamp to only include items created until then. + Until *string `queryParam:"style=form,explode=true,name=until"` + // Comma-delimited list of event \"types\" to filter the results by. + Types *string `queryParam:"style=form,explode=true,name=types"` + // When retrieving events for a Team, the `userId` parameter may be specified to filter events generated by a specific member of the Team. + UserID *string `queryParam:"style=form,explode=true,name=userId"` + // When set to `true`, the response will include the `payload` field for each event. + WithPayload *string `queryParam:"style=form,explode=true,name=withPayload"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ListUserEventsRequest) GetLimit() *float64 { + if o == nil { + return nil + } + return o.Limit +} + +func (o *ListUserEventsRequest) GetSince() *string { + if o == nil { + return nil + } + return o.Since +} + +func (o *ListUserEventsRequest) GetUntil() *string { + if o == nil { + return nil + } + return o.Until +} + +func (o *ListUserEventsRequest) GetTypes() *string { + if o == nil { + return nil + } + return o.Types +} + +func (o *ListUserEventsRequest) GetUserID() *string { + if o == nil { + return nil + } + return o.UserID +} + +func (o *ListUserEventsRequest) GetWithPayload() *string { + if o == nil { + return nil + } + return o.WithPayload +} + +func (o *ListUserEventsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ListUserEventsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// ListUserEventsResponseBody - Successful response. +type ListUserEventsResponseBody struct { + // Array of events generated by the User. + Events []components.UserEvent `json:"events"` +} + +func (o *ListUserEventsResponseBody) GetEvents() []components.UserEvent { + if o == nil { + return []components.UserEvent{} + } + return o.Events +} + +type ListUserEventsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + Object *ListUserEventsResponseBody +} + +func (o *ListUserEventsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListUserEventsResponse) GetObject() *ListUserEventsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/patchdomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/patchdomain.go new file mode 100644 index 00000000..17aca86c --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/patchdomain.go @@ -0,0 +1,331 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// PatchDomainRequestBody2 - move-out +type PatchDomainRequestBody2 struct { + Op *string `json:"op,omitempty"` + // User or team to move domain to + Destination *string `json:"destination,omitempty"` +} + +func (o *PatchDomainRequestBody2) GetOp() *string { + if o == nil { + return nil + } + return o.Op +} + +func (o *PatchDomainRequestBody2) GetDestination() *string { + if o == nil { + return nil + } + return o.Destination +} + +// PatchDomainRequestBody1 - update +type PatchDomainRequestBody1 struct { + Op *string `json:"op,omitempty"` + // Specifies whether domain should be renewed. + Renew *bool `json:"renew,omitempty"` + // The custom nameservers for this project. + CustomNameservers []string `json:"customNameservers,omitempty"` + // Specifies whether this is a DNS zone that intends to use Vercel's nameservers. + Zone *bool `json:"zone,omitempty"` +} + +func (o *PatchDomainRequestBody1) GetOp() *string { + if o == nil { + return nil + } + return o.Op +} + +func (o *PatchDomainRequestBody1) GetRenew() *bool { + if o == nil { + return nil + } + return o.Renew +} + +func (o *PatchDomainRequestBody1) GetCustomNameservers() []string { + if o == nil { + return nil + } + return o.CustomNameservers +} + +func (o *PatchDomainRequestBody1) GetZone() *bool { + if o == nil { + return nil + } + return o.Zone +} + +type PatchDomainRequestBodyType string + +const ( + PatchDomainRequestBodyTypePatchDomainRequestBody1 PatchDomainRequestBodyType = "patchDomain_requestBody_1" + PatchDomainRequestBodyTypePatchDomainRequestBody2 PatchDomainRequestBodyType = "patchDomain_requestBody_2" +) + +type PatchDomainRequestBody struct { + PatchDomainRequestBody1 *PatchDomainRequestBody1 + PatchDomainRequestBody2 *PatchDomainRequestBody2 + + Type PatchDomainRequestBodyType +} + +func CreatePatchDomainRequestBodyPatchDomainRequestBody1(patchDomainRequestBody1 PatchDomainRequestBody1) PatchDomainRequestBody { + typ := PatchDomainRequestBodyTypePatchDomainRequestBody1 + + return PatchDomainRequestBody{ + PatchDomainRequestBody1: &patchDomainRequestBody1, + Type: typ, + } +} + +func CreatePatchDomainRequestBodyPatchDomainRequestBody2(patchDomainRequestBody2 PatchDomainRequestBody2) PatchDomainRequestBody { + typ := PatchDomainRequestBodyTypePatchDomainRequestBody2 + + return PatchDomainRequestBody{ + PatchDomainRequestBody2: &patchDomainRequestBody2, + Type: typ, + } +} + +func (u *PatchDomainRequestBody) UnmarshalJSON(data []byte) error { + + var patchDomainRequestBody2 PatchDomainRequestBody2 = PatchDomainRequestBody2{} + if err := utils.UnmarshalJSON(data, &patchDomainRequestBody2, "", true, true); err == nil { + u.PatchDomainRequestBody2 = &patchDomainRequestBody2 + u.Type = PatchDomainRequestBodyTypePatchDomainRequestBody2 + return nil + } + + var patchDomainRequestBody1 PatchDomainRequestBody1 = PatchDomainRequestBody1{} + if err := utils.UnmarshalJSON(data, &patchDomainRequestBody1, "", true, true); err == nil { + u.PatchDomainRequestBody1 = &patchDomainRequestBody1 + u.Type = PatchDomainRequestBodyTypePatchDomainRequestBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for PatchDomainRequestBody", string(data)) +} + +func (u PatchDomainRequestBody) MarshalJSON() ([]byte, error) { + if u.PatchDomainRequestBody1 != nil { + return utils.MarshalJSON(u.PatchDomainRequestBody1, "", true) + } + + if u.PatchDomainRequestBody2 != nil { + return utils.MarshalJSON(u.PatchDomainRequestBody2, "", true) + } + + return nil, errors.New("could not marshal union type PatchDomainRequestBody: all fields are null") +} + +type PatchDomainRequest struct { + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody PatchDomainRequestBody `request:"mediaType=application/json"` +} + +func (o *PatchDomainRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *PatchDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *PatchDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PatchDomainRequest) GetRequestBody() PatchDomainRequestBody { + if o == nil { + return PatchDomainRequestBody{} + } + return o.RequestBody +} + +type PatchDomainResponseBody3 struct { + Renew *bool `json:"renew,omitempty"` + CustomNameservers []string `json:"customNameservers,omitempty"` + Zone *bool `json:"zone,omitempty"` +} + +func (o *PatchDomainResponseBody3) GetRenew() *bool { + if o == nil { + return nil + } + return o.Renew +} + +func (o *PatchDomainResponseBody3) GetCustomNameservers() []string { + if o == nil { + return nil + } + return o.CustomNameservers +} + +func (o *PatchDomainResponseBody3) GetZone() *bool { + if o == nil { + return nil + } + return o.Zone +} + +type PatchDomainResponseBody2 struct { + Moved bool `json:"moved"` + Token string `json:"token"` +} + +func (o *PatchDomainResponseBody2) GetMoved() bool { + if o == nil { + return false + } + return o.Moved +} + +func (o *PatchDomainResponseBody2) GetToken() string { + if o == nil { + return "" + } + return o.Token +} + +type PatchDomainResponseBody1 struct { + Moved bool `json:"moved"` +} + +func (o *PatchDomainResponseBody1) GetMoved() bool { + if o == nil { + return false + } + return o.Moved +} + +type PatchDomainResponseBodyType string + +const ( + PatchDomainResponseBodyTypePatchDomainResponseBody1 PatchDomainResponseBodyType = "patchDomain_responseBody_1" + PatchDomainResponseBodyTypePatchDomainResponseBody2 PatchDomainResponseBodyType = "patchDomain_responseBody_2" + PatchDomainResponseBodyTypePatchDomainResponseBody3 PatchDomainResponseBodyType = "patchDomain_responseBody_3" +) + +type PatchDomainResponseBody struct { + PatchDomainResponseBody1 *PatchDomainResponseBody1 + PatchDomainResponseBody2 *PatchDomainResponseBody2 + PatchDomainResponseBody3 *PatchDomainResponseBody3 + + Type PatchDomainResponseBodyType +} + +func CreatePatchDomainResponseBodyPatchDomainResponseBody1(patchDomainResponseBody1 PatchDomainResponseBody1) PatchDomainResponseBody { + typ := PatchDomainResponseBodyTypePatchDomainResponseBody1 + + return PatchDomainResponseBody{ + PatchDomainResponseBody1: &patchDomainResponseBody1, + Type: typ, + } +} + +func CreatePatchDomainResponseBodyPatchDomainResponseBody2(patchDomainResponseBody2 PatchDomainResponseBody2) PatchDomainResponseBody { + typ := PatchDomainResponseBodyTypePatchDomainResponseBody2 + + return PatchDomainResponseBody{ + PatchDomainResponseBody2: &patchDomainResponseBody2, + Type: typ, + } +} + +func CreatePatchDomainResponseBodyPatchDomainResponseBody3(patchDomainResponseBody3 PatchDomainResponseBody3) PatchDomainResponseBody { + typ := PatchDomainResponseBodyTypePatchDomainResponseBody3 + + return PatchDomainResponseBody{ + PatchDomainResponseBody3: &patchDomainResponseBody3, + Type: typ, + } +} + +func (u *PatchDomainResponseBody) UnmarshalJSON(data []byte) error { + + var patchDomainResponseBody1 PatchDomainResponseBody1 = PatchDomainResponseBody1{} + if err := utils.UnmarshalJSON(data, &patchDomainResponseBody1, "", true, true); err == nil { + u.PatchDomainResponseBody1 = &patchDomainResponseBody1 + u.Type = PatchDomainResponseBodyTypePatchDomainResponseBody1 + return nil + } + + var patchDomainResponseBody2 PatchDomainResponseBody2 = PatchDomainResponseBody2{} + if err := utils.UnmarshalJSON(data, &patchDomainResponseBody2, "", true, true); err == nil { + u.PatchDomainResponseBody2 = &patchDomainResponseBody2 + u.Type = PatchDomainResponseBodyTypePatchDomainResponseBody2 + return nil + } + + var patchDomainResponseBody3 PatchDomainResponseBody3 = PatchDomainResponseBody3{} + if err := utils.UnmarshalJSON(data, &patchDomainResponseBody3, "", true, true); err == nil { + u.PatchDomainResponseBody3 = &patchDomainResponseBody3 + u.Type = PatchDomainResponseBodyTypePatchDomainResponseBody3 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for PatchDomainResponseBody", string(data)) +} + +func (u PatchDomainResponseBody) MarshalJSON() ([]byte, error) { + if u.PatchDomainResponseBody1 != nil { + return utils.MarshalJSON(u.PatchDomainResponseBody1, "", true) + } + + if u.PatchDomainResponseBody2 != nil { + return utils.MarshalJSON(u.PatchDomainResponseBody2, "", true) + } + + if u.PatchDomainResponseBody3 != nil { + return utils.MarshalJSON(u.PatchDomainResponseBody3, "", true) + } + + return nil, errors.New("could not marshal union type PatchDomainResponseBody: all fields are null") +} + +type PatchDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *PatchDomainResponseBody +} + +func (o *PatchDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PatchDomainResponse) GetOneOf() *PatchDomainResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/patchedgeconfigschema.go b/src/__tests__/mockserver/internal/sdk/models/operations/patchedgeconfigschema.go new file mode 100644 index 00000000..7869e9a7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/patchedgeconfigschema.go @@ -0,0 +1,86 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PatchEdgeConfigSchemaRequestBody struct { + Definition any `json:"definition"` +} + +func (o *PatchEdgeConfigSchemaRequestBody) GetDefinition() any { + if o == nil { + return nil + } + return o.Definition +} + +type PatchEdgeConfigSchemaRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + DryRun *string `queryParam:"style=form,explode=true,name=dryRun"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody PatchEdgeConfigSchemaRequestBody `request:"mediaType=application/json"` +} + +func (o *PatchEdgeConfigSchemaRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *PatchEdgeConfigSchemaRequest) GetDryRun() *string { + if o == nil { + return nil + } + return o.DryRun +} + +func (o *PatchEdgeConfigSchemaRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *PatchEdgeConfigSchemaRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PatchEdgeConfigSchemaRequest) GetRequestBody() PatchEdgeConfigSchemaRequestBody { + if o == nil { + return PatchEdgeConfigSchemaRequestBody{} + } + return o.RequestBody +} + +// PatchEdgeConfigSchemaResponseBody - The JSON schema uploaded by the user +type PatchEdgeConfigSchemaResponseBody struct { +} + +type PatchEdgeConfigSchemaResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *PatchEdgeConfigSchemaResponseBody +} + +func (o *PatchEdgeConfigSchemaResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PatchEdgeConfigSchemaResponse) GetObject() *PatchEdgeConfigSchemaResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/patchteam.go b/src/__tests__/mockserver/internal/sdk/models/operations/patchteam.go new file mode 100644 index 00000000..930e0368 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/patchteam.go @@ -0,0 +1,332 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type Roles2 struct { + AccessGroupID string `json:"accessGroupId"` +} + +func (o *Roles2) GetAccessGroupID() string { + if o == nil { + return "" + } + return o.AccessGroupID +} + +type Roles1 string + +const ( + Roles1Owner Roles1 = "OWNER" + Roles1Member Roles1 = "MEMBER" + Roles1Developer Roles1 = "DEVELOPER" + Roles1Billing Roles1 = "BILLING" + Roles1Viewer Roles1 = "VIEWER" + Roles1Contributor Roles1 = "CONTRIBUTOR" +) + +func (e Roles1) ToPointer() *Roles1 { + return &e +} +func (e *Roles1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "MEMBER": + fallthrough + case "DEVELOPER": + fallthrough + case "BILLING": + fallthrough + case "VIEWER": + fallthrough + case "CONTRIBUTOR": + *e = Roles1(v) + return nil + default: + return fmt.Errorf("invalid value for Roles1: %v", v) + } +} + +type RolesType string + +const ( + RolesTypeRoles1 RolesType = "roles_1" + RolesTypeRoles2 RolesType = "roles_2" +) + +type Roles struct { + Roles1 *Roles1 + Roles2 *Roles2 + + Type RolesType +} + +func CreateRolesRoles1(roles1 Roles1) Roles { + typ := RolesTypeRoles1 + + return Roles{ + Roles1: &roles1, + Type: typ, + } +} + +func CreateRolesRoles2(roles2 Roles2) Roles { + typ := RolesTypeRoles2 + + return Roles{ + Roles2: &roles2, + Type: typ, + } +} + +func (u *Roles) UnmarshalJSON(data []byte) error { + + var roles2 Roles2 = Roles2{} + if err := utils.UnmarshalJSON(data, &roles2, "", true, true); err == nil { + u.Roles2 = &roles2 + u.Type = RolesTypeRoles2 + return nil + } + + var roles1 Roles1 = Roles1("") + if err := utils.UnmarshalJSON(data, &roles1, "", true, true); err == nil { + u.Roles1 = &roles1 + u.Type = RolesTypeRoles1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Roles", string(data)) +} + +func (u Roles) MarshalJSON() ([]byte, error) { + if u.Roles1 != nil { + return utils.MarshalJSON(u.Roles1, "", true) + } + + if u.Roles2 != nil { + return utils.MarshalJSON(u.Roles2, "", true) + } + + return nil, errors.New("could not marshal union type Roles: all fields are null") +} + +type Saml struct { + // Require that members of the team use SAML Single Sign-On. + Enforced *bool `json:"enforced,omitempty"` + // Directory groups to role or access group mappings. + Roles map[string]Roles `json:"roles,omitempty"` +} + +func (o *Saml) GetEnforced() *bool { + if o == nil { + return nil + } + return o.Enforced +} + +func (o *Saml) GetRoles() map[string]Roles { + if o == nil { + return nil + } + return o.Roles +} + +// RemoteCaching - Whether or not remote caching is enabled for the team +type RemoteCaching struct { + // Enable or disable remote caching for the team. + Enabled *bool `json:"enabled,omitempty"` +} + +func (o *RemoteCaching) GetEnabled() *bool { + if o == nil { + return nil + } + return o.Enabled +} + +type PatchTeamRequestBody struct { + // The hash value of an uploaded image. + Avatar *string `json:"avatar,omitempty"` + // A short text that describes the team. + Description *string `json:"description,omitempty"` + EmailDomain *string `json:"emailDomain,omitempty"` + // The name of the team. + Name *string `json:"name,omitempty"` + // Suffix that will be used for all preview deployments. + PreviewDeploymentSuffix *string `json:"previewDeploymentSuffix,omitempty"` + // Create a new invite code and replace the current one. + RegenerateInviteCode *bool `json:"regenerateInviteCode,omitempty"` + Saml *Saml `json:"saml,omitempty"` + // A new slug for the team. + Slug *string `json:"slug,omitempty"` + // Enable preview toolbar: one of on, off or default. + EnablePreviewFeedback *string `json:"enablePreviewFeedback,omitempty"` + // Enable production toolbar: one of on, off or default. + EnableProductionFeedback *string `json:"enableProductionFeedback,omitempty"` + // Sensitive environment variable policy: one of on, off or default. + SensitiveEnvironmentVariablePolicy *string `json:"sensitiveEnvironmentVariablePolicy,omitempty"` + // Whether or not remote caching is enabled for the team + RemoteCaching *RemoteCaching `json:"remoteCaching,omitempty"` + // Display or hide IP addresses in Monitoring queries. + HideIPAddresses *bool `json:"hideIpAddresses,omitempty"` + // Display or hide IP addresses in Log Drains. + HideIPAddressesInLogDrains *bool `json:"hideIpAddressesInLogDrains,omitempty"` +} + +func (o *PatchTeamRequestBody) GetAvatar() *string { + if o == nil { + return nil + } + return o.Avatar +} + +func (o *PatchTeamRequestBody) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PatchTeamRequestBody) GetEmailDomain() *string { + if o == nil { + return nil + } + return o.EmailDomain +} + +func (o *PatchTeamRequestBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *PatchTeamRequestBody) GetPreviewDeploymentSuffix() *string { + if o == nil { + return nil + } + return o.PreviewDeploymentSuffix +} + +func (o *PatchTeamRequestBody) GetRegenerateInviteCode() *bool { + if o == nil { + return nil + } + return o.RegenerateInviteCode +} + +func (o *PatchTeamRequestBody) GetSaml() *Saml { + if o == nil { + return nil + } + return o.Saml +} + +func (o *PatchTeamRequestBody) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PatchTeamRequestBody) GetEnablePreviewFeedback() *string { + if o == nil { + return nil + } + return o.EnablePreviewFeedback +} + +func (o *PatchTeamRequestBody) GetEnableProductionFeedback() *string { + if o == nil { + return nil + } + return o.EnableProductionFeedback +} + +func (o *PatchTeamRequestBody) GetSensitiveEnvironmentVariablePolicy() *string { + if o == nil { + return nil + } + return o.SensitiveEnvironmentVariablePolicy +} + +func (o *PatchTeamRequestBody) GetRemoteCaching() *RemoteCaching { + if o == nil { + return nil + } + return o.RemoteCaching +} + +func (o *PatchTeamRequestBody) GetHideIPAddresses() *bool { + if o == nil { + return nil + } + return o.HideIPAddresses +} + +func (o *PatchTeamRequestBody) GetHideIPAddressesInLogDrains() *bool { + if o == nil { + return nil + } + return o.HideIPAddressesInLogDrains +} + +type PatchTeamRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody PatchTeamRequestBody `request:"mediaType=application/json"` +} + +func (o *PatchTeamRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *PatchTeamRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PatchTeamRequest) GetRequestBody() PatchTeamRequestBody { + if o == nil { + return PatchTeamRequestBody{} + } + return o.RequestBody +} + +type PatchTeamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Team map[string]any +} + +func (o *PatchTeamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PatchTeamResponse) GetTeam() map[string]any { + if o == nil { + return nil + } + return o.Team +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/patchv9projectsidornamecustomenvironmentsenvironmentslugorid.go b/src/__tests__/mockserver/internal/sdk/models/operations/patchv9projectsidornamecustomenvironmentsenvironmentslugorid.go new file mode 100644 index 00000000..09b70678 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/patchv9projectsidornamecustomenvironmentsenvironmentslugorid.go @@ -0,0 +1,160 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType - Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". +type PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType string + +const ( + PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDTypeEquals PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType = "equals" + PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDTypeStartsWith PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType = "startsWith" + PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDTypeEndsWith PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType = "endsWith" +) + +func (e PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType) ToPointer() *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType { + return &e +} +func (e *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "equals": + fallthrough + case "startsWith": + fallthrough + case "endsWith": + *e = PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType(v) + return nil + default: + return fmt.Errorf("invalid value for PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType: %v", v) + } +} + +// PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDBranchMatcher - How we want to determine a matching branch. This is optional. +type PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDBranchMatcher struct { + // Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + Type PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType `json:"type"` + // Git branch name or portion thereof. + Pattern string `json:"pattern"` +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDBranchMatcher) GetType() PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType { + if o == nil { + return PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDType("") + } + return o.Type +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody struct { + // The slug of the custom environment. + Slug *string `json:"slug,omitempty"` + // Description of the custom environment. This is optional. + Description *string `json:"description,omitempty"` + // How we want to determine a matching branch. This is optional. + BranchMatcher *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDBranchMatcher `json:"branchMatcher,omitempty"` +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody) GetBranchMatcher() *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +type PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The unique custom environment identifier within the project + EnvironmentSlugOrID string `pathParam:"style=simple,explode=false,name=environmentSlugOrId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody `request:"mediaType=application/json"` +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetEnvironmentSlugOrID() string { + if o == nil { + return "" + } + return o.EnvironmentSlugOrID +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequest) GetRequestBody() *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDRequestBody { + if o == nil { + return nil + } + return o.RequestBody +} + +type PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody struct { +} + +type PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponse) GetObject() *PatchV9ProjectsIDOrNameCustomEnvironmentsEnvironmentSlugOrIDResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/postv1projectsidornamecustomenvironments.go b/src/__tests__/mockserver/internal/sdk/models/operations/postv1projectsidornamecustomenvironments.go new file mode 100644 index 00000000..9b972003 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/postv1projectsidornamecustomenvironments.go @@ -0,0 +1,160 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// PostV1ProjectsIDOrNameCustomEnvironmentsType - Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". +type PostV1ProjectsIDOrNameCustomEnvironmentsType string + +const ( + PostV1ProjectsIDOrNameCustomEnvironmentsTypeEquals PostV1ProjectsIDOrNameCustomEnvironmentsType = "equals" + PostV1ProjectsIDOrNameCustomEnvironmentsTypeStartsWith PostV1ProjectsIDOrNameCustomEnvironmentsType = "startsWith" + PostV1ProjectsIDOrNameCustomEnvironmentsTypeEndsWith PostV1ProjectsIDOrNameCustomEnvironmentsType = "endsWith" +) + +func (e PostV1ProjectsIDOrNameCustomEnvironmentsType) ToPointer() *PostV1ProjectsIDOrNameCustomEnvironmentsType { + return &e +} +func (e *PostV1ProjectsIDOrNameCustomEnvironmentsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "equals": + fallthrough + case "startsWith": + fallthrough + case "endsWith": + *e = PostV1ProjectsIDOrNameCustomEnvironmentsType(v) + return nil + default: + return fmt.Errorf("invalid value for PostV1ProjectsIDOrNameCustomEnvironmentsType: %v", v) + } +} + +// BranchMatcher - How we want to determine a matching branch. This is optional. +type BranchMatcher struct { + // Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + Type PostV1ProjectsIDOrNameCustomEnvironmentsType `json:"type"` + // Git branch name or portion thereof. + Pattern string `json:"pattern"` +} + +func (o *BranchMatcher) GetType() PostV1ProjectsIDOrNameCustomEnvironmentsType { + if o == nil { + return PostV1ProjectsIDOrNameCustomEnvironmentsType("") + } + return o.Type +} + +func (o *BranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type PostV1ProjectsIDOrNameCustomEnvironmentsRequestBody struct { + // The slug of the custom environment to create. + Slug *string `json:"slug,omitempty"` + // Description of the custom environment. This is optional. + Description *string `json:"description,omitempty"` + // How we want to determine a matching branch. This is optional. + BranchMatcher *BranchMatcher `json:"branchMatcher,omitempty"` + // Where to copy environment variables from. This is optional. + CopyEnvVarsFrom *string `json:"copyEnvVarsFrom,omitempty"` +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsRequestBody) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsRequestBody) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsRequestBody) GetBranchMatcher() *BranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsRequestBody) GetCopyEnvVarsFrom() *string { + if o == nil { + return nil + } + return o.CopyEnvVarsFrom +} + +type PostV1ProjectsIDOrNameCustomEnvironmentsRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody *PostV1ProjectsIDOrNameCustomEnvironmentsRequestBody `request:"mediaType=application/json"` +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsRequest) GetRequestBody() *PostV1ProjectsIDOrNameCustomEnvironmentsRequestBody { + if o == nil { + return nil + } + return o.RequestBody +} + +type PostV1ProjectsIDOrNameCustomEnvironmentsResponseBody struct { +} + +type PostV1ProjectsIDOrNameCustomEnvironmentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *PostV1ProjectsIDOrNameCustomEnvironmentsResponseBody +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostV1ProjectsIDOrNameCustomEnvironmentsResponse) GetObject() *PostV1ProjectsIDOrNameCustomEnvironmentsResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/putfirewallconfig.go b/src/__tests__/mockserver/internal/sdk/models/operations/putfirewallconfig.go new file mode 100644 index 00000000..9911e870 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/putfirewallconfig.go @@ -0,0 +1,2973 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type Owasp struct { + Active bool `json:"active"` +} + +func (o *Owasp) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +type ManagedRules struct { + Owasp Owasp `json:"owasp"` +} + +func (o *ManagedRules) GetOwasp() Owasp { + if o == nil { + return Owasp{} + } + return o.Owasp +} + +type PutFirewallConfigAction string + +const ( + PutFirewallConfigActionDeny PutFirewallConfigAction = "deny" + PutFirewallConfigActionLog PutFirewallConfigAction = "log" +) + +func (e PutFirewallConfigAction) ToPointer() *PutFirewallConfigAction { + return &e +} +func (e *PutFirewallConfigAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigAction: %v", v) + } +} + +// Sd - Scanner Detection - Detect and prevent reconnaissance activities from network scanning tools. +type Sd struct { + Active bool `json:"active"` + Action PutFirewallConfigAction `json:"action"` +} + +func (o *Sd) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Sd) GetAction() PutFirewallConfigAction { + if o == nil { + return PutFirewallConfigAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityAction string + +const ( + PutFirewallConfigSecurityActionDeny PutFirewallConfigSecurityAction = "deny" + PutFirewallConfigSecurityActionLog PutFirewallConfigSecurityAction = "log" +) + +func (e PutFirewallConfigSecurityAction) ToPointer() *PutFirewallConfigSecurityAction { + return &e +} +func (e *PutFirewallConfigSecurityAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityAction: %v", v) + } +} + +// Ma - Multipart Attack - Block attempts to bypass security controls using multipart/form-data encoding. +type Ma struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityAction `json:"action"` +} + +func (o *Ma) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Ma) GetAction() PutFirewallConfigSecurityAction { + if o == nil { + return PutFirewallConfigSecurityAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestAction string + +const ( + PutFirewallConfigSecurityRequestActionDeny PutFirewallConfigSecurityRequestAction = "deny" + PutFirewallConfigSecurityRequestActionLog PutFirewallConfigSecurityRequestAction = "log" +) + +func (e PutFirewallConfigSecurityRequestAction) ToPointer() *PutFirewallConfigSecurityRequestAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestAction: %v", v) + } +} + +// Lfi - Local File Inclusion Attack - Prevent unauthorized access to local files through web applications. +type Lfi struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestAction `json:"action"` +} + +func (o *Lfi) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Lfi) GetAction() PutFirewallConfigSecurityRequestAction { + if o == nil { + return PutFirewallConfigSecurityRequestAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyActionDeny PutFirewallConfigSecurityRequestRequestBodyAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyActionLog PutFirewallConfigSecurityRequestRequestBodyAction = "log" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestRequestBodyAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyAction: %v", v) + } +} + +// Rfi - Remote File Inclusion Attack - Prohibit unauthorized upload or execution of remote files. +type Rfi struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestRequestBodyAction `json:"action"` +} + +func (o *Rfi) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Rfi) GetAction() PutFirewallConfigSecurityRequestRequestBodyAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyCrsAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyCrsActionDeny PutFirewallConfigSecurityRequestRequestBodyCrsAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyCrsActionLog PutFirewallConfigSecurityRequestRequestBodyCrsAction = "log" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyCrsAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyCrsAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyCrsAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestRequestBodyCrsAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyCrsAction: %v", v) + } +} + +// Rce - Remote Execution Attack - Prevent unauthorized execution of remote scripts or commands. +type Rce struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestRequestBodyCrsAction `json:"action"` +} + +func (o *Rce) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Rce) GetAction() PutFirewallConfigSecurityRequestRequestBodyCrsAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyCrsAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyCrsPhpActionDeny PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyCrsPhpActionLog PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction = "log" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction: %v", v) + } +} + +// Php - PHP Attack - Safeguard against vulnerability exploits in PHP-based applications. +type Php struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction `json:"action"` +} + +func (o *Php) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Php) GetAction() PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyCrsPhpAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyCrsGenAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyCrsGenActionDeny PutFirewallConfigSecurityRequestRequestBodyCrsGenAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyCrsGenActionLog PutFirewallConfigSecurityRequestRequestBodyCrsGenAction = "log" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyCrsGenAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyCrsGenAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyCrsGenAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestRequestBodyCrsGenAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyCrsGenAction: %v", v) + } +} + +// Gen - Generic Attack - Provide broad protection from various undefined or novel attack vectors. +type Gen struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestRequestBodyCrsGenAction `json:"action"` +} + +func (o *Gen) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Gen) GetAction() PutFirewallConfigSecurityRequestRequestBodyCrsGenAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyCrsGenAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyCrsXSSActionDeny PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyCrsXSSActionLog PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction = "log" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction: %v", v) + } +} + +// XSS Attack - Prevent injection of malicious scripts into trusted webpages. +type XSS struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction `json:"action"` +} + +func (o *XSS) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *XSS) GetAction() PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyCrsXSSAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyCrsSqliActionDeny PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyCrsSqliActionLog PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction = "log" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction: %v", v) + } +} + +// Sqli - SQL Injection Attack - Prohibit unauthorized use of SQL commands to manipulate databases. +type Sqli struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction `json:"action"` +} + +func (o *Sqli) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Sqli) GetAction() PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyCrsSqliAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyCrsSfAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyCrsSfActionDeny PutFirewallConfigSecurityRequestRequestBodyCrsSfAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyCrsSfActionLog PutFirewallConfigSecurityRequestRequestBodyCrsSfAction = "log" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyCrsSfAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyCrsSfAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyCrsSfAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestRequestBodyCrsSfAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyCrsSfAction: %v", v) + } +} + +// Sf - Session Fixation Attack - Prevent unauthorized takeover of user sessions by enforcing unique session IDs. +type Sf struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestRequestBodyCrsSfAction `json:"action"` +} + +func (o *Sf) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Sf) GetAction() PutFirewallConfigSecurityRequestRequestBodyCrsSfAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyCrsSfAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyCrsJavaActionDeny PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyCrsJavaActionLog PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction = "log" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction: %v", v) + } +} + +// Java Attack - Mitigate risks of exploitation targeting Java-based applications or components. +type Java struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction `json:"action"` +} + +func (o *Java) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Java) GetAction() PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyCrsJavaAction("") + } + return o.Action +} + +// Crs - Custom Ruleset +type Crs struct { + // Scanner Detection - Detect and prevent reconnaissance activities from network scanning tools. + Sd *Sd `json:"sd,omitempty"` + // Multipart Attack - Block attempts to bypass security controls using multipart/form-data encoding. + Ma *Ma `json:"ma,omitempty"` + // Local File Inclusion Attack - Prevent unauthorized access to local files through web applications. + Lfi *Lfi `json:"lfi,omitempty"` + // Remote File Inclusion Attack - Prohibit unauthorized upload or execution of remote files. + Rfi *Rfi `json:"rfi,omitempty"` + // Remote Execution Attack - Prevent unauthorized execution of remote scripts or commands. + Rce *Rce `json:"rce,omitempty"` + // PHP Attack - Safeguard against vulnerability exploits in PHP-based applications. + Php *Php `json:"php,omitempty"` + // Generic Attack - Provide broad protection from various undefined or novel attack vectors. + Gen *Gen `json:"gen,omitempty"` + // XSS Attack - Prevent injection of malicious scripts into trusted webpages. + XSS *XSS `json:"xss,omitempty"` + // SQL Injection Attack - Prohibit unauthorized use of SQL commands to manipulate databases. + Sqli *Sqli `json:"sqli,omitempty"` + // Session Fixation Attack - Prevent unauthorized takeover of user sessions by enforcing unique session IDs. + Sf *Sf `json:"sf,omitempty"` + // Java Attack - Mitigate risks of exploitation targeting Java-based applications or components. + Java *Java `json:"java,omitempty"` +} + +func (o *Crs) GetSd() *Sd { + if o == nil { + return nil + } + return o.Sd +} + +func (o *Crs) GetMa() *Ma { + if o == nil { + return nil + } + return o.Ma +} + +func (o *Crs) GetLfi() *Lfi { + if o == nil { + return nil + } + return o.Lfi +} + +func (o *Crs) GetRfi() *Rfi { + if o == nil { + return nil + } + return o.Rfi +} + +func (o *Crs) GetRce() *Rce { + if o == nil { + return nil + } + return o.Rce +} + +func (o *Crs) GetPhp() *Php { + if o == nil { + return nil + } + return o.Php +} + +func (o *Crs) GetGen() *Gen { + if o == nil { + return nil + } + return o.Gen +} + +func (o *Crs) GetXSS() *XSS { + if o == nil { + return nil + } + return o.XSS +} + +func (o *Crs) GetSqli() *Sqli { + if o == nil { + return nil + } + return o.Sqli +} + +func (o *Crs) GetSf() *Sf { + if o == nil { + return nil + } + return o.Sf +} + +func (o *Crs) GetJava() *Java { + if o == nil { + return nil + } + return o.Java +} + +// PutFirewallConfigType - [Parameter](https://vercel.com/docs/security/vercel-waf/rule-configuration#parameters) from the incoming traffic. +type PutFirewallConfigType string + +const ( + PutFirewallConfigTypeHost PutFirewallConfigType = "host" + PutFirewallConfigTypePath PutFirewallConfigType = "path" + PutFirewallConfigTypeMethod PutFirewallConfigType = "method" + PutFirewallConfigTypeHeader PutFirewallConfigType = "header" + PutFirewallConfigTypeQuery PutFirewallConfigType = "query" + PutFirewallConfigTypeCookie PutFirewallConfigType = "cookie" + PutFirewallConfigTypeTargetPath PutFirewallConfigType = "target_path" + PutFirewallConfigTypeRawPath PutFirewallConfigType = "raw_path" + PutFirewallConfigTypeIPAddress PutFirewallConfigType = "ip_address" + PutFirewallConfigTypeRegion PutFirewallConfigType = "region" + PutFirewallConfigTypeProtocol PutFirewallConfigType = "protocol" + PutFirewallConfigTypeScheme PutFirewallConfigType = "scheme" + PutFirewallConfigTypeEnvironment PutFirewallConfigType = "environment" + PutFirewallConfigTypeUserAgent PutFirewallConfigType = "user_agent" + PutFirewallConfigTypeGeoContinent PutFirewallConfigType = "geo_continent" + PutFirewallConfigTypeGeoCountry PutFirewallConfigType = "geo_country" + PutFirewallConfigTypeGeoCountryRegion PutFirewallConfigType = "geo_country_region" + PutFirewallConfigTypeGeoCity PutFirewallConfigType = "geo_city" + PutFirewallConfigTypeGeoAsNumber PutFirewallConfigType = "geo_as_number" + PutFirewallConfigTypeJa4Digest PutFirewallConfigType = "ja4_digest" + PutFirewallConfigTypeJa3Digest PutFirewallConfigType = "ja3_digest" + PutFirewallConfigTypeRateLimitAPIID PutFirewallConfigType = "rate_limit_api_id" +) + +func (e PutFirewallConfigType) ToPointer() *PutFirewallConfigType { + return &e +} +func (e *PutFirewallConfigType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + fallthrough + case "path": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "query": + fallthrough + case "cookie": + fallthrough + case "target_path": + fallthrough + case "raw_path": + fallthrough + case "ip_address": + fallthrough + case "region": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "user_agent": + fallthrough + case "geo_continent": + fallthrough + case "geo_country": + fallthrough + case "geo_country_region": + fallthrough + case "geo_city": + fallthrough + case "geo_as_number": + fallthrough + case "ja4_digest": + fallthrough + case "ja3_digest": + fallthrough + case "rate_limit_api_id": + *e = PutFirewallConfigType(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigType: %v", v) + } +} + +// Op - [Operator](https://vercel.com/docs/security/vercel-waf/rule-configuration#operators) used to compare the parameter with a value. +type Op string + +const ( + OpRe Op = "re" + OpEq Op = "eq" + OpNeq Op = "neq" + OpEx Op = "ex" + OpNex Op = "nex" + OpInc Op = "inc" + OpNinc Op = "ninc" + OpPre Op = "pre" + OpSuf Op = "suf" + OpSub Op = "sub" + OpGt Op = "gt" + OpGte Op = "gte" + OpLt Op = "lt" + OpLte Op = "lte" +) + +func (e Op) ToPointer() *Op { + return &e +} +func (e *Op) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "re": + fallthrough + case "eq": + fallthrough + case "neq": + fallthrough + case "ex": + fallthrough + case "nex": + fallthrough + case "inc": + fallthrough + case "ninc": + fallthrough + case "pre": + fallthrough + case "suf": + fallthrough + case "sub": + fallthrough + case "gt": + fallthrough + case "gte": + fallthrough + case "lt": + fallthrough + case "lte": + *e = Op(v) + return nil + default: + return fmt.Errorf("invalid value for Op: %v", v) + } +} + +type PutFirewallConfigValueType string + +const ( + PutFirewallConfigValueTypeStr PutFirewallConfigValueType = "str" + PutFirewallConfigValueTypeArrayOfStr PutFirewallConfigValueType = "arrayOfStr" + PutFirewallConfigValueTypeNumber PutFirewallConfigValueType = "number" +) + +type PutFirewallConfigValue struct { + Str *string + ArrayOfStr []string + Number *float64 + + Type PutFirewallConfigValueType +} + +func CreatePutFirewallConfigValueStr(str string) PutFirewallConfigValue { + typ := PutFirewallConfigValueTypeStr + + return PutFirewallConfigValue{ + Str: &str, + Type: typ, + } +} + +func CreatePutFirewallConfigValueArrayOfStr(arrayOfStr []string) PutFirewallConfigValue { + typ := PutFirewallConfigValueTypeArrayOfStr + + return PutFirewallConfigValue{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreatePutFirewallConfigValueNumber(number float64) PutFirewallConfigValue { + typ := PutFirewallConfigValueTypeNumber + + return PutFirewallConfigValue{ + Number: &number, + Type: typ, + } +} + +func (u *PutFirewallConfigValue) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = PutFirewallConfigValueTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = PutFirewallConfigValueTypeArrayOfStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = PutFirewallConfigValueTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for PutFirewallConfigValue", string(data)) +} + +func (u PutFirewallConfigValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type PutFirewallConfigValue: all fields are null") +} + +type Conditions struct { + // [Parameter](https://vercel.com/docs/security/vercel-waf/rule-configuration#parameters) from the incoming traffic. + Type PutFirewallConfigType `json:"type"` + // [Operator](https://vercel.com/docs/security/vercel-waf/rule-configuration#operators) used to compare the parameter with a value. + Op Op `json:"op"` + Neg *bool `json:"neg,omitempty"` + Key *string `json:"key,omitempty"` + Value *PutFirewallConfigValue `json:"value,omitempty"` +} + +func (o *Conditions) GetType() PutFirewallConfigType { + if o == nil { + return PutFirewallConfigType("") + } + return o.Type +} + +func (o *Conditions) GetOp() Op { + if o == nil { + return Op("") + } + return o.Op +} + +func (o *Conditions) GetNeg() *bool { + if o == nil { + return nil + } + return o.Neg +} + +func (o *Conditions) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *Conditions) GetValue() *PutFirewallConfigValue { + if o == nil { + return nil + } + return o.Value +} + +type ConditionGroup struct { + Conditions []Conditions `json:"conditions"` +} + +func (o *ConditionGroup) GetConditions() []Conditions { + if o == nil { + return []Conditions{} + } + return o.Conditions +} + +type PutFirewallConfigSecurityRequestRequestBodyRulesActionAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyRulesActionActionLog PutFirewallConfigSecurityRequestRequestBodyRulesActionAction = "log" + PutFirewallConfigSecurityRequestRequestBodyRulesActionActionChallenge PutFirewallConfigSecurityRequestRequestBodyRulesActionAction = "challenge" + PutFirewallConfigSecurityRequestRequestBodyRulesActionActionDeny PutFirewallConfigSecurityRequestRequestBodyRulesActionAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyRulesActionActionBypass PutFirewallConfigSecurityRequestRequestBodyRulesActionAction = "bypass" + PutFirewallConfigSecurityRequestRequestBodyRulesActionActionRateLimit PutFirewallConfigSecurityRequestRequestBodyRulesActionAction = "rate_limit" + PutFirewallConfigSecurityRequestRequestBodyRulesActionActionRedirect PutFirewallConfigSecurityRequestRequestBodyRulesActionAction = "redirect" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyRulesActionAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyRulesActionAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyRulesActionAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "log": + fallthrough + case "challenge": + fallthrough + case "deny": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = PutFirewallConfigSecurityRequestRequestBodyRulesActionAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyRulesActionAction: %v", v) + } +} + +type Algo string + +const ( + AlgoFixedWindow Algo = "fixed_window" + AlgoTokenBucket Algo = "token_bucket" +) + +func (e Algo) ToPointer() *Algo { + return &e +} +func (e *Algo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = Algo(v) + return nil + default: + return fmt.Errorf("invalid value for Algo: %v", v) + } +} + +type Action1 string + +const ( + Action1Log Action1 = "log" + Action1Challenge Action1 = "challenge" + Action1Deny Action1 = "deny" + Action1RateLimit Action1 = "rate_limit" +) + +func (e Action1) ToPointer() *Action1 { + return &e +} +func (e *Action1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "log": + fallthrough + case "challenge": + fallthrough + case "deny": + fallthrough + case "rate_limit": + *e = Action1(v) + return nil + default: + return fmt.Errorf("invalid value for Action1: %v", v) + } +} + +type RateLimitActionType string + +const ( + RateLimitActionTypeAction1 RateLimitActionType = "action_1" + RateLimitActionTypeAny RateLimitActionType = "any" +) + +type RateLimitAction struct { + Action1 *Action1 + Any any + + Type RateLimitActionType +} + +func CreateRateLimitActionAction1(action1 Action1) RateLimitAction { + typ := RateLimitActionTypeAction1 + + return RateLimitAction{ + Action1: &action1, + Type: typ, + } +} + +func CreateRateLimitActionAny(any any) RateLimitAction { + typ := RateLimitActionTypeAny + + return RateLimitAction{ + Any: any, + Type: typ, + } +} + +func (u *RateLimitAction) UnmarshalJSON(data []byte) error { + + var action1 Action1 = Action1("") + if err := utils.UnmarshalJSON(data, &action1, "", true, true); err == nil { + u.Action1 = &action1 + u.Type = RateLimitActionTypeAction1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = RateLimitActionTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RateLimitAction", string(data)) +} + +func (u RateLimitAction) MarshalJSON() ([]byte, error) { + if u.Action1 != nil { + return utils.MarshalJSON(u.Action1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type RateLimitAction: all fields are null") +} + +type RateLimit1 struct { + Algo Algo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` + Action *RateLimitAction `json:"action,omitempty"` +} + +func (o *RateLimit1) GetAlgo() Algo { + if o == nil { + return Algo("") + } + return o.Algo +} + +func (o *RateLimit1) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *RateLimit1) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *RateLimit1) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +func (o *RateLimit1) GetAction() *RateLimitAction { + if o == nil { + return nil + } + return o.Action +} + +type RateLimitType string + +const ( + RateLimitTypeRateLimit1 RateLimitType = "rateLimit_1" + RateLimitTypeAny RateLimitType = "any" +) + +type RateLimit struct { + RateLimit1 *RateLimit1 + Any any + + Type RateLimitType +} + +func CreateRateLimitRateLimit1(rateLimit1 RateLimit1) RateLimit { + typ := RateLimitTypeRateLimit1 + + return RateLimit{ + RateLimit1: &rateLimit1, + Type: typ, + } +} + +func CreateRateLimitAny(any any) RateLimit { + typ := RateLimitTypeAny + + return RateLimit{ + Any: any, + Type: typ, + } +} + +func (u *RateLimit) UnmarshalJSON(data []byte) error { + + var rateLimit1 RateLimit1 = RateLimit1{} + if err := utils.UnmarshalJSON(data, &rateLimit1, "", true, true); err == nil { + u.RateLimit1 = &rateLimit1 + u.Type = RateLimitTypeRateLimit1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = RateLimitTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RateLimit", string(data)) +} + +func (u RateLimit) MarshalJSON() ([]byte, error) { + if u.RateLimit1 != nil { + return utils.MarshalJSON(u.RateLimit1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type RateLimit: all fields are null") +} + +type Redirect1 struct { + Location string `json:"location"` + Permanent bool `json:"permanent"` +} + +func (o *Redirect1) GetLocation() string { + if o == nil { + return "" + } + return o.Location +} + +func (o *Redirect1) GetPermanent() bool { + if o == nil { + return false + } + return o.Permanent +} + +type RedirectType string + +const ( + RedirectTypeRedirect1 RedirectType = "redirect_1" + RedirectTypeAny RedirectType = "any" +) + +type Redirect struct { + Redirect1 *Redirect1 + Any any + + Type RedirectType +} + +func CreateRedirectRedirect1(redirect1 Redirect1) Redirect { + typ := RedirectTypeRedirect1 + + return Redirect{ + Redirect1: &redirect1, + Type: typ, + } +} + +func CreateRedirectAny(any any) Redirect { + typ := RedirectTypeAny + + return Redirect{ + Any: any, + Type: typ, + } +} + +func (u *Redirect) UnmarshalJSON(data []byte) error { + + var redirect1 Redirect1 = Redirect1{} + if err := utils.UnmarshalJSON(data, &redirect1, "", true, true); err == nil { + u.Redirect1 = &redirect1 + u.Type = RedirectTypeRedirect1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = RedirectTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Redirect", string(data)) +} + +func (u Redirect) MarshalJSON() ([]byte, error) { + if u.Redirect1 != nil { + return utils.MarshalJSON(u.Redirect1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type Redirect: all fields are null") +} + +type Mitigate struct { + Action PutFirewallConfigSecurityRequestRequestBodyRulesActionAction `json:"action"` + RateLimit *RateLimit `json:"rateLimit,omitempty"` + Redirect *Redirect `json:"redirect,omitempty"` + ActionDuration *string `json:"actionDuration,omitempty"` +} + +func (o *Mitigate) GetAction() PutFirewallConfigSecurityRequestRequestBodyRulesActionAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyRulesActionAction("") + } + return o.Action +} + +func (o *Mitigate) GetRateLimit() *RateLimit { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *Mitigate) GetRedirect() *Redirect { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *Mitigate) GetActionDuration() *string { + if o == nil { + return nil + } + return o.ActionDuration +} + +type PutFirewallConfigSecurityRequestRequestBodyRulesAction struct { + Mitigate *Mitigate `json:"mitigate,omitempty"` +} + +func (o *PutFirewallConfigSecurityRequestRequestBodyRulesAction) GetMitigate() *Mitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type Rules struct { + ID *string `json:"id,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Active bool `json:"active"` + ConditionGroup []ConditionGroup `json:"conditionGroup"` + Action PutFirewallConfigSecurityRequestRequestBodyRulesAction `json:"action"` +} + +func (o *Rules) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Rules) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Rules) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *Rules) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *Rules) GetConditionGroup() []ConditionGroup { + if o == nil { + return []ConditionGroup{} + } + return o.ConditionGroup +} + +func (o *Rules) GetAction() PutFirewallConfigSecurityRequestRequestBodyRulesAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyRulesAction{} + } + return o.Action +} + +type PutFirewallConfigSecurityRequestRequestBodyIpsAction string + +const ( + PutFirewallConfigSecurityRequestRequestBodyIpsActionDeny PutFirewallConfigSecurityRequestRequestBodyIpsAction = "deny" + PutFirewallConfigSecurityRequestRequestBodyIpsActionChallenge PutFirewallConfigSecurityRequestRequestBodyIpsAction = "challenge" + PutFirewallConfigSecurityRequestRequestBodyIpsActionLog PutFirewallConfigSecurityRequestRequestBodyIpsAction = "log" + PutFirewallConfigSecurityRequestRequestBodyIpsActionBypass PutFirewallConfigSecurityRequestRequestBodyIpsAction = "bypass" +) + +func (e PutFirewallConfigSecurityRequestRequestBodyIpsAction) ToPointer() *PutFirewallConfigSecurityRequestRequestBodyIpsAction { + return &e +} +func (e *PutFirewallConfigSecurityRequestRequestBodyIpsAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "challenge": + fallthrough + case "log": + fallthrough + case "bypass": + *e = PutFirewallConfigSecurityRequestRequestBodyIpsAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityRequestRequestBodyIpsAction: %v", v) + } +} + +type Ips struct { + ID *string `json:"id,omitempty"` + Hostname string `json:"hostname"` + IP string `json:"ip"` + Notes *string `json:"notes,omitempty"` + Action PutFirewallConfigSecurityRequestRequestBodyIpsAction `json:"action"` +} + +func (o *Ips) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Ips) GetHostname() string { + if o == nil { + return "" + } + return o.Hostname +} + +func (o *Ips) GetIP() string { + if o == nil { + return "" + } + return o.IP +} + +func (o *Ips) GetNotes() *string { + if o == nil { + return nil + } + return o.Notes +} + +func (o *Ips) GetAction() PutFirewallConfigSecurityRequestRequestBodyIpsAction { + if o == nil { + return PutFirewallConfigSecurityRequestRequestBodyIpsAction("") + } + return o.Action +} + +type PutFirewallConfigRequestBody struct { + FirewallEnabled bool `json:"firewallEnabled"` + ManagedRules *ManagedRules `json:"managedRules,omitempty"` + // Custom Ruleset + Crs *Crs `json:"crs,omitempty"` + Rules []Rules `json:"rules,omitempty"` + Ips []Ips `json:"ips,omitempty"` +} + +func (o *PutFirewallConfigRequestBody) GetFirewallEnabled() bool { + if o == nil { + return false + } + return o.FirewallEnabled +} + +func (o *PutFirewallConfigRequestBody) GetManagedRules() *ManagedRules { + if o == nil { + return nil + } + return o.ManagedRules +} + +func (o *PutFirewallConfigRequestBody) GetCrs() *Crs { + if o == nil { + return nil + } + return o.Crs +} + +func (o *PutFirewallConfigRequestBody) GetRules() []Rules { + if o == nil { + return nil + } + return o.Rules +} + +func (o *PutFirewallConfigRequestBody) GetIps() []Ips { + if o == nil { + return nil + } + return o.Ips +} + +type PutFirewallConfigRequest struct { + ProjectID string `queryParam:"style=form,explode=true,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody PutFirewallConfigRequestBody `request:"mediaType=application/json"` +} + +func (o *PutFirewallConfigRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *PutFirewallConfigRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *PutFirewallConfigRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *PutFirewallConfigRequest) GetRequestBody() PutFirewallConfigRequestBody { + if o == nil { + return PutFirewallConfigRequestBody{} + } + return o.RequestBody +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction: %v", v) + } +} + +// PutFirewallConfigSd - Scanner Detection - Detect and prevent reconnaissance activities from network scanning tools. +type PutFirewallConfigSd struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction `json:"action"` +} + +func (o *PutFirewallConfigSd) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigSd) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction: %v", v) + } +} + +// PutFirewallConfigMa - Multipart Attack - Block attempts to bypass security controls using multipart/form-data encoding. +type PutFirewallConfigMa struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction `json:"action"` +} + +func (o *PutFirewallConfigMa) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigMa) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONActionLog PutFirewallConfigSecurityResponse200ApplicationJSONAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONAction: %v", v) + } +} + +// PutFirewallConfigLfi - Local File Inclusion Attack - Prevent unauthorized access to local files through web applications. +type PutFirewallConfigLfi struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONAction `json:"action"` +} + +func (o *PutFirewallConfigLfi) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigLfi) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction: %v", v) + } +} + +// PutFirewallConfigRfi - Remote File Inclusion Attack - Prohibit unauthorized upload or execution of remote files. +type PutFirewallConfigRfi struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction `json:"action"` +} + +func (o *PutFirewallConfigRfi) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigRfi) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction: %v", v) + } +} + +// PutFirewallConfigRce - Remote Execution Attack - Prevent unauthorized execution of remote scripts or commands. +type PutFirewallConfigRce struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction `json:"action"` +} + +func (o *PutFirewallConfigRce) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigRce) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction: %v", v) + } +} + +// PutFirewallConfigPhp - PHP Attack - Safeguard against vulnerability exploits in PHP-based applications. +type PutFirewallConfigPhp struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction `json:"action"` +} + +func (o *PutFirewallConfigPhp) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigPhp) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction: %v", v) + } +} + +// PutFirewallConfigGen - Generic Attack - Provide broad protection from various undefined or novel attack vectors. +type PutFirewallConfigGen struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction `json:"action"` +} + +func (o *PutFirewallConfigGen) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigGen) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsGenAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction: %v", v) + } +} + +// PutFirewallConfigXSS - XSS Attack - Prevent injection of malicious scripts into trusted webpages. +type PutFirewallConfigXSS struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction `json:"action"` +} + +func (o *PutFirewallConfigXSS) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigXSS) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsXSSAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction: %v", v) + } +} + +// PutFirewallConfigSqli - SQL Injection Attack - Prohibit unauthorized use of SQL commands to manipulate databases. +type PutFirewallConfigSqli struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction `json:"action"` +} + +func (o *PutFirewallConfigSqli) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigSqli) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction: %v", v) + } +} + +// PutFirewallConfigSf - Session Fixation Attack - Prevent unauthorized takeover of user sessions by enforcing unique session IDs. +type PutFirewallConfigSf struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction `json:"action"` +} + +func (o *PutFirewallConfigSf) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigSf) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction("") + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction = "log" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction: %v", v) + } +} + +// PutFirewallConfigJava - Java Attack - Mitigate risks of exploitation targeting Java-based applications or components. +type PutFirewallConfigJava struct { + Active bool `json:"active"` + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction `json:"action"` +} + +func (o *PutFirewallConfigJava) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigJava) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction("") + } + return o.Action +} + +// PutFirewallConfigCrs - Custom Ruleset +type PutFirewallConfigCrs struct { + // Scanner Detection - Detect and prevent reconnaissance activities from network scanning tools. + Sd PutFirewallConfigSd `json:"sd"` + // Multipart Attack - Block attempts to bypass security controls using multipart/form-data encoding. + Ma PutFirewallConfigMa `json:"ma"` + // Local File Inclusion Attack - Prevent unauthorized access to local files through web applications. + Lfi PutFirewallConfigLfi `json:"lfi"` + // Remote File Inclusion Attack - Prohibit unauthorized upload or execution of remote files. + Rfi PutFirewallConfigRfi `json:"rfi"` + // Remote Execution Attack - Prevent unauthorized execution of remote scripts or commands. + Rce PutFirewallConfigRce `json:"rce"` + // PHP Attack - Safeguard against vulnerability exploits in PHP-based applications. + Php PutFirewallConfigPhp `json:"php"` + // Generic Attack - Provide broad protection from various undefined or novel attack vectors. + Gen PutFirewallConfigGen `json:"gen"` + // XSS Attack - Prevent injection of malicious scripts into trusted webpages. + XSS PutFirewallConfigXSS `json:"xss"` + // SQL Injection Attack - Prohibit unauthorized use of SQL commands to manipulate databases. + Sqli PutFirewallConfigSqli `json:"sqli"` + // Session Fixation Attack - Prevent unauthorized takeover of user sessions by enforcing unique session IDs. + Sf PutFirewallConfigSf `json:"sf"` + // Java Attack - Mitigate risks of exploitation targeting Java-based applications or components. + Java PutFirewallConfigJava `json:"java"` +} + +func (o *PutFirewallConfigCrs) GetSd() PutFirewallConfigSd { + if o == nil { + return PutFirewallConfigSd{} + } + return o.Sd +} + +func (o *PutFirewallConfigCrs) GetMa() PutFirewallConfigMa { + if o == nil { + return PutFirewallConfigMa{} + } + return o.Ma +} + +func (o *PutFirewallConfigCrs) GetLfi() PutFirewallConfigLfi { + if o == nil { + return PutFirewallConfigLfi{} + } + return o.Lfi +} + +func (o *PutFirewallConfigCrs) GetRfi() PutFirewallConfigRfi { + if o == nil { + return PutFirewallConfigRfi{} + } + return o.Rfi +} + +func (o *PutFirewallConfigCrs) GetRce() PutFirewallConfigRce { + if o == nil { + return PutFirewallConfigRce{} + } + return o.Rce +} + +func (o *PutFirewallConfigCrs) GetPhp() PutFirewallConfigPhp { + if o == nil { + return PutFirewallConfigPhp{} + } + return o.Php +} + +func (o *PutFirewallConfigCrs) GetGen() PutFirewallConfigGen { + if o == nil { + return PutFirewallConfigGen{} + } + return o.Gen +} + +func (o *PutFirewallConfigCrs) GetXSS() PutFirewallConfigXSS { + if o == nil { + return PutFirewallConfigXSS{} + } + return o.XSS +} + +func (o *PutFirewallConfigCrs) GetSqli() PutFirewallConfigSqli { + if o == nil { + return PutFirewallConfigSqli{} + } + return o.Sqli +} + +func (o *PutFirewallConfigCrs) GetSf() PutFirewallConfigSf { + if o == nil { + return PutFirewallConfigSf{} + } + return o.Sf +} + +func (o *PutFirewallConfigCrs) GetJava() PutFirewallConfigJava { + if o == nil { + return PutFirewallConfigJava{} + } + return o.Java +} + +type PutFirewallConfigSecurityType string + +const ( + PutFirewallConfigSecurityTypeHost PutFirewallConfigSecurityType = "host" + PutFirewallConfigSecurityTypePath PutFirewallConfigSecurityType = "path" + PutFirewallConfigSecurityTypeMethod PutFirewallConfigSecurityType = "method" + PutFirewallConfigSecurityTypeHeader PutFirewallConfigSecurityType = "header" + PutFirewallConfigSecurityTypeQuery PutFirewallConfigSecurityType = "query" + PutFirewallConfigSecurityTypeCookie PutFirewallConfigSecurityType = "cookie" + PutFirewallConfigSecurityTypeTargetPath PutFirewallConfigSecurityType = "target_path" + PutFirewallConfigSecurityTypeRawPath PutFirewallConfigSecurityType = "raw_path" + PutFirewallConfigSecurityTypeIPAddress PutFirewallConfigSecurityType = "ip_address" + PutFirewallConfigSecurityTypeProtocol PutFirewallConfigSecurityType = "protocol" + PutFirewallConfigSecurityTypeRegion PutFirewallConfigSecurityType = "region" + PutFirewallConfigSecurityTypeScheme PutFirewallConfigSecurityType = "scheme" + PutFirewallConfigSecurityTypeEnvironment PutFirewallConfigSecurityType = "environment" + PutFirewallConfigSecurityTypeUserAgent PutFirewallConfigSecurityType = "user_agent" + PutFirewallConfigSecurityTypeGeoContinent PutFirewallConfigSecurityType = "geo_continent" + PutFirewallConfigSecurityTypeGeoCountry PutFirewallConfigSecurityType = "geo_country" + PutFirewallConfigSecurityTypeGeoCountryRegion PutFirewallConfigSecurityType = "geo_country_region" + PutFirewallConfigSecurityTypeGeoCity PutFirewallConfigSecurityType = "geo_city" + PutFirewallConfigSecurityTypeGeoAsNumber PutFirewallConfigSecurityType = "geo_as_number" + PutFirewallConfigSecurityTypeJa4Digest PutFirewallConfigSecurityType = "ja4_digest" + PutFirewallConfigSecurityTypeJa3Digest PutFirewallConfigSecurityType = "ja3_digest" + PutFirewallConfigSecurityTypeRateLimitAPIID PutFirewallConfigSecurityType = "rate_limit_api_id" +) + +func (e PutFirewallConfigSecurityType) ToPointer() *PutFirewallConfigSecurityType { + return &e +} +func (e *PutFirewallConfigSecurityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + fallthrough + case "path": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "query": + fallthrough + case "cookie": + fallthrough + case "target_path": + fallthrough + case "raw_path": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "region": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "user_agent": + fallthrough + case "geo_continent": + fallthrough + case "geo_country": + fallthrough + case "geo_country_region": + fallthrough + case "geo_city": + fallthrough + case "geo_as_number": + fallthrough + case "ja4_digest": + fallthrough + case "ja3_digest": + fallthrough + case "rate_limit_api_id": + *e = PutFirewallConfigSecurityType(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityType: %v", v) + } +} + +type PutFirewallConfigOp string + +const ( + PutFirewallConfigOpRe PutFirewallConfigOp = "re" + PutFirewallConfigOpEq PutFirewallConfigOp = "eq" + PutFirewallConfigOpEx PutFirewallConfigOp = "ex" + PutFirewallConfigOpInc PutFirewallConfigOp = "inc" + PutFirewallConfigOpPre PutFirewallConfigOp = "pre" + PutFirewallConfigOpSuf PutFirewallConfigOp = "suf" + PutFirewallConfigOpSub PutFirewallConfigOp = "sub" + PutFirewallConfigOpGt PutFirewallConfigOp = "gt" + PutFirewallConfigOpGte PutFirewallConfigOp = "gte" + PutFirewallConfigOpLt PutFirewallConfigOp = "lt" + PutFirewallConfigOpLte PutFirewallConfigOp = "lte" + PutFirewallConfigOpNex PutFirewallConfigOp = "nex" + PutFirewallConfigOpNinc PutFirewallConfigOp = "ninc" + PutFirewallConfigOpNeq PutFirewallConfigOp = "neq" +) + +func (e PutFirewallConfigOp) ToPointer() *PutFirewallConfigOp { + return &e +} +func (e *PutFirewallConfigOp) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "re": + fallthrough + case "eq": + fallthrough + case "ex": + fallthrough + case "inc": + fallthrough + case "pre": + fallthrough + case "suf": + fallthrough + case "sub": + fallthrough + case "gt": + fallthrough + case "gte": + fallthrough + case "lt": + fallthrough + case "lte": + fallthrough + case "nex": + fallthrough + case "ninc": + fallthrough + case "neq": + *e = PutFirewallConfigOp(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigOp: %v", v) + } +} + +type PutFirewallConfigSecurityValueType string + +const ( + PutFirewallConfigSecurityValueTypeStr PutFirewallConfigSecurityValueType = "str" + PutFirewallConfigSecurityValueTypeNumber PutFirewallConfigSecurityValueType = "number" + PutFirewallConfigSecurityValueTypeArrayOfStr PutFirewallConfigSecurityValueType = "arrayOfStr" +) + +type PutFirewallConfigSecurityValue struct { + Str *string + Number *float64 + ArrayOfStr []string + + Type PutFirewallConfigSecurityValueType +} + +func CreatePutFirewallConfigSecurityValueStr(str string) PutFirewallConfigSecurityValue { + typ := PutFirewallConfigSecurityValueTypeStr + + return PutFirewallConfigSecurityValue{ + Str: &str, + Type: typ, + } +} + +func CreatePutFirewallConfigSecurityValueNumber(number float64) PutFirewallConfigSecurityValue { + typ := PutFirewallConfigSecurityValueTypeNumber + + return PutFirewallConfigSecurityValue{ + Number: &number, + Type: typ, + } +} + +func CreatePutFirewallConfigSecurityValueArrayOfStr(arrayOfStr []string) PutFirewallConfigSecurityValue { + typ := PutFirewallConfigSecurityValueTypeArrayOfStr + + return PutFirewallConfigSecurityValue{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *PutFirewallConfigSecurityValue) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = PutFirewallConfigSecurityValueTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = PutFirewallConfigSecurityValueTypeNumber + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = PutFirewallConfigSecurityValueTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for PutFirewallConfigSecurityValue", string(data)) +} + +func (u PutFirewallConfigSecurityValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type PutFirewallConfigSecurityValue: all fields are null") +} + +type PutFirewallConfigConditions struct { + Type PutFirewallConfigSecurityType `json:"type"` + Op PutFirewallConfigOp `json:"op"` + Neg *bool `json:"neg,omitempty"` + Key *string `json:"key,omitempty"` + Value *PutFirewallConfigSecurityValue `json:"value,omitempty"` +} + +func (o *PutFirewallConfigConditions) GetType() PutFirewallConfigSecurityType { + if o == nil { + return PutFirewallConfigSecurityType("") + } + return o.Type +} + +func (o *PutFirewallConfigConditions) GetOp() PutFirewallConfigOp { + if o == nil { + return PutFirewallConfigOp("") + } + return o.Op +} + +func (o *PutFirewallConfigConditions) GetNeg() *bool { + if o == nil { + return nil + } + return o.Neg +} + +func (o *PutFirewallConfigConditions) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *PutFirewallConfigConditions) GetValue() *PutFirewallConfigSecurityValue { + if o == nil { + return nil + } + return o.Value +} + +type PutFirewallConfigConditionGroup struct { + Conditions []PutFirewallConfigConditions `json:"conditions"` +} + +func (o *PutFirewallConfigConditionGroup) GetConditions() []PutFirewallConfigConditions { + if o == nil { + return []PutFirewallConfigConditions{} + } + return o.Conditions +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction = "log" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionChallenge PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction = "challenge" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionBypass PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction = "bypass" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionRateLimit PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction = "rate_limit" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionRedirect PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction = "redirect" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + fallthrough + case "challenge": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction: %v", v) + } +} + +type PutFirewallConfigAlgo string + +const ( + PutFirewallConfigAlgoFixedWindow PutFirewallConfigAlgo = "fixed_window" + PutFirewallConfigAlgoTokenBucket PutFirewallConfigAlgo = "token_bucket" +) + +func (e PutFirewallConfigAlgo) ToPointer() *PutFirewallConfigAlgo { + return &e +} +func (e *PutFirewallConfigAlgo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = PutFirewallConfigAlgo(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigAlgo: %v", v) + } +} + +type PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction string + +const ( + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionActionDeny PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction = "deny" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionActionLog PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction = "log" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionActionChallenge PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction = "challenge" + PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionActionRateLimit PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction = "rate_limit" +) + +func (e PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction) ToPointer() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction { + return &e +} +func (e *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + fallthrough + case "challenge": + fallthrough + case "rate_limit": + *e = PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction: %v", v) + } +} + +type PutFirewallConfigRateLimit struct { + Algo PutFirewallConfigAlgo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` + Action *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction `json:"action,omitempty"` +} + +func (o *PutFirewallConfigRateLimit) GetAlgo() PutFirewallConfigAlgo { + if o == nil { + return PutFirewallConfigAlgo("") + } + return o.Algo +} + +func (o *PutFirewallConfigRateLimit) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *PutFirewallConfigRateLimit) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *PutFirewallConfigRateLimit) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +func (o *PutFirewallConfigRateLimit) GetAction() *PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesActionAction { + if o == nil { + return nil + } + return o.Action +} + +type PutFirewallConfigRedirect struct { + Location string `json:"location"` + Permanent bool `json:"permanent"` +} + +func (o *PutFirewallConfigRedirect) GetLocation() string { + if o == nil { + return "" + } + return o.Location +} + +func (o *PutFirewallConfigRedirect) GetPermanent() bool { + if o == nil { + return false + } + return o.Permanent +} + +type PutFirewallConfigMitigate struct { + Action PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction `json:"action"` + RateLimit *PutFirewallConfigRateLimit `json:"rateLimit,omitempty"` + Redirect *PutFirewallConfigRedirect `json:"redirect,omitempty"` + ActionDuration *string `json:"actionDuration,omitempty"` +} + +func (o *PutFirewallConfigMitigate) GetAction() PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction { + if o == nil { + return PutFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveRulesAction("") + } + return o.Action +} + +func (o *PutFirewallConfigMitigate) GetRateLimit() *PutFirewallConfigRateLimit { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *PutFirewallConfigMitigate) GetRedirect() *PutFirewallConfigRedirect { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *PutFirewallConfigMitigate) GetActionDuration() *string { + if o == nil { + return nil + } + return o.ActionDuration +} + +type PutFirewallConfigSecurityResponseAction struct { + Mitigate *PutFirewallConfigMitigate `json:"mitigate,omitempty"` +} + +func (o *PutFirewallConfigSecurityResponseAction) GetMitigate() *PutFirewallConfigMitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type PutFirewallConfigRules struct { + ID string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Active bool `json:"active"` + ConditionGroup []PutFirewallConfigConditionGroup `json:"conditionGroup"` + Action PutFirewallConfigSecurityResponseAction `json:"action"` +} + +func (o *PutFirewallConfigRules) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *PutFirewallConfigRules) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *PutFirewallConfigRules) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PutFirewallConfigRules) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigRules) GetConditionGroup() []PutFirewallConfigConditionGroup { + if o == nil { + return []PutFirewallConfigConditionGroup{} + } + return o.ConditionGroup +} + +func (o *PutFirewallConfigRules) GetAction() PutFirewallConfigSecurityResponseAction { + if o == nil { + return PutFirewallConfigSecurityResponseAction{} + } + return o.Action +} + +type PutFirewallConfigSecurityResponse200Action string + +const ( + PutFirewallConfigSecurityResponse200ActionDeny PutFirewallConfigSecurityResponse200Action = "deny" + PutFirewallConfigSecurityResponse200ActionLog PutFirewallConfigSecurityResponse200Action = "log" + PutFirewallConfigSecurityResponse200ActionChallenge PutFirewallConfigSecurityResponse200Action = "challenge" + PutFirewallConfigSecurityResponse200ActionBypass PutFirewallConfigSecurityResponse200Action = "bypass" +) + +func (e PutFirewallConfigSecurityResponse200Action) ToPointer() *PutFirewallConfigSecurityResponse200Action { + return &e +} +func (e *PutFirewallConfigSecurityResponse200Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + fallthrough + case "challenge": + fallthrough + case "bypass": + *e = PutFirewallConfigSecurityResponse200Action(v) + return nil + default: + return fmt.Errorf("invalid value for PutFirewallConfigSecurityResponse200Action: %v", v) + } +} + +type PutFirewallConfigIps struct { + ID string `json:"id"` + Hostname string `json:"hostname"` + IP string `json:"ip"` + Notes *string `json:"notes,omitempty"` + Action PutFirewallConfigSecurityResponse200Action `json:"action"` +} + +func (o *PutFirewallConfigIps) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *PutFirewallConfigIps) GetHostname() string { + if o == nil { + return "" + } + return o.Hostname +} + +func (o *PutFirewallConfigIps) GetIP() string { + if o == nil { + return "" + } + return o.IP +} + +func (o *PutFirewallConfigIps) GetNotes() *string { + if o == nil { + return nil + } + return o.Notes +} + +func (o *PutFirewallConfigIps) GetAction() PutFirewallConfigSecurityResponse200Action { + if o == nil { + return PutFirewallConfigSecurityResponse200Action("") + } + return o.Action +} + +type PutFirewallConfigChanges struct { +} + +type PutFirewallConfigOwasp struct { + Active bool `json:"active"` + UpdatedAt *string `json:"updatedAt,omitempty"` + UserID *string `json:"userId,omitempty"` + Username *string `json:"username,omitempty"` +} + +func (o *PutFirewallConfigOwasp) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigOwasp) GetUpdatedAt() *string { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *PutFirewallConfigOwasp) GetUserID() *string { + if o == nil { + return nil + } + return o.UserID +} + +func (o *PutFirewallConfigOwasp) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +type PutFirewallConfigVerifiedBotsBypass struct { + Active bool `json:"active"` + UpdatedAt *string `json:"updatedAt,omitempty"` + UserID *string `json:"userId,omitempty"` + Username *string `json:"username,omitempty"` +} + +func (o *PutFirewallConfigVerifiedBotsBypass) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *PutFirewallConfigVerifiedBotsBypass) GetUpdatedAt() *string { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *PutFirewallConfigVerifiedBotsBypass) GetUserID() *string { + if o == nil { + return nil + } + return o.UserID +} + +func (o *PutFirewallConfigVerifiedBotsBypass) GetUsername() *string { + if o == nil { + return nil + } + return o.Username +} + +type PutFirewallConfigManagedRules struct { + Owasp *PutFirewallConfigOwasp `json:"owasp,omitempty"` + VerifiedBotsBypass *PutFirewallConfigVerifiedBotsBypass `json:"verifiedBotsBypass,omitempty"` +} + +func (o *PutFirewallConfigManagedRules) GetOwasp() *PutFirewallConfigOwasp { + if o == nil { + return nil + } + return o.Owasp +} + +func (o *PutFirewallConfigManagedRules) GetVerifiedBotsBypass() *PutFirewallConfigVerifiedBotsBypass { + if o == nil { + return nil + } + return o.VerifiedBotsBypass +} + +type Active struct { + OwnerID string `json:"ownerId"` + ProjectKey string `json:"projectKey"` + ID string `json:"id"` + Version float64 `json:"version"` + UpdatedAt string `json:"updatedAt"` + FirewallEnabled bool `json:"firewallEnabled"` + // Custom Ruleset + Crs PutFirewallConfigCrs `json:"crs"` + Rules []PutFirewallConfigRules `json:"rules"` + Ips []PutFirewallConfigIps `json:"ips"` + Changes []PutFirewallConfigChanges `json:"changes"` + ManagedRules *PutFirewallConfigManagedRules `json:"managedRules,omitempty"` +} + +func (o *Active) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *Active) GetProjectKey() string { + if o == nil { + return "" + } + return o.ProjectKey +} + +func (o *Active) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Active) GetVersion() float64 { + if o == nil { + return 0.0 + } + return o.Version +} + +func (o *Active) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *Active) GetFirewallEnabled() bool { + if o == nil { + return false + } + return o.FirewallEnabled +} + +func (o *Active) GetCrs() PutFirewallConfigCrs { + if o == nil { + return PutFirewallConfigCrs{} + } + return o.Crs +} + +func (o *Active) GetRules() []PutFirewallConfigRules { + if o == nil { + return []PutFirewallConfigRules{} + } + return o.Rules +} + +func (o *Active) GetIps() []PutFirewallConfigIps { + if o == nil { + return []PutFirewallConfigIps{} + } + return o.Ips +} + +func (o *Active) GetChanges() []PutFirewallConfigChanges { + if o == nil { + return []PutFirewallConfigChanges{} + } + return o.Changes +} + +func (o *Active) GetManagedRules() *PutFirewallConfigManagedRules { + if o == nil { + return nil + } + return o.ManagedRules +} + +type PutFirewallConfigResponseBody struct { + Active Active `json:"active"` +} + +func (o *PutFirewallConfigResponseBody) GetActive() Active { + if o == nil { + return Active{} + } + return o.Active +} + +type PutFirewallConfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *PutFirewallConfigResponseBody +} + +func (o *PutFirewallConfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PutFirewallConfigResponse) GetObject() *PutFirewallConfigResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/readaccessgroup.go b/src/__tests__/mockserver/internal/sdk/models/operations/readaccessgroup.go new file mode 100644 index 00000000..09d877a1 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/readaccessgroup.go @@ -0,0 +1,162 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type ReadAccessGroupRequest struct { + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ReadAccessGroupRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *ReadAccessGroupRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ReadAccessGroupRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type Entitlements string + +const ( + EntitlementsV0 Entitlements = "v0" +) + +func (e Entitlements) ToPointer() *Entitlements { + return &e +} +func (e *Entitlements) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "v0": + *e = Entitlements(v) + return nil + default: + return fmt.Errorf("invalid value for Entitlements: %v", v) + } +} + +type ReadAccessGroupResponseBody struct { + Entitlements []Entitlements `json:"entitlements,omitempty"` + IsDsyncManaged bool `json:"isDsyncManaged"` + // The name of this access group. + Name string `json:"name"` + // Timestamp in milliseconds when the access group was created. + CreatedAt string `json:"createdAt"` + // ID of the team that this access group belongs to. + TeamID string `json:"teamId"` + // Timestamp in milliseconds when the access group was last updated. + UpdatedAt string `json:"updatedAt"` + // ID of the access group. + AccessGroupID string `json:"accessGroupId"` + // Number of members in the access group. + MembersCount float64 `json:"membersCount"` + // Number of projects in the access group. + ProjectsCount float64 `json:"projectsCount"` +} + +func (o *ReadAccessGroupResponseBody) GetEntitlements() []Entitlements { + if o == nil { + return nil + } + return o.Entitlements +} + +func (o *ReadAccessGroupResponseBody) GetIsDsyncManaged() bool { + if o == nil { + return false + } + return o.IsDsyncManaged +} + +func (o *ReadAccessGroupResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ReadAccessGroupResponseBody) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *ReadAccessGroupResponseBody) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *ReadAccessGroupResponseBody) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *ReadAccessGroupResponseBody) GetAccessGroupID() string { + if o == nil { + return "" + } + return o.AccessGroupID +} + +func (o *ReadAccessGroupResponseBody) GetMembersCount() float64 { + if o == nil { + return 0.0 + } + return o.MembersCount +} + +func (o *ReadAccessGroupResponseBody) GetProjectsCount() float64 { + if o == nil { + return 0.0 + } + return o.ProjectsCount +} + +type ReadAccessGroupResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *ReadAccessGroupResponseBody +} + +func (o *ReadAccessGroupResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ReadAccessGroupResponse) GetObject() *ReadAccessGroupResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/readaccessgroupproject.go b/src/__tests__/mockserver/internal/sdk/models/operations/readaccessgroupproject.go new file mode 100644 index 00000000..d1ca262e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/readaccessgroupproject.go @@ -0,0 +1,145 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type ReadAccessGroupProjectRequest struct { + AccessGroupIDOrName string `pathParam:"style=simple,explode=false,name=accessGroupIdOrName"` + ProjectID string `pathParam:"style=simple,explode=false,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *ReadAccessGroupProjectRequest) GetAccessGroupIDOrName() string { + if o == nil { + return "" + } + return o.AccessGroupIDOrName +} + +func (o *ReadAccessGroupProjectRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *ReadAccessGroupProjectRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *ReadAccessGroupProjectRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ReadAccessGroupProjectRole string + +const ( + ReadAccessGroupProjectRoleAdmin ReadAccessGroupProjectRole = "ADMIN" + ReadAccessGroupProjectRoleProjectDeveloper ReadAccessGroupProjectRole = "PROJECT_DEVELOPER" + ReadAccessGroupProjectRoleProjectViewer ReadAccessGroupProjectRole = "PROJECT_VIEWER" +) + +func (e ReadAccessGroupProjectRole) ToPointer() *ReadAccessGroupProjectRole { + return &e +} +func (e *ReadAccessGroupProjectRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = ReadAccessGroupProjectRole(v) + return nil + default: + return fmt.Errorf("invalid value for ReadAccessGroupProjectRole: %v", v) + } +} + +type ReadAccessGroupProjectResponseBody struct { + TeamID string `json:"teamId"` + AccessGroupID string `json:"accessGroupId"` + ProjectID string `json:"projectId"` + Role ReadAccessGroupProjectRole `json:"role"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` +} + +func (o *ReadAccessGroupProjectResponseBody) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *ReadAccessGroupProjectResponseBody) GetAccessGroupID() string { + if o == nil { + return "" + } + return o.AccessGroupID +} + +func (o *ReadAccessGroupProjectResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *ReadAccessGroupProjectResponseBody) GetRole() ReadAccessGroupProjectRole { + if o == nil { + return ReadAccessGroupProjectRole("") + } + return o.Role +} + +func (o *ReadAccessGroupProjectResponseBody) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *ReadAccessGroupProjectResponseBody) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +type ReadAccessGroupProjectResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *ReadAccessGroupProjectResponseBody +} + +func (o *ReadAccessGroupProjectResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ReadAccessGroupProjectResponse) GetObject() *ReadAccessGroupProjectResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/recordevents.go b/src/__tests__/mockserver/internal/sdk/models/operations/recordevents.go new file mode 100644 index 00000000..1f1154ad --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/recordevents.go @@ -0,0 +1,169 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// Source - One of `LOCAL` or `REMOTE`. `LOCAL` specifies that the cache event was from the user's filesystem cache. `REMOTE` specifies that the cache event is from a remote cache. +type Source string + +const ( + SourceLocal Source = "LOCAL" + SourceRemote Source = "REMOTE" +) + +func (e Source) ToPointer() *Source { + return &e +} +func (e *Source) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LOCAL": + fallthrough + case "REMOTE": + *e = Source(v) + return nil + default: + return fmt.Errorf("invalid value for Source: %v", v) + } +} + +// Event - One of `HIT` or `MISS`. `HIT` specifies that a cached artifact for `hash` was found in the cache. `MISS` specifies that a cached artifact with `hash` was not found. +type Event string + +const ( + EventHit Event = "HIT" + EventMiss Event = "MISS" +) + +func (e Event) ToPointer() *Event { + return &e +} +func (e *Event) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "HIT": + fallthrough + case "MISS": + *e = Event(v) + return nil + default: + return fmt.Errorf("invalid value for Event: %v", v) + } +} + +type RequestBody struct { + // A UUID (universally unique identifer) for the session that generated this event. + SessionID string `json:"sessionId"` + // One of `LOCAL` or `REMOTE`. `LOCAL` specifies that the cache event was from the user's filesystem cache. `REMOTE` specifies that the cache event is from a remote cache. + Source Source `json:"source"` + // One of `HIT` or `MISS`. `HIT` specifies that a cached artifact for `hash` was found in the cache. `MISS` specifies that a cached artifact with `hash` was not found. + Event Event `json:"event"` + // The artifact hash + Hash string `json:"hash"` + // The time taken to generate the artifact. This should be sent as a body parameter on `HIT` events. + Duration *float64 `json:"duration,omitempty"` +} + +func (o *RequestBody) GetSessionID() string { + if o == nil { + return "" + } + return o.SessionID +} + +func (o *RequestBody) GetSource() Source { + if o == nil { + return Source("") + } + return o.Source +} + +func (o *RequestBody) GetEvent() Event { + if o == nil { + return Event("") + } + return o.Event +} + +func (o *RequestBody) GetHash() string { + if o == nil { + return "" + } + return o.Hash +} + +func (o *RequestBody) GetDuration() *float64 { + if o == nil { + return nil + } + return o.Duration +} + +type RecordEventsRequest struct { + // The continuous integration or delivery environment where this artifact is downloaded. + XArtifactClientCi *string `header:"style=simple,explode=false,name=x-artifact-client-ci"` + // 1 if the client is an interactive shell. Otherwise 0 + XArtifactClientInteractive *int64 `header:"style=simple,explode=false,name=x-artifact-client-interactive"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody []RequestBody `request:"mediaType=application/json"` +} + +func (o *RecordEventsRequest) GetXArtifactClientCi() *string { + if o == nil { + return nil + } + return o.XArtifactClientCi +} + +func (o *RecordEventsRequest) GetXArtifactClientInteractive() *int64 { + if o == nil { + return nil + } + return o.XArtifactClientInteractive +} + +func (o *RecordEventsRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RecordEventsRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *RecordEventsRequest) GetRequestBody() []RequestBody { + if o == nil { + return []RequestBody{} + } + return o.RequestBody +} + +type RecordEventsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *RecordEventsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/removebypassip.go b/src/__tests__/mockserver/internal/sdk/models/operations/removebypassip.go new file mode 100644 index 00000000..9098832f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/removebypassip.go @@ -0,0 +1,226 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type RemoveBypassIPRequestBody2 struct { + Domain *string `json:"domain,omitempty"` + ProjectScope bool `json:"projectScope"` + SourceIP *string `json:"sourceIp,omitempty"` + AllSources *bool `json:"allSources,omitempty"` + Note *string `json:"note,omitempty"` +} + +func (o *RemoveBypassIPRequestBody2) GetDomain() *string { + if o == nil { + return nil + } + return o.Domain +} + +func (o *RemoveBypassIPRequestBody2) GetProjectScope() bool { + if o == nil { + return false + } + return o.ProjectScope +} + +func (o *RemoveBypassIPRequestBody2) GetSourceIP() *string { + if o == nil { + return nil + } + return o.SourceIP +} + +func (o *RemoveBypassIPRequestBody2) GetAllSources() *bool { + if o == nil { + return nil + } + return o.AllSources +} + +func (o *RemoveBypassIPRequestBody2) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +type RemoveBypassIPRequestBody1 struct { + Domain string `json:"domain"` + ProjectScope *bool `json:"projectScope,omitempty"` + SourceIP *string `json:"sourceIp,omitempty"` + AllSources *bool `json:"allSources,omitempty"` + Note *string `json:"note,omitempty"` +} + +func (o *RemoveBypassIPRequestBody1) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *RemoveBypassIPRequestBody1) GetProjectScope() *bool { + if o == nil { + return nil + } + return o.ProjectScope +} + +func (o *RemoveBypassIPRequestBody1) GetSourceIP() *string { + if o == nil { + return nil + } + return o.SourceIP +} + +func (o *RemoveBypassIPRequestBody1) GetAllSources() *bool { + if o == nil { + return nil + } + return o.AllSources +} + +func (o *RemoveBypassIPRequestBody1) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +type RemoveBypassIPRequestBodyType string + +const ( + RemoveBypassIPRequestBodyTypeRemoveBypassIPRequestBody1 RemoveBypassIPRequestBodyType = "removeBypassIp_requestBody_1" + RemoveBypassIPRequestBodyTypeRemoveBypassIPRequestBody2 RemoveBypassIPRequestBodyType = "removeBypassIp_requestBody_2" +) + +type RemoveBypassIPRequestBody struct { + RemoveBypassIPRequestBody1 *RemoveBypassIPRequestBody1 + RemoveBypassIPRequestBody2 *RemoveBypassIPRequestBody2 + + Type RemoveBypassIPRequestBodyType +} + +func CreateRemoveBypassIPRequestBodyRemoveBypassIPRequestBody1(removeBypassIPRequestBody1 RemoveBypassIPRequestBody1) RemoveBypassIPRequestBody { + typ := RemoveBypassIPRequestBodyTypeRemoveBypassIPRequestBody1 + + return RemoveBypassIPRequestBody{ + RemoveBypassIPRequestBody1: &removeBypassIPRequestBody1, + Type: typ, + } +} + +func CreateRemoveBypassIPRequestBodyRemoveBypassIPRequestBody2(removeBypassIPRequestBody2 RemoveBypassIPRequestBody2) RemoveBypassIPRequestBody { + typ := RemoveBypassIPRequestBodyTypeRemoveBypassIPRequestBody2 + + return RemoveBypassIPRequestBody{ + RemoveBypassIPRequestBody2: &removeBypassIPRequestBody2, + Type: typ, + } +} + +func (u *RemoveBypassIPRequestBody) UnmarshalJSON(data []byte) error { + + var removeBypassIPRequestBody1 RemoveBypassIPRequestBody1 = RemoveBypassIPRequestBody1{} + if err := utils.UnmarshalJSON(data, &removeBypassIPRequestBody1, "", true, true); err == nil { + u.RemoveBypassIPRequestBody1 = &removeBypassIPRequestBody1 + u.Type = RemoveBypassIPRequestBodyTypeRemoveBypassIPRequestBody1 + return nil + } + + var removeBypassIPRequestBody2 RemoveBypassIPRequestBody2 = RemoveBypassIPRequestBody2{} + if err := utils.UnmarshalJSON(data, &removeBypassIPRequestBody2, "", true, true); err == nil { + u.RemoveBypassIPRequestBody2 = &removeBypassIPRequestBody2 + u.Type = RemoveBypassIPRequestBodyTypeRemoveBypassIPRequestBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RemoveBypassIPRequestBody", string(data)) +} + +func (u RemoveBypassIPRequestBody) MarshalJSON() ([]byte, error) { + if u.RemoveBypassIPRequestBody1 != nil { + return utils.MarshalJSON(u.RemoveBypassIPRequestBody1, "", true) + } + + if u.RemoveBypassIPRequestBody2 != nil { + return utils.MarshalJSON(u.RemoveBypassIPRequestBody2, "", true) + } + + return nil, errors.New("could not marshal union type RemoveBypassIPRequestBody: all fields are null") +} + +type RemoveBypassIPRequest struct { + ProjectID string `queryParam:"style=form,explode=true,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody *RemoveBypassIPRequestBody `request:"mediaType=application/json"` +} + +func (o *RemoveBypassIPRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *RemoveBypassIPRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RemoveBypassIPRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *RemoveBypassIPRequest) GetRequestBody() *RemoveBypassIPRequestBody { + if o == nil { + return nil + } + return o.RequestBody +} + +type RemoveBypassIPResponseBody struct { + Ok bool `json:"ok"` +} + +func (o *RemoveBypassIPResponseBody) GetOk() bool { + if o == nil { + return false + } + return o.Ok +} + +type RemoveBypassIPResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *RemoveBypassIPResponseBody +} + +func (o *RemoveBypassIPResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RemoveBypassIPResponse) GetObject() *RemoveBypassIPResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/removecert.go b/src/__tests__/mockserver/internal/sdk/models/operations/removecert.go new file mode 100644 index 00000000..7a53c85a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/removecert.go @@ -0,0 +1,59 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RemoveCertRequest struct { + // The cert id to remove + ID string `pathParam:"style=simple,explode=false,name=id"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *RemoveCertRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *RemoveCertRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RemoveCertRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type RemoveCertResponseBody struct { +} + +type RemoveCertResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *RemoveCertResponseBody +} + +func (o *RemoveCertResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RemoveCertResponse) GetObject() *RemoveCertResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectdomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectdomain.go new file mode 100644 index 00000000..37aa2506 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectdomain.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RemoveProjectDomainRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The project domain name + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *RemoveProjectDomainRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *RemoveProjectDomainRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *RemoveProjectDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RemoveProjectDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// RemoveProjectDomainResponseBody - The domain was succesfully removed from the project +type RemoveProjectDomainResponseBody struct { +} + +type RemoveProjectDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The domain was succesfully removed from the project + Object *RemoveProjectDomainResponseBody +} + +func (o *RemoveProjectDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RemoveProjectDomainResponse) GetObject() *RemoveProjectDomainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectenv.go b/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectenv.go new file mode 100644 index 00000000..69b8b173 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectenv.go @@ -0,0 +1,4280 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type RemoveProjectEnvRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The unique environment variable identifier + ID string `pathParam:"style=simple,explode=false,name=id"` + // The unique custom environment identifier within the project + CustomEnvironmentID *string `queryParam:"style=form,explode=true,name=customEnvironmentId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *RemoveProjectEnvRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *RemoveProjectEnvRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *RemoveProjectEnvRequest) GetCustomEnvironmentID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentID +} + +func (o *RemoveProjectEnvRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RemoveProjectEnvRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type RemoveProjectEnvTargetProjectsResponse2 string + +const ( + RemoveProjectEnvTargetProjectsResponse2Production RemoveProjectEnvTargetProjectsResponse2 = "production" + RemoveProjectEnvTargetProjectsResponse2Preview RemoveProjectEnvTargetProjectsResponse2 = "preview" + RemoveProjectEnvTargetProjectsResponse2Development RemoveProjectEnvTargetProjectsResponse2 = "development" +) + +func (e RemoveProjectEnvTargetProjectsResponse2) ToPointer() *RemoveProjectEnvTargetProjectsResponse2 { + return &e +} +func (e *RemoveProjectEnvTargetProjectsResponse2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = RemoveProjectEnvTargetProjectsResponse2(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvTargetProjectsResponse2: %v", v) + } +} + +type RemoveProjectEnvTargetProjectsResponse1 string + +const ( + RemoveProjectEnvTargetProjectsResponse1Production RemoveProjectEnvTargetProjectsResponse1 = "production" + RemoveProjectEnvTargetProjectsResponse1Preview RemoveProjectEnvTargetProjectsResponse1 = "preview" + RemoveProjectEnvTargetProjectsResponse1Development RemoveProjectEnvTargetProjectsResponse1 = "development" +) + +func (e RemoveProjectEnvTargetProjectsResponse1) ToPointer() *RemoveProjectEnvTargetProjectsResponse1 { + return &e +} +func (e *RemoveProjectEnvTargetProjectsResponse1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = RemoveProjectEnvTargetProjectsResponse1(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvTargetProjectsResponse1: %v", v) + } +} + +type RemoveProjectEnvResponseBodyProjectsResponseTargetType string + +const ( + RemoveProjectEnvResponseBodyProjectsResponseTargetTypeArrayOfRemoveProjectEnvTargetProjectsResponse1 RemoveProjectEnvResponseBodyProjectsResponseTargetType = "arrayOfRemoveProjectEnvTargetProjectsResponse1" + RemoveProjectEnvResponseBodyProjectsResponseTargetTypeRemoveProjectEnvTargetProjectsResponse2 RemoveProjectEnvResponseBodyProjectsResponseTargetType = "removeProjectEnv_target_projects_response_2" +) + +type RemoveProjectEnvResponseBodyProjectsResponseTarget struct { + ArrayOfRemoveProjectEnvTargetProjectsResponse1 []RemoveProjectEnvTargetProjectsResponse1 + RemoveProjectEnvTargetProjectsResponse2 *RemoveProjectEnvTargetProjectsResponse2 + + Type RemoveProjectEnvResponseBodyProjectsResponseTargetType +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseTargetArrayOfRemoveProjectEnvTargetProjectsResponse1(arrayOfRemoveProjectEnvTargetProjectsResponse1 []RemoveProjectEnvTargetProjectsResponse1) RemoveProjectEnvResponseBodyProjectsResponseTarget { + typ := RemoveProjectEnvResponseBodyProjectsResponseTargetTypeArrayOfRemoveProjectEnvTargetProjectsResponse1 + + return RemoveProjectEnvResponseBodyProjectsResponseTarget{ + ArrayOfRemoveProjectEnvTargetProjectsResponse1: arrayOfRemoveProjectEnvTargetProjectsResponse1, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseTargetRemoveProjectEnvTargetProjectsResponse2(removeProjectEnvTargetProjectsResponse2 RemoveProjectEnvTargetProjectsResponse2) RemoveProjectEnvResponseBodyProjectsResponseTarget { + typ := RemoveProjectEnvResponseBodyProjectsResponseTargetTypeRemoveProjectEnvTargetProjectsResponse2 + + return RemoveProjectEnvResponseBodyProjectsResponseTarget{ + RemoveProjectEnvTargetProjectsResponse2: &removeProjectEnvTargetProjectsResponse2, + Type: typ, + } +} + +func (u *RemoveProjectEnvResponseBodyProjectsResponseTarget) UnmarshalJSON(data []byte) error { + + var arrayOfRemoveProjectEnvTargetProjectsResponse1 []RemoveProjectEnvTargetProjectsResponse1 = []RemoveProjectEnvTargetProjectsResponse1{} + if err := utils.UnmarshalJSON(data, &arrayOfRemoveProjectEnvTargetProjectsResponse1, "", true, true); err == nil { + u.ArrayOfRemoveProjectEnvTargetProjectsResponse1 = arrayOfRemoveProjectEnvTargetProjectsResponse1 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseTargetTypeArrayOfRemoveProjectEnvTargetProjectsResponse1 + return nil + } + + var removeProjectEnvTargetProjectsResponse2 RemoveProjectEnvTargetProjectsResponse2 = RemoveProjectEnvTargetProjectsResponse2("") + if err := utils.UnmarshalJSON(data, &removeProjectEnvTargetProjectsResponse2, "", true, true); err == nil { + u.RemoveProjectEnvTargetProjectsResponse2 = &removeProjectEnvTargetProjectsResponse2 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseTargetTypeRemoveProjectEnvTargetProjectsResponse2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RemoveProjectEnvResponseBodyProjectsResponseTarget", string(data)) +} + +func (u RemoveProjectEnvResponseBodyProjectsResponseTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfRemoveProjectEnvTargetProjectsResponse1 != nil { + return utils.MarshalJSON(u.ArrayOfRemoveProjectEnvTargetProjectsResponse1, "", true) + } + + if u.RemoveProjectEnvTargetProjectsResponse2 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvTargetProjectsResponse2, "", true) + } + + return nil, errors.New("could not marshal union type RemoveProjectEnvResponseBodyProjectsResponseTarget: all fields are null") +} + +type RemoveProjectEnvResponseBodyProjectsResponseType string + +const ( + RemoveProjectEnvResponseBodyProjectsResponseTypeSystem RemoveProjectEnvResponseBodyProjectsResponseType = "system" + RemoveProjectEnvResponseBodyProjectsResponseTypeEncrypted RemoveProjectEnvResponseBodyProjectsResponseType = "encrypted" + RemoveProjectEnvResponseBodyProjectsResponseTypePlain RemoveProjectEnvResponseBodyProjectsResponseType = "plain" + RemoveProjectEnvResponseBodyProjectsResponseTypeSensitive RemoveProjectEnvResponseBodyProjectsResponseType = "sensitive" + RemoveProjectEnvResponseBodyProjectsResponseTypeSecret RemoveProjectEnvResponseBodyProjectsResponseType = "secret" +) + +func (e RemoveProjectEnvResponseBodyProjectsResponseType) ToPointer() *RemoveProjectEnvResponseBodyProjectsResponseType { + return &e +} +func (e *RemoveProjectEnvResponseBodyProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = RemoveProjectEnvResponseBodyProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvResponseBodyProjectsResponseType: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315TypeFlagsConnectionString RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type = "flags-connection-string" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse15 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse15) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody315Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314TypeIntegrationStoreSecret RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type = "integration-store-secret" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse14 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse14) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody314Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *RemoveProjectEnvContentHintProjectsResponse14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *RemoveProjectEnvContentHintProjectsResponse14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *RemoveProjectEnvContentHintProjectsResponse14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313TypePostgresURLNoSsl RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type = "postgres-url-no-ssl" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse13 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse13) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody313Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312TypePostgresDatabase RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type = "postgres-database" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse12 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse12) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody312Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311TypePostgresPassword RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type = "postgres-password" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse11 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse11) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody311Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310TypePostgresHost RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type = "postgres-host" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse10 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse10) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody310Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39TypePostgresUser RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type = "postgres-user" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse9 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse9) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody39Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38TypePostgresPrismaURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type = "postgres-prisma-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse8 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse8) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody38Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37TypePostgresURLNonPooling RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type = "postgres-url-non-pooling" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse7 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse7) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody37Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36TypePostgresURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type = "postgres-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse6 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse6) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody36Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35TypeBlobReadWriteToken RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type = "blob-read-write-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse5 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse5) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody35Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34TypeRedisRestAPIReadOnlyToken RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type = "redis-rest-api-read-only-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse4 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse4) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody34Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33TypeRedisRestAPIToken RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type = "redis-rest-api-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse3 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse3) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody33Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32TypeRedisRestAPIURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type = "redis-rest-api-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse2 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse2) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody32Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3TypeRedisURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type = "redis-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse1 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjectsResponse1) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody3Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjectsResponse1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvResponseBodyProjectsResponseContentHintType string + +const ( + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse1 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_1" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse2 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_2" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse3 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_3" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse4 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_4" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse5 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_5" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse6 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_6" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse7 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_7" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse8 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_8" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse9 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_9" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse10 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_10" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse11 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_11" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse12 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_12" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse13 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_13" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse14 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_14" + RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse15 RemoveProjectEnvResponseBodyProjectsResponseContentHintType = "removeProjectEnv_contentHint_projects_response_15" +) + +type RemoveProjectEnvResponseBodyProjectsResponseContentHint struct { + RemoveProjectEnvContentHintProjectsResponse1 *RemoveProjectEnvContentHintProjectsResponse1 + RemoveProjectEnvContentHintProjectsResponse2 *RemoveProjectEnvContentHintProjectsResponse2 + RemoveProjectEnvContentHintProjectsResponse3 *RemoveProjectEnvContentHintProjectsResponse3 + RemoveProjectEnvContentHintProjectsResponse4 *RemoveProjectEnvContentHintProjectsResponse4 + RemoveProjectEnvContentHintProjectsResponse5 *RemoveProjectEnvContentHintProjectsResponse5 + RemoveProjectEnvContentHintProjectsResponse6 *RemoveProjectEnvContentHintProjectsResponse6 + RemoveProjectEnvContentHintProjectsResponse7 *RemoveProjectEnvContentHintProjectsResponse7 + RemoveProjectEnvContentHintProjectsResponse8 *RemoveProjectEnvContentHintProjectsResponse8 + RemoveProjectEnvContentHintProjectsResponse9 *RemoveProjectEnvContentHintProjectsResponse9 + RemoveProjectEnvContentHintProjectsResponse10 *RemoveProjectEnvContentHintProjectsResponse10 + RemoveProjectEnvContentHintProjectsResponse11 *RemoveProjectEnvContentHintProjectsResponse11 + RemoveProjectEnvContentHintProjectsResponse12 *RemoveProjectEnvContentHintProjectsResponse12 + RemoveProjectEnvContentHintProjectsResponse13 *RemoveProjectEnvContentHintProjectsResponse13 + RemoveProjectEnvContentHintProjectsResponse14 *RemoveProjectEnvContentHintProjectsResponse14 + RemoveProjectEnvContentHintProjectsResponse15 *RemoveProjectEnvContentHintProjectsResponse15 + + Type RemoveProjectEnvResponseBodyProjectsResponseContentHintType +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse1(removeProjectEnvContentHintProjectsResponse1 RemoveProjectEnvContentHintProjectsResponse1) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse1 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse1: &removeProjectEnvContentHintProjectsResponse1, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse2(removeProjectEnvContentHintProjectsResponse2 RemoveProjectEnvContentHintProjectsResponse2) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse2 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse2: &removeProjectEnvContentHintProjectsResponse2, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse3(removeProjectEnvContentHintProjectsResponse3 RemoveProjectEnvContentHintProjectsResponse3) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse3 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse3: &removeProjectEnvContentHintProjectsResponse3, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse4(removeProjectEnvContentHintProjectsResponse4 RemoveProjectEnvContentHintProjectsResponse4) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse4 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse4: &removeProjectEnvContentHintProjectsResponse4, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse5(removeProjectEnvContentHintProjectsResponse5 RemoveProjectEnvContentHintProjectsResponse5) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse5 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse5: &removeProjectEnvContentHintProjectsResponse5, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse6(removeProjectEnvContentHintProjectsResponse6 RemoveProjectEnvContentHintProjectsResponse6) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse6 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse6: &removeProjectEnvContentHintProjectsResponse6, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse7(removeProjectEnvContentHintProjectsResponse7 RemoveProjectEnvContentHintProjectsResponse7) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse7 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse7: &removeProjectEnvContentHintProjectsResponse7, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse8(removeProjectEnvContentHintProjectsResponse8 RemoveProjectEnvContentHintProjectsResponse8) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse8 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse8: &removeProjectEnvContentHintProjectsResponse8, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse9(removeProjectEnvContentHintProjectsResponse9 RemoveProjectEnvContentHintProjectsResponse9) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse9 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse9: &removeProjectEnvContentHintProjectsResponse9, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse10(removeProjectEnvContentHintProjectsResponse10 RemoveProjectEnvContentHintProjectsResponse10) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse10 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse10: &removeProjectEnvContentHintProjectsResponse10, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse11(removeProjectEnvContentHintProjectsResponse11 RemoveProjectEnvContentHintProjectsResponse11) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse11 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse11: &removeProjectEnvContentHintProjectsResponse11, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse12(removeProjectEnvContentHintProjectsResponse12 RemoveProjectEnvContentHintProjectsResponse12) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse12 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse12: &removeProjectEnvContentHintProjectsResponse12, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse13(removeProjectEnvContentHintProjectsResponse13 RemoveProjectEnvContentHintProjectsResponse13) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse13 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse13: &removeProjectEnvContentHintProjectsResponse13, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse14(removeProjectEnvContentHintProjectsResponse14 RemoveProjectEnvContentHintProjectsResponse14) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse14 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse14: &removeProjectEnvContentHintProjectsResponse14, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsResponseContentHintRemoveProjectEnvContentHintProjectsResponse15(removeProjectEnvContentHintProjectsResponse15 RemoveProjectEnvContentHintProjectsResponse15) RemoveProjectEnvResponseBodyProjectsResponseContentHint { + typ := RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse15 + + return RemoveProjectEnvResponseBodyProjectsResponseContentHint{ + RemoveProjectEnvContentHintProjectsResponse15: &removeProjectEnvContentHintProjectsResponse15, + Type: typ, + } +} + +func (u *RemoveProjectEnvResponseBodyProjectsResponseContentHint) UnmarshalJSON(data []byte) error { + + var removeProjectEnvContentHintProjectsResponse7 RemoveProjectEnvContentHintProjectsResponse7 = RemoveProjectEnvContentHintProjectsResponse7{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse7, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse7 = &removeProjectEnvContentHintProjectsResponse7 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse7 + return nil + } + + var removeProjectEnvContentHintProjectsResponse9 RemoveProjectEnvContentHintProjectsResponse9 = RemoveProjectEnvContentHintProjectsResponse9{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse9, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse9 = &removeProjectEnvContentHintProjectsResponse9 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse9 + return nil + } + + var removeProjectEnvContentHintProjectsResponse3 RemoveProjectEnvContentHintProjectsResponse3 = RemoveProjectEnvContentHintProjectsResponse3{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse3, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse3 = &removeProjectEnvContentHintProjectsResponse3 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse3 + return nil + } + + var removeProjectEnvContentHintProjectsResponse4 RemoveProjectEnvContentHintProjectsResponse4 = RemoveProjectEnvContentHintProjectsResponse4{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse4, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse4 = &removeProjectEnvContentHintProjectsResponse4 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse4 + return nil + } + + var removeProjectEnvContentHintProjectsResponse5 RemoveProjectEnvContentHintProjectsResponse5 = RemoveProjectEnvContentHintProjectsResponse5{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse5, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse5 = &removeProjectEnvContentHintProjectsResponse5 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse5 + return nil + } + + var removeProjectEnvContentHintProjectsResponse6 RemoveProjectEnvContentHintProjectsResponse6 = RemoveProjectEnvContentHintProjectsResponse6{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse6, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse6 = &removeProjectEnvContentHintProjectsResponse6 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse6 + return nil + } + + var removeProjectEnvContentHintProjectsResponse2 RemoveProjectEnvContentHintProjectsResponse2 = RemoveProjectEnvContentHintProjectsResponse2{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse2, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse2 = &removeProjectEnvContentHintProjectsResponse2 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse2 + return nil + } + + var removeProjectEnvContentHintProjectsResponse8 RemoveProjectEnvContentHintProjectsResponse8 = RemoveProjectEnvContentHintProjectsResponse8{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse8, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse8 = &removeProjectEnvContentHintProjectsResponse8 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse8 + return nil + } + + var removeProjectEnvContentHintProjectsResponse1 RemoveProjectEnvContentHintProjectsResponse1 = RemoveProjectEnvContentHintProjectsResponse1{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse1, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse1 = &removeProjectEnvContentHintProjectsResponse1 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse1 + return nil + } + + var removeProjectEnvContentHintProjectsResponse10 RemoveProjectEnvContentHintProjectsResponse10 = RemoveProjectEnvContentHintProjectsResponse10{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse10, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse10 = &removeProjectEnvContentHintProjectsResponse10 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse10 + return nil + } + + var removeProjectEnvContentHintProjectsResponse11 RemoveProjectEnvContentHintProjectsResponse11 = RemoveProjectEnvContentHintProjectsResponse11{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse11, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse11 = &removeProjectEnvContentHintProjectsResponse11 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse11 + return nil + } + + var removeProjectEnvContentHintProjectsResponse12 RemoveProjectEnvContentHintProjectsResponse12 = RemoveProjectEnvContentHintProjectsResponse12{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse12, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse12 = &removeProjectEnvContentHintProjectsResponse12 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse12 + return nil + } + + var removeProjectEnvContentHintProjectsResponse13 RemoveProjectEnvContentHintProjectsResponse13 = RemoveProjectEnvContentHintProjectsResponse13{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse13, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse13 = &removeProjectEnvContentHintProjectsResponse13 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse13 + return nil + } + + var removeProjectEnvContentHintProjectsResponse15 RemoveProjectEnvContentHintProjectsResponse15 = RemoveProjectEnvContentHintProjectsResponse15{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse15, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse15 = &removeProjectEnvContentHintProjectsResponse15 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse15 + return nil + } + + var removeProjectEnvContentHintProjectsResponse14 RemoveProjectEnvContentHintProjectsResponse14 = RemoveProjectEnvContentHintProjectsResponse14{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjectsResponse14, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjectsResponse14 = &removeProjectEnvContentHintProjectsResponse14 + u.Type = RemoveProjectEnvResponseBodyProjectsResponseContentHintTypeRemoveProjectEnvContentHintProjectsResponse14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RemoveProjectEnvResponseBodyProjectsResponseContentHint", string(data)) +} + +func (u RemoveProjectEnvResponseBodyProjectsResponseContentHint) MarshalJSON() ([]byte, error) { + if u.RemoveProjectEnvContentHintProjectsResponse1 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse1, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse2 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse2, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse3 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse3, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse4 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse4, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse5 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse5, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse6 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse6, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse7 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse7, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse8 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse8, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse9 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse9, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse10 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse10, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse11 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse11, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse12 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse12, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse13 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse13, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse14 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse14, "", true) + } + + if u.RemoveProjectEnvContentHintProjectsResponse15 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjectsResponse15, "", true) + } + + return nil, errors.New("could not marshal union type RemoveProjectEnvResponseBodyProjectsResponseContentHint: all fields are null") +} + +type RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type string + +const ( + RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3TypeFlagsSecret RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type = "flags-secret" +) + +func (e RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type) ToPointer() *RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type { + return &e +} +func (e *RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type: %v", v) + } +} + +// RemoveProjectEnvResponseBodyProjectsResponseInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type RemoveProjectEnvResponseBodyProjectsResponseInternalContentHint struct { + Type RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *RemoveProjectEnvResponseBodyProjectsResponseInternalContentHint) GetType() RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type { + if o == nil { + return RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSON3Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvResponseBodyProjectsResponseInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type RemoveProjectEnvResponseBody3 struct { + Target *RemoveProjectEnvResponseBodyProjectsResponseTarget `json:"target,omitempty"` + Type RemoveProjectEnvResponseBodyProjectsResponseType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *RemoveProjectEnvResponseBodyProjectsResponseContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *RemoveProjectEnvResponseBodyProjectsResponseInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *RemoveProjectEnvResponseBody3) GetTarget() *RemoveProjectEnvResponseBodyProjectsResponseTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *RemoveProjectEnvResponseBody3) GetType() RemoveProjectEnvResponseBodyProjectsResponseType { + if o == nil { + return RemoveProjectEnvResponseBodyProjectsResponseType("") + } + return o.Type +} + +func (o *RemoveProjectEnvResponseBody3) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *RemoveProjectEnvResponseBody3) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *RemoveProjectEnvResponseBody3) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *RemoveProjectEnvResponseBody3) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *RemoveProjectEnvResponseBody3) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *RemoveProjectEnvResponseBody3) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *RemoveProjectEnvResponseBody3) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *RemoveProjectEnvResponseBody3) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *RemoveProjectEnvResponseBody3) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *RemoveProjectEnvResponseBody3) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *RemoveProjectEnvResponseBody3) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *RemoveProjectEnvResponseBody3) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *RemoveProjectEnvResponseBody3) GetContentHint() *RemoveProjectEnvResponseBodyProjectsResponseContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *RemoveProjectEnvResponseBody3) GetInternalContentHint() *RemoveProjectEnvResponseBodyProjectsResponseInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *RemoveProjectEnvResponseBody3) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *RemoveProjectEnvResponseBody3) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *RemoveProjectEnvResponseBody3) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *RemoveProjectEnvResponseBody3) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type RemoveProjectEnvTargetProjects2 string + +const ( + RemoveProjectEnvTargetProjects2Production RemoveProjectEnvTargetProjects2 = "production" + RemoveProjectEnvTargetProjects2Preview RemoveProjectEnvTargetProjects2 = "preview" + RemoveProjectEnvTargetProjects2Development RemoveProjectEnvTargetProjects2 = "development" +) + +func (e RemoveProjectEnvTargetProjects2) ToPointer() *RemoveProjectEnvTargetProjects2 { + return &e +} +func (e *RemoveProjectEnvTargetProjects2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = RemoveProjectEnvTargetProjects2(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvTargetProjects2: %v", v) + } +} + +type RemoveProjectEnvTargetProjects1 string + +const ( + RemoveProjectEnvTargetProjects1Production RemoveProjectEnvTargetProjects1 = "production" + RemoveProjectEnvTargetProjects1Preview RemoveProjectEnvTargetProjects1 = "preview" + RemoveProjectEnvTargetProjects1Development RemoveProjectEnvTargetProjects1 = "development" +) + +func (e RemoveProjectEnvTargetProjects1) ToPointer() *RemoveProjectEnvTargetProjects1 { + return &e +} +func (e *RemoveProjectEnvTargetProjects1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = RemoveProjectEnvTargetProjects1(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvTargetProjects1: %v", v) + } +} + +type RemoveProjectEnvResponseBodyProjectsTargetType string + +const ( + RemoveProjectEnvResponseBodyProjectsTargetTypeArrayOfRemoveProjectEnvTargetProjects1 RemoveProjectEnvResponseBodyProjectsTargetType = "arrayOfRemoveProjectEnvTargetProjects1" + RemoveProjectEnvResponseBodyProjectsTargetTypeRemoveProjectEnvTargetProjects2 RemoveProjectEnvResponseBodyProjectsTargetType = "removeProjectEnv_target_projects_2" +) + +type RemoveProjectEnvResponseBodyProjectsTarget struct { + ArrayOfRemoveProjectEnvTargetProjects1 []RemoveProjectEnvTargetProjects1 + RemoveProjectEnvTargetProjects2 *RemoveProjectEnvTargetProjects2 + + Type RemoveProjectEnvResponseBodyProjectsTargetType +} + +func CreateRemoveProjectEnvResponseBodyProjectsTargetArrayOfRemoveProjectEnvTargetProjects1(arrayOfRemoveProjectEnvTargetProjects1 []RemoveProjectEnvTargetProjects1) RemoveProjectEnvResponseBodyProjectsTarget { + typ := RemoveProjectEnvResponseBodyProjectsTargetTypeArrayOfRemoveProjectEnvTargetProjects1 + + return RemoveProjectEnvResponseBodyProjectsTarget{ + ArrayOfRemoveProjectEnvTargetProjects1: arrayOfRemoveProjectEnvTargetProjects1, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsTargetRemoveProjectEnvTargetProjects2(removeProjectEnvTargetProjects2 RemoveProjectEnvTargetProjects2) RemoveProjectEnvResponseBodyProjectsTarget { + typ := RemoveProjectEnvResponseBodyProjectsTargetTypeRemoveProjectEnvTargetProjects2 + + return RemoveProjectEnvResponseBodyProjectsTarget{ + RemoveProjectEnvTargetProjects2: &removeProjectEnvTargetProjects2, + Type: typ, + } +} + +func (u *RemoveProjectEnvResponseBodyProjectsTarget) UnmarshalJSON(data []byte) error { + + var arrayOfRemoveProjectEnvTargetProjects1 []RemoveProjectEnvTargetProjects1 = []RemoveProjectEnvTargetProjects1{} + if err := utils.UnmarshalJSON(data, &arrayOfRemoveProjectEnvTargetProjects1, "", true, true); err == nil { + u.ArrayOfRemoveProjectEnvTargetProjects1 = arrayOfRemoveProjectEnvTargetProjects1 + u.Type = RemoveProjectEnvResponseBodyProjectsTargetTypeArrayOfRemoveProjectEnvTargetProjects1 + return nil + } + + var removeProjectEnvTargetProjects2 RemoveProjectEnvTargetProjects2 = RemoveProjectEnvTargetProjects2("") + if err := utils.UnmarshalJSON(data, &removeProjectEnvTargetProjects2, "", true, true); err == nil { + u.RemoveProjectEnvTargetProjects2 = &removeProjectEnvTargetProjects2 + u.Type = RemoveProjectEnvResponseBodyProjectsTargetTypeRemoveProjectEnvTargetProjects2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RemoveProjectEnvResponseBodyProjectsTarget", string(data)) +} + +func (u RemoveProjectEnvResponseBodyProjectsTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfRemoveProjectEnvTargetProjects1 != nil { + return utils.MarshalJSON(u.ArrayOfRemoveProjectEnvTargetProjects1, "", true) + } + + if u.RemoveProjectEnvTargetProjects2 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvTargetProjects2, "", true) + } + + return nil, errors.New("could not marshal union type RemoveProjectEnvResponseBodyProjectsTarget: all fields are null") +} + +type RemoveProjectEnvResponseBodyProjectsType string + +const ( + RemoveProjectEnvResponseBodyProjectsTypeSystem RemoveProjectEnvResponseBodyProjectsType = "system" + RemoveProjectEnvResponseBodyProjectsTypeEncrypted RemoveProjectEnvResponseBodyProjectsType = "encrypted" + RemoveProjectEnvResponseBodyProjectsTypePlain RemoveProjectEnvResponseBodyProjectsType = "plain" + RemoveProjectEnvResponseBodyProjectsTypeSensitive RemoveProjectEnvResponseBodyProjectsType = "sensitive" + RemoveProjectEnvResponseBodyProjectsTypeSecret RemoveProjectEnvResponseBodyProjectsType = "secret" +) + +func (e RemoveProjectEnvResponseBodyProjectsType) ToPointer() *RemoveProjectEnvResponseBodyProjectsType { + return &e +} +func (e *RemoveProjectEnvResponseBodyProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = RemoveProjectEnvResponseBodyProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvResponseBodyProjectsType: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215TypeFlagsConnectionString RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type = "flags-connection-string" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects15 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *RemoveProjectEnvContentHintProjects15) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody215Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214TypeIntegrationStoreSecret RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type = "integration-store-secret" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects14 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *RemoveProjectEnvContentHintProjects14) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody214Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *RemoveProjectEnvContentHintProjects14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *RemoveProjectEnvContentHintProjects14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *RemoveProjectEnvContentHintProjects14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213TypePostgresURLNoSsl RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type = "postgres-url-no-ssl" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects13 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects13) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody213Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212TypePostgresDatabase RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type = "postgres-database" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects12 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects12) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody212Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211TypePostgresPassword RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type = "postgres-password" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects11 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects11) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody211Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210TypePostgresHost RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type = "postgres-host" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects10 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects10) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody210Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29TypePostgresUser RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type = "postgres-user" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects9 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects9) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody29Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28TypePostgresPrismaURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type = "postgres-prisma-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects8 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects8) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody28Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27TypePostgresURLNonPooling RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type = "postgres-url-non-pooling" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects7 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects7) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody27Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26TypePostgresURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type = "postgres-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects6 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects6) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody26Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25TypeBlobReadWriteToken RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type = "blob-read-write-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects5 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects5) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody25Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24TypeRedisRestAPIReadOnlyToken RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type = "redis-rest-api-read-only-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects4 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects4) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody24Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23TypeRedisRestAPIToken RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type = "redis-rest-api-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects3 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects3) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody23Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22TypeRedisRestAPIURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type = "redis-rest-api-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects2 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects2) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody22Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2TypeRedisURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type = "redis-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type: %v", v) + } +} + +type RemoveProjectEnvContentHintProjects1 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHintProjects1) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody2Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHintProjects1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvResponseBodyProjectsContentHintType string + +const ( + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects1 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_1" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects2 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_2" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects3 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_3" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects4 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_4" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects5 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_5" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects6 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_6" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects7 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_7" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects8 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_8" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects9 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_9" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects10 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_10" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects11 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_11" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects12 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_12" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects13 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_13" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects14 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_14" + RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects15 RemoveProjectEnvResponseBodyProjectsContentHintType = "removeProjectEnv_contentHint_projects_15" +) + +type RemoveProjectEnvResponseBodyProjectsContentHint struct { + RemoveProjectEnvContentHintProjects1 *RemoveProjectEnvContentHintProjects1 + RemoveProjectEnvContentHintProjects2 *RemoveProjectEnvContentHintProjects2 + RemoveProjectEnvContentHintProjects3 *RemoveProjectEnvContentHintProjects3 + RemoveProjectEnvContentHintProjects4 *RemoveProjectEnvContentHintProjects4 + RemoveProjectEnvContentHintProjects5 *RemoveProjectEnvContentHintProjects5 + RemoveProjectEnvContentHintProjects6 *RemoveProjectEnvContentHintProjects6 + RemoveProjectEnvContentHintProjects7 *RemoveProjectEnvContentHintProjects7 + RemoveProjectEnvContentHintProjects8 *RemoveProjectEnvContentHintProjects8 + RemoveProjectEnvContentHintProjects9 *RemoveProjectEnvContentHintProjects9 + RemoveProjectEnvContentHintProjects10 *RemoveProjectEnvContentHintProjects10 + RemoveProjectEnvContentHintProjects11 *RemoveProjectEnvContentHintProjects11 + RemoveProjectEnvContentHintProjects12 *RemoveProjectEnvContentHintProjects12 + RemoveProjectEnvContentHintProjects13 *RemoveProjectEnvContentHintProjects13 + RemoveProjectEnvContentHintProjects14 *RemoveProjectEnvContentHintProjects14 + RemoveProjectEnvContentHintProjects15 *RemoveProjectEnvContentHintProjects15 + + Type RemoveProjectEnvResponseBodyProjectsContentHintType +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects1(removeProjectEnvContentHintProjects1 RemoveProjectEnvContentHintProjects1) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects1 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects1: &removeProjectEnvContentHintProjects1, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects2(removeProjectEnvContentHintProjects2 RemoveProjectEnvContentHintProjects2) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects2 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects2: &removeProjectEnvContentHintProjects2, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects3(removeProjectEnvContentHintProjects3 RemoveProjectEnvContentHintProjects3) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects3 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects3: &removeProjectEnvContentHintProjects3, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects4(removeProjectEnvContentHintProjects4 RemoveProjectEnvContentHintProjects4) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects4 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects4: &removeProjectEnvContentHintProjects4, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects5(removeProjectEnvContentHintProjects5 RemoveProjectEnvContentHintProjects5) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects5 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects5: &removeProjectEnvContentHintProjects5, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects6(removeProjectEnvContentHintProjects6 RemoveProjectEnvContentHintProjects6) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects6 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects6: &removeProjectEnvContentHintProjects6, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects7(removeProjectEnvContentHintProjects7 RemoveProjectEnvContentHintProjects7) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects7 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects7: &removeProjectEnvContentHintProjects7, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects8(removeProjectEnvContentHintProjects8 RemoveProjectEnvContentHintProjects8) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects8 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects8: &removeProjectEnvContentHintProjects8, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects9(removeProjectEnvContentHintProjects9 RemoveProjectEnvContentHintProjects9) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects9 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects9: &removeProjectEnvContentHintProjects9, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects10(removeProjectEnvContentHintProjects10 RemoveProjectEnvContentHintProjects10) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects10 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects10: &removeProjectEnvContentHintProjects10, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects11(removeProjectEnvContentHintProjects11 RemoveProjectEnvContentHintProjects11) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects11 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects11: &removeProjectEnvContentHintProjects11, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects12(removeProjectEnvContentHintProjects12 RemoveProjectEnvContentHintProjects12) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects12 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects12: &removeProjectEnvContentHintProjects12, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects13(removeProjectEnvContentHintProjects13 RemoveProjectEnvContentHintProjects13) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects13 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects13: &removeProjectEnvContentHintProjects13, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects14(removeProjectEnvContentHintProjects14 RemoveProjectEnvContentHintProjects14) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects14 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects14: &removeProjectEnvContentHintProjects14, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyProjectsContentHintRemoveProjectEnvContentHintProjects15(removeProjectEnvContentHintProjects15 RemoveProjectEnvContentHintProjects15) RemoveProjectEnvResponseBodyProjectsContentHint { + typ := RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects15 + + return RemoveProjectEnvResponseBodyProjectsContentHint{ + RemoveProjectEnvContentHintProjects15: &removeProjectEnvContentHintProjects15, + Type: typ, + } +} + +func (u *RemoveProjectEnvResponseBodyProjectsContentHint) UnmarshalJSON(data []byte) error { + + var removeProjectEnvContentHintProjects7 RemoveProjectEnvContentHintProjects7 = RemoveProjectEnvContentHintProjects7{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects7, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects7 = &removeProjectEnvContentHintProjects7 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects7 + return nil + } + + var removeProjectEnvContentHintProjects9 RemoveProjectEnvContentHintProjects9 = RemoveProjectEnvContentHintProjects9{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects9, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects9 = &removeProjectEnvContentHintProjects9 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects9 + return nil + } + + var removeProjectEnvContentHintProjects3 RemoveProjectEnvContentHintProjects3 = RemoveProjectEnvContentHintProjects3{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects3, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects3 = &removeProjectEnvContentHintProjects3 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects3 + return nil + } + + var removeProjectEnvContentHintProjects4 RemoveProjectEnvContentHintProjects4 = RemoveProjectEnvContentHintProjects4{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects4, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects4 = &removeProjectEnvContentHintProjects4 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects4 + return nil + } + + var removeProjectEnvContentHintProjects5 RemoveProjectEnvContentHintProjects5 = RemoveProjectEnvContentHintProjects5{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects5, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects5 = &removeProjectEnvContentHintProjects5 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects5 + return nil + } + + var removeProjectEnvContentHintProjects6 RemoveProjectEnvContentHintProjects6 = RemoveProjectEnvContentHintProjects6{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects6, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects6 = &removeProjectEnvContentHintProjects6 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects6 + return nil + } + + var removeProjectEnvContentHintProjects2 RemoveProjectEnvContentHintProjects2 = RemoveProjectEnvContentHintProjects2{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects2, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects2 = &removeProjectEnvContentHintProjects2 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects2 + return nil + } + + var removeProjectEnvContentHintProjects8 RemoveProjectEnvContentHintProjects8 = RemoveProjectEnvContentHintProjects8{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects8, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects8 = &removeProjectEnvContentHintProjects8 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects8 + return nil + } + + var removeProjectEnvContentHintProjects1 RemoveProjectEnvContentHintProjects1 = RemoveProjectEnvContentHintProjects1{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects1, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects1 = &removeProjectEnvContentHintProjects1 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects1 + return nil + } + + var removeProjectEnvContentHintProjects10 RemoveProjectEnvContentHintProjects10 = RemoveProjectEnvContentHintProjects10{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects10, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects10 = &removeProjectEnvContentHintProjects10 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects10 + return nil + } + + var removeProjectEnvContentHintProjects11 RemoveProjectEnvContentHintProjects11 = RemoveProjectEnvContentHintProjects11{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects11, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects11 = &removeProjectEnvContentHintProjects11 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects11 + return nil + } + + var removeProjectEnvContentHintProjects12 RemoveProjectEnvContentHintProjects12 = RemoveProjectEnvContentHintProjects12{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects12, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects12 = &removeProjectEnvContentHintProjects12 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects12 + return nil + } + + var removeProjectEnvContentHintProjects13 RemoveProjectEnvContentHintProjects13 = RemoveProjectEnvContentHintProjects13{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects13, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects13 = &removeProjectEnvContentHintProjects13 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects13 + return nil + } + + var removeProjectEnvContentHintProjects15 RemoveProjectEnvContentHintProjects15 = RemoveProjectEnvContentHintProjects15{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects15, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects15 = &removeProjectEnvContentHintProjects15 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects15 + return nil + } + + var removeProjectEnvContentHintProjects14 RemoveProjectEnvContentHintProjects14 = RemoveProjectEnvContentHintProjects14{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHintProjects14, "", true, true); err == nil { + u.RemoveProjectEnvContentHintProjects14 = &removeProjectEnvContentHintProjects14 + u.Type = RemoveProjectEnvResponseBodyProjectsContentHintTypeRemoveProjectEnvContentHintProjects14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RemoveProjectEnvResponseBodyProjectsContentHint", string(data)) +} + +func (u RemoveProjectEnvResponseBodyProjectsContentHint) MarshalJSON() ([]byte, error) { + if u.RemoveProjectEnvContentHintProjects1 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects1, "", true) + } + + if u.RemoveProjectEnvContentHintProjects2 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects2, "", true) + } + + if u.RemoveProjectEnvContentHintProjects3 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects3, "", true) + } + + if u.RemoveProjectEnvContentHintProjects4 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects4, "", true) + } + + if u.RemoveProjectEnvContentHintProjects5 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects5, "", true) + } + + if u.RemoveProjectEnvContentHintProjects6 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects6, "", true) + } + + if u.RemoveProjectEnvContentHintProjects7 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects7, "", true) + } + + if u.RemoveProjectEnvContentHintProjects8 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects8, "", true) + } + + if u.RemoveProjectEnvContentHintProjects9 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects9, "", true) + } + + if u.RemoveProjectEnvContentHintProjects10 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects10, "", true) + } + + if u.RemoveProjectEnvContentHintProjects11 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects11, "", true) + } + + if u.RemoveProjectEnvContentHintProjects12 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects12, "", true) + } + + if u.RemoveProjectEnvContentHintProjects13 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects13, "", true) + } + + if u.RemoveProjectEnvContentHintProjects14 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects14, "", true) + } + + if u.RemoveProjectEnvContentHintProjects15 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHintProjects15, "", true) + } + + return nil, errors.New("could not marshal union type RemoveProjectEnvResponseBodyProjectsContentHint: all fields are null") +} + +type RemoveProjectEnvResponseBodyProjectsResponse200Type string + +const ( + RemoveProjectEnvResponseBodyProjectsResponse200TypeFlagsSecret RemoveProjectEnvResponseBodyProjectsResponse200Type = "flags-secret" +) + +func (e RemoveProjectEnvResponseBodyProjectsResponse200Type) ToPointer() *RemoveProjectEnvResponseBodyProjectsResponse200Type { + return &e +} +func (e *RemoveProjectEnvResponseBodyProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = RemoveProjectEnvResponseBodyProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvResponseBodyProjectsResponse200Type: %v", v) + } +} + +// RemoveProjectEnvResponseBodyProjectsInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type RemoveProjectEnvResponseBodyProjectsInternalContentHint struct { + Type RemoveProjectEnvResponseBodyProjectsResponse200Type `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *RemoveProjectEnvResponseBodyProjectsInternalContentHint) GetType() RemoveProjectEnvResponseBodyProjectsResponse200Type { + if o == nil { + return RemoveProjectEnvResponseBodyProjectsResponse200Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvResponseBodyProjectsInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type RemoveProjectEnvResponseBody2 struct { + System *bool `json:"system,omitempty"` + Target *RemoveProjectEnvResponseBodyProjectsTarget `json:"target,omitempty"` + Type RemoveProjectEnvResponseBodyProjectsType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *RemoveProjectEnvResponseBodyProjectsContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *RemoveProjectEnvResponseBodyProjectsInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *RemoveProjectEnvResponseBody2) GetSystem() *bool { + if o == nil { + return nil + } + return o.System +} + +func (o *RemoveProjectEnvResponseBody2) GetTarget() *RemoveProjectEnvResponseBodyProjectsTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *RemoveProjectEnvResponseBody2) GetType() RemoveProjectEnvResponseBodyProjectsType { + if o == nil { + return RemoveProjectEnvResponseBodyProjectsType("") + } + return o.Type +} + +func (o *RemoveProjectEnvResponseBody2) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *RemoveProjectEnvResponseBody2) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *RemoveProjectEnvResponseBody2) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *RemoveProjectEnvResponseBody2) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *RemoveProjectEnvResponseBody2) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *RemoveProjectEnvResponseBody2) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *RemoveProjectEnvResponseBody2) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *RemoveProjectEnvResponseBody2) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *RemoveProjectEnvResponseBody2) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *RemoveProjectEnvResponseBody2) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *RemoveProjectEnvResponseBody2) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *RemoveProjectEnvResponseBody2) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *RemoveProjectEnvResponseBody2) GetContentHint() *RemoveProjectEnvResponseBodyProjectsContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *RemoveProjectEnvResponseBody2) GetInternalContentHint() *RemoveProjectEnvResponseBodyProjectsInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *RemoveProjectEnvResponseBody2) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *RemoveProjectEnvResponseBody2) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *RemoveProjectEnvResponseBody2) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *RemoveProjectEnvResponseBody2) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type RemoveProjectEnvTarget2 string + +const ( + RemoveProjectEnvTarget2Production RemoveProjectEnvTarget2 = "production" + RemoveProjectEnvTarget2Preview RemoveProjectEnvTarget2 = "preview" + RemoveProjectEnvTarget2Development RemoveProjectEnvTarget2 = "development" +) + +func (e RemoveProjectEnvTarget2) ToPointer() *RemoveProjectEnvTarget2 { + return &e +} +func (e *RemoveProjectEnvTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = RemoveProjectEnvTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvTarget2: %v", v) + } +} + +type RemoveProjectEnvTarget1 string + +const ( + RemoveProjectEnvTarget1Production RemoveProjectEnvTarget1 = "production" + RemoveProjectEnvTarget1Preview RemoveProjectEnvTarget1 = "preview" + RemoveProjectEnvTarget1Development RemoveProjectEnvTarget1 = "development" +) + +func (e RemoveProjectEnvTarget1) ToPointer() *RemoveProjectEnvTarget1 { + return &e +} +func (e *RemoveProjectEnvTarget1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = RemoveProjectEnvTarget1(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvTarget1: %v", v) + } +} + +type RemoveProjectEnvResponseBodyTargetType string + +const ( + RemoveProjectEnvResponseBodyTargetTypeArrayOfRemoveProjectEnvTarget1 RemoveProjectEnvResponseBodyTargetType = "arrayOfRemoveProjectEnvTarget1" + RemoveProjectEnvResponseBodyTargetTypeRemoveProjectEnvTarget2 RemoveProjectEnvResponseBodyTargetType = "removeProjectEnv_target_2" +) + +type RemoveProjectEnvResponseBodyTarget struct { + ArrayOfRemoveProjectEnvTarget1 []RemoveProjectEnvTarget1 + RemoveProjectEnvTarget2 *RemoveProjectEnvTarget2 + + Type RemoveProjectEnvResponseBodyTargetType +} + +func CreateRemoveProjectEnvResponseBodyTargetArrayOfRemoveProjectEnvTarget1(arrayOfRemoveProjectEnvTarget1 []RemoveProjectEnvTarget1) RemoveProjectEnvResponseBodyTarget { + typ := RemoveProjectEnvResponseBodyTargetTypeArrayOfRemoveProjectEnvTarget1 + + return RemoveProjectEnvResponseBodyTarget{ + ArrayOfRemoveProjectEnvTarget1: arrayOfRemoveProjectEnvTarget1, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyTargetRemoveProjectEnvTarget2(removeProjectEnvTarget2 RemoveProjectEnvTarget2) RemoveProjectEnvResponseBodyTarget { + typ := RemoveProjectEnvResponseBodyTargetTypeRemoveProjectEnvTarget2 + + return RemoveProjectEnvResponseBodyTarget{ + RemoveProjectEnvTarget2: &removeProjectEnvTarget2, + Type: typ, + } +} + +func (u *RemoveProjectEnvResponseBodyTarget) UnmarshalJSON(data []byte) error { + + var arrayOfRemoveProjectEnvTarget1 []RemoveProjectEnvTarget1 = []RemoveProjectEnvTarget1{} + if err := utils.UnmarshalJSON(data, &arrayOfRemoveProjectEnvTarget1, "", true, true); err == nil { + u.ArrayOfRemoveProjectEnvTarget1 = arrayOfRemoveProjectEnvTarget1 + u.Type = RemoveProjectEnvResponseBodyTargetTypeArrayOfRemoveProjectEnvTarget1 + return nil + } + + var removeProjectEnvTarget2 RemoveProjectEnvTarget2 = RemoveProjectEnvTarget2("") + if err := utils.UnmarshalJSON(data, &removeProjectEnvTarget2, "", true, true); err == nil { + u.RemoveProjectEnvTarget2 = &removeProjectEnvTarget2 + u.Type = RemoveProjectEnvResponseBodyTargetTypeRemoveProjectEnvTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RemoveProjectEnvResponseBodyTarget", string(data)) +} + +func (u RemoveProjectEnvResponseBodyTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfRemoveProjectEnvTarget1 != nil { + return utils.MarshalJSON(u.ArrayOfRemoveProjectEnvTarget1, "", true) + } + + if u.RemoveProjectEnvTarget2 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvTarget2, "", true) + } + + return nil, errors.New("could not marshal union type RemoveProjectEnvResponseBodyTarget: all fields are null") +} + +type RemoveProjectEnvResponseBodyType string + +const ( + RemoveProjectEnvResponseBodyTypeSystem RemoveProjectEnvResponseBodyType = "system" + RemoveProjectEnvResponseBodyTypeEncrypted RemoveProjectEnvResponseBodyType = "encrypted" + RemoveProjectEnvResponseBodyTypePlain RemoveProjectEnvResponseBodyType = "plain" + RemoveProjectEnvResponseBodyTypeSensitive RemoveProjectEnvResponseBodyType = "sensitive" + RemoveProjectEnvResponseBodyTypeSecret RemoveProjectEnvResponseBodyType = "secret" +) + +func (e RemoveProjectEnvResponseBodyType) ToPointer() *RemoveProjectEnvResponseBodyType { + return &e +} +func (e *RemoveProjectEnvResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = RemoveProjectEnvResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvResponseBodyType: %v", v) + } +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115TypeFlagsConnectionString RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type = "flags-connection-string" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type: %v", v) + } +} + +type RemoveProjectEnvContentHint15 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *RemoveProjectEnvContentHint15) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody115Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114TypeIntegrationStoreSecret RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type = "integration-store-secret" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type: %v", v) + } +} + +type RemoveProjectEnvContentHint14 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *RemoveProjectEnvContentHint14) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody114Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *RemoveProjectEnvContentHint14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *RemoveProjectEnvContentHint14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *RemoveProjectEnvContentHint14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113TypePostgresURLNoSsl RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type = "postgres-url-no-ssl" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type: %v", v) + } +} + +type RemoveProjectEnvContentHint13 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint13) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody113Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112TypePostgresDatabase RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type = "postgres-database" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type: %v", v) + } +} + +type RemoveProjectEnvContentHint12 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint12) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody112Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111TypePostgresPassword RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type = "postgres-password" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type: %v", v) + } +} + +type RemoveProjectEnvContentHint11 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint11) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody111Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110TypePostgresHost RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type = "postgres-host" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type: %v", v) + } +} + +type RemoveProjectEnvContentHint10 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint10) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody110Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19TypePostgresUser RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type = "postgres-user" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type: %v", v) + } +} + +type RemoveProjectEnvContentHint9 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint9) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody19Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18TypePostgresPrismaURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type = "postgres-prisma-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type: %v", v) + } +} + +type RemoveProjectEnvContentHint8 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint8) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody18Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1TypePostgresURLNonPooling RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type = "postgres-url-non-pooling" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type: %v", v) + } +} + +type RemoveProjectEnvContentHint7 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint7) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBody1Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyTypePostgresURL RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType = "postgres-url" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type RemoveProjectEnvContentHint6 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint6) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType string + +const ( + RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONTypeBlobReadWriteToken RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType = "blob-read-write-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type RemoveProjectEnvContentHint5 struct { + Type RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint5) GetType() RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponse200Type string + +const ( + RemoveProjectEnvContentHintProjectsResponse200TypeRedisRestAPIReadOnlyToken RemoveProjectEnvContentHintProjectsResponse200Type = "redis-rest-api-read-only-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponse200Type) ToPointer() *RemoveProjectEnvContentHintProjectsResponse200Type { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = RemoveProjectEnvContentHintProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponse200Type: %v", v) + } +} + +type RemoveProjectEnvContentHint4 struct { + Type RemoveProjectEnvContentHintProjectsResponse200Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint4) GetType() RemoveProjectEnvContentHintProjectsResponse200Type { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponse200Type("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsResponseType string + +const ( + RemoveProjectEnvContentHintProjectsResponseTypeRedisRestAPIToken RemoveProjectEnvContentHintProjectsResponseType = "redis-rest-api-token" +) + +func (e RemoveProjectEnvContentHintProjectsResponseType) ToPointer() *RemoveProjectEnvContentHintProjectsResponseType { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = RemoveProjectEnvContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsResponseType: %v", v) + } +} + +type RemoveProjectEnvContentHint3 struct { + Type RemoveProjectEnvContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint3) GetType() RemoveProjectEnvContentHintProjectsResponseType { + if o == nil { + return RemoveProjectEnvContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintProjectsType string + +const ( + RemoveProjectEnvContentHintProjectsTypeRedisRestAPIURL RemoveProjectEnvContentHintProjectsType = "redis-rest-api-url" +) + +func (e RemoveProjectEnvContentHintProjectsType) ToPointer() *RemoveProjectEnvContentHintProjectsType { + return &e +} +func (e *RemoveProjectEnvContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = RemoveProjectEnvContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintProjectsType: %v", v) + } +} + +type RemoveProjectEnvContentHint2 struct { + Type RemoveProjectEnvContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint2) GetType() RemoveProjectEnvContentHintProjectsType { + if o == nil { + return RemoveProjectEnvContentHintProjectsType("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvContentHintType string + +const ( + RemoveProjectEnvContentHintTypeRedisURL RemoveProjectEnvContentHintType = "redis-url" +) + +func (e RemoveProjectEnvContentHintType) ToPointer() *RemoveProjectEnvContentHintType { + return &e +} +func (e *RemoveProjectEnvContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = RemoveProjectEnvContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvContentHintType: %v", v) + } +} + +type RemoveProjectEnvContentHint1 struct { + Type RemoveProjectEnvContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *RemoveProjectEnvContentHint1) GetType() RemoveProjectEnvContentHintType { + if o == nil { + return RemoveProjectEnvContentHintType("") + } + return o.Type +} + +func (o *RemoveProjectEnvContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type RemoveProjectEnvResponseBodyContentHintType string + +const ( + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint1 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_1" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint2 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_2" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint3 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_3" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint4 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_4" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint5 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_5" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint6 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_6" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint7 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_7" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint8 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_8" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint9 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_9" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint10 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_10" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint11 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_11" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint12 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_12" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint13 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_13" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint14 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_14" + RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint15 RemoveProjectEnvResponseBodyContentHintType = "removeProjectEnv_contentHint_15" +) + +type RemoveProjectEnvResponseBodyContentHint struct { + RemoveProjectEnvContentHint1 *RemoveProjectEnvContentHint1 + RemoveProjectEnvContentHint2 *RemoveProjectEnvContentHint2 + RemoveProjectEnvContentHint3 *RemoveProjectEnvContentHint3 + RemoveProjectEnvContentHint4 *RemoveProjectEnvContentHint4 + RemoveProjectEnvContentHint5 *RemoveProjectEnvContentHint5 + RemoveProjectEnvContentHint6 *RemoveProjectEnvContentHint6 + RemoveProjectEnvContentHint7 *RemoveProjectEnvContentHint7 + RemoveProjectEnvContentHint8 *RemoveProjectEnvContentHint8 + RemoveProjectEnvContentHint9 *RemoveProjectEnvContentHint9 + RemoveProjectEnvContentHint10 *RemoveProjectEnvContentHint10 + RemoveProjectEnvContentHint11 *RemoveProjectEnvContentHint11 + RemoveProjectEnvContentHint12 *RemoveProjectEnvContentHint12 + RemoveProjectEnvContentHint13 *RemoveProjectEnvContentHint13 + RemoveProjectEnvContentHint14 *RemoveProjectEnvContentHint14 + RemoveProjectEnvContentHint15 *RemoveProjectEnvContentHint15 + + Type RemoveProjectEnvResponseBodyContentHintType +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint1(removeProjectEnvContentHint1 RemoveProjectEnvContentHint1) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint1 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint1: &removeProjectEnvContentHint1, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint2(removeProjectEnvContentHint2 RemoveProjectEnvContentHint2) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint2 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint2: &removeProjectEnvContentHint2, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint3(removeProjectEnvContentHint3 RemoveProjectEnvContentHint3) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint3 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint3: &removeProjectEnvContentHint3, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint4(removeProjectEnvContentHint4 RemoveProjectEnvContentHint4) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint4 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint4: &removeProjectEnvContentHint4, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint5(removeProjectEnvContentHint5 RemoveProjectEnvContentHint5) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint5 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint5: &removeProjectEnvContentHint5, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint6(removeProjectEnvContentHint6 RemoveProjectEnvContentHint6) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint6 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint6: &removeProjectEnvContentHint6, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint7(removeProjectEnvContentHint7 RemoveProjectEnvContentHint7) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint7 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint7: &removeProjectEnvContentHint7, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint8(removeProjectEnvContentHint8 RemoveProjectEnvContentHint8) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint8 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint8: &removeProjectEnvContentHint8, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint9(removeProjectEnvContentHint9 RemoveProjectEnvContentHint9) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint9 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint9: &removeProjectEnvContentHint9, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint10(removeProjectEnvContentHint10 RemoveProjectEnvContentHint10) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint10 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint10: &removeProjectEnvContentHint10, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint11(removeProjectEnvContentHint11 RemoveProjectEnvContentHint11) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint11 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint11: &removeProjectEnvContentHint11, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint12(removeProjectEnvContentHint12 RemoveProjectEnvContentHint12) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint12 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint12: &removeProjectEnvContentHint12, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint13(removeProjectEnvContentHint13 RemoveProjectEnvContentHint13) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint13 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint13: &removeProjectEnvContentHint13, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint14(removeProjectEnvContentHint14 RemoveProjectEnvContentHint14) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint14 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint14: &removeProjectEnvContentHint14, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyContentHintRemoveProjectEnvContentHint15(removeProjectEnvContentHint15 RemoveProjectEnvContentHint15) RemoveProjectEnvResponseBodyContentHint { + typ := RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint15 + + return RemoveProjectEnvResponseBodyContentHint{ + RemoveProjectEnvContentHint15: &removeProjectEnvContentHint15, + Type: typ, + } +} + +func (u *RemoveProjectEnvResponseBodyContentHint) UnmarshalJSON(data []byte) error { + + var removeProjectEnvContentHint7 RemoveProjectEnvContentHint7 = RemoveProjectEnvContentHint7{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint7, "", true, true); err == nil { + u.RemoveProjectEnvContentHint7 = &removeProjectEnvContentHint7 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint7 + return nil + } + + var removeProjectEnvContentHint9 RemoveProjectEnvContentHint9 = RemoveProjectEnvContentHint9{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint9, "", true, true); err == nil { + u.RemoveProjectEnvContentHint9 = &removeProjectEnvContentHint9 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint9 + return nil + } + + var removeProjectEnvContentHint3 RemoveProjectEnvContentHint3 = RemoveProjectEnvContentHint3{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint3, "", true, true); err == nil { + u.RemoveProjectEnvContentHint3 = &removeProjectEnvContentHint3 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint3 + return nil + } + + var removeProjectEnvContentHint4 RemoveProjectEnvContentHint4 = RemoveProjectEnvContentHint4{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint4, "", true, true); err == nil { + u.RemoveProjectEnvContentHint4 = &removeProjectEnvContentHint4 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint4 + return nil + } + + var removeProjectEnvContentHint5 RemoveProjectEnvContentHint5 = RemoveProjectEnvContentHint5{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint5, "", true, true); err == nil { + u.RemoveProjectEnvContentHint5 = &removeProjectEnvContentHint5 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint5 + return nil + } + + var removeProjectEnvContentHint6 RemoveProjectEnvContentHint6 = RemoveProjectEnvContentHint6{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint6, "", true, true); err == nil { + u.RemoveProjectEnvContentHint6 = &removeProjectEnvContentHint6 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint6 + return nil + } + + var removeProjectEnvContentHint2 RemoveProjectEnvContentHint2 = RemoveProjectEnvContentHint2{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint2, "", true, true); err == nil { + u.RemoveProjectEnvContentHint2 = &removeProjectEnvContentHint2 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint2 + return nil + } + + var removeProjectEnvContentHint8 RemoveProjectEnvContentHint8 = RemoveProjectEnvContentHint8{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint8, "", true, true); err == nil { + u.RemoveProjectEnvContentHint8 = &removeProjectEnvContentHint8 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint8 + return nil + } + + var removeProjectEnvContentHint1 RemoveProjectEnvContentHint1 = RemoveProjectEnvContentHint1{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint1, "", true, true); err == nil { + u.RemoveProjectEnvContentHint1 = &removeProjectEnvContentHint1 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint1 + return nil + } + + var removeProjectEnvContentHint10 RemoveProjectEnvContentHint10 = RemoveProjectEnvContentHint10{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint10, "", true, true); err == nil { + u.RemoveProjectEnvContentHint10 = &removeProjectEnvContentHint10 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint10 + return nil + } + + var removeProjectEnvContentHint11 RemoveProjectEnvContentHint11 = RemoveProjectEnvContentHint11{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint11, "", true, true); err == nil { + u.RemoveProjectEnvContentHint11 = &removeProjectEnvContentHint11 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint11 + return nil + } + + var removeProjectEnvContentHint12 RemoveProjectEnvContentHint12 = RemoveProjectEnvContentHint12{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint12, "", true, true); err == nil { + u.RemoveProjectEnvContentHint12 = &removeProjectEnvContentHint12 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint12 + return nil + } + + var removeProjectEnvContentHint13 RemoveProjectEnvContentHint13 = RemoveProjectEnvContentHint13{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint13, "", true, true); err == nil { + u.RemoveProjectEnvContentHint13 = &removeProjectEnvContentHint13 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint13 + return nil + } + + var removeProjectEnvContentHint15 RemoveProjectEnvContentHint15 = RemoveProjectEnvContentHint15{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint15, "", true, true); err == nil { + u.RemoveProjectEnvContentHint15 = &removeProjectEnvContentHint15 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint15 + return nil + } + + var removeProjectEnvContentHint14 RemoveProjectEnvContentHint14 = RemoveProjectEnvContentHint14{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvContentHint14, "", true, true); err == nil { + u.RemoveProjectEnvContentHint14 = &removeProjectEnvContentHint14 + u.Type = RemoveProjectEnvResponseBodyContentHintTypeRemoveProjectEnvContentHint14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RemoveProjectEnvResponseBodyContentHint", string(data)) +} + +func (u RemoveProjectEnvResponseBodyContentHint) MarshalJSON() ([]byte, error) { + if u.RemoveProjectEnvContentHint1 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint1, "", true) + } + + if u.RemoveProjectEnvContentHint2 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint2, "", true) + } + + if u.RemoveProjectEnvContentHint3 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint3, "", true) + } + + if u.RemoveProjectEnvContentHint4 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint4, "", true) + } + + if u.RemoveProjectEnvContentHint5 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint5, "", true) + } + + if u.RemoveProjectEnvContentHint6 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint6, "", true) + } + + if u.RemoveProjectEnvContentHint7 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint7, "", true) + } + + if u.RemoveProjectEnvContentHint8 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint8, "", true) + } + + if u.RemoveProjectEnvContentHint9 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint9, "", true) + } + + if u.RemoveProjectEnvContentHint10 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint10, "", true) + } + + if u.RemoveProjectEnvContentHint11 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint11, "", true) + } + + if u.RemoveProjectEnvContentHint12 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint12, "", true) + } + + if u.RemoveProjectEnvContentHint13 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint13, "", true) + } + + if u.RemoveProjectEnvContentHint14 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint14, "", true) + } + + if u.RemoveProjectEnvContentHint15 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvContentHint15, "", true) + } + + return nil, errors.New("could not marshal union type RemoveProjectEnvResponseBodyContentHint: all fields are null") +} + +type RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType string + +const ( + RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONTypeFlagsSecret RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType = "flags-secret" +) + +func (e RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType) ToPointer() *RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType { + return &e +} +func (e *RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType: %v", v) + } +} + +// RemoveProjectEnvResponseBodyInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type RemoveProjectEnvResponseBodyInternalContentHint struct { + Type RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *RemoveProjectEnvResponseBodyInternalContentHint) GetType() RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType { + if o == nil { + return RemoveProjectEnvResponseBodyProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *RemoveProjectEnvResponseBodyInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type RemoveProjectEnvResponseBody1 struct { + Target *RemoveProjectEnvResponseBodyTarget `json:"target,omitempty"` + Type RemoveProjectEnvResponseBodyType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *RemoveProjectEnvResponseBodyContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *RemoveProjectEnvResponseBodyInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *RemoveProjectEnvResponseBody1) GetTarget() *RemoveProjectEnvResponseBodyTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *RemoveProjectEnvResponseBody1) GetType() RemoveProjectEnvResponseBodyType { + if o == nil { + return RemoveProjectEnvResponseBodyType("") + } + return o.Type +} + +func (o *RemoveProjectEnvResponseBody1) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *RemoveProjectEnvResponseBody1) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *RemoveProjectEnvResponseBody1) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *RemoveProjectEnvResponseBody1) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *RemoveProjectEnvResponseBody1) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *RemoveProjectEnvResponseBody1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *RemoveProjectEnvResponseBody1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *RemoveProjectEnvResponseBody1) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *RemoveProjectEnvResponseBody1) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *RemoveProjectEnvResponseBody1) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *RemoveProjectEnvResponseBody1) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *RemoveProjectEnvResponseBody1) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *RemoveProjectEnvResponseBody1) GetContentHint() *RemoveProjectEnvResponseBodyContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *RemoveProjectEnvResponseBody1) GetInternalContentHint() *RemoveProjectEnvResponseBodyInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *RemoveProjectEnvResponseBody1) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *RemoveProjectEnvResponseBody1) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *RemoveProjectEnvResponseBody1) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *RemoveProjectEnvResponseBody1) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type RemoveProjectEnvResponseBodyUnionType string + +const ( + RemoveProjectEnvResponseBodyUnionTypeArrayOfRemoveProjectEnvResponseBody1 RemoveProjectEnvResponseBodyUnionType = "arrayOfRemoveProjectEnvResponseBody1" + RemoveProjectEnvResponseBodyUnionTypeRemoveProjectEnvResponseBody2 RemoveProjectEnvResponseBodyUnionType = "removeProjectEnv_responseBody_2" + RemoveProjectEnvResponseBodyUnionTypeRemoveProjectEnvResponseBody3 RemoveProjectEnvResponseBodyUnionType = "removeProjectEnv_responseBody_3" +) + +// RemoveProjectEnvResponseBody - The environment variable was successfully removed +type RemoveProjectEnvResponseBody struct { + ArrayOfRemoveProjectEnvResponseBody1 []RemoveProjectEnvResponseBody1 + RemoveProjectEnvResponseBody2 *RemoveProjectEnvResponseBody2 + RemoveProjectEnvResponseBody3 *RemoveProjectEnvResponseBody3 + + Type RemoveProjectEnvResponseBodyUnionType +} + +func CreateRemoveProjectEnvResponseBodyArrayOfRemoveProjectEnvResponseBody1(arrayOfRemoveProjectEnvResponseBody1 []RemoveProjectEnvResponseBody1) RemoveProjectEnvResponseBody { + typ := RemoveProjectEnvResponseBodyUnionTypeArrayOfRemoveProjectEnvResponseBody1 + + return RemoveProjectEnvResponseBody{ + ArrayOfRemoveProjectEnvResponseBody1: arrayOfRemoveProjectEnvResponseBody1, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyRemoveProjectEnvResponseBody2(removeProjectEnvResponseBody2 RemoveProjectEnvResponseBody2) RemoveProjectEnvResponseBody { + typ := RemoveProjectEnvResponseBodyUnionTypeRemoveProjectEnvResponseBody2 + + return RemoveProjectEnvResponseBody{ + RemoveProjectEnvResponseBody2: &removeProjectEnvResponseBody2, + Type: typ, + } +} + +func CreateRemoveProjectEnvResponseBodyRemoveProjectEnvResponseBody3(removeProjectEnvResponseBody3 RemoveProjectEnvResponseBody3) RemoveProjectEnvResponseBody { + typ := RemoveProjectEnvResponseBodyUnionTypeRemoveProjectEnvResponseBody3 + + return RemoveProjectEnvResponseBody{ + RemoveProjectEnvResponseBody3: &removeProjectEnvResponseBody3, + Type: typ, + } +} + +func (u *RemoveProjectEnvResponseBody) UnmarshalJSON(data []byte) error { + + var removeProjectEnvResponseBody3 RemoveProjectEnvResponseBody3 = RemoveProjectEnvResponseBody3{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvResponseBody3, "", true, true); err == nil { + u.RemoveProjectEnvResponseBody3 = &removeProjectEnvResponseBody3 + u.Type = RemoveProjectEnvResponseBodyUnionTypeRemoveProjectEnvResponseBody3 + return nil + } + + var removeProjectEnvResponseBody2 RemoveProjectEnvResponseBody2 = RemoveProjectEnvResponseBody2{} + if err := utils.UnmarshalJSON(data, &removeProjectEnvResponseBody2, "", true, true); err == nil { + u.RemoveProjectEnvResponseBody2 = &removeProjectEnvResponseBody2 + u.Type = RemoveProjectEnvResponseBodyUnionTypeRemoveProjectEnvResponseBody2 + return nil + } + + var arrayOfRemoveProjectEnvResponseBody1 []RemoveProjectEnvResponseBody1 = []RemoveProjectEnvResponseBody1{} + if err := utils.UnmarshalJSON(data, &arrayOfRemoveProjectEnvResponseBody1, "", true, true); err == nil { + u.ArrayOfRemoveProjectEnvResponseBody1 = arrayOfRemoveProjectEnvResponseBody1 + u.Type = RemoveProjectEnvResponseBodyUnionTypeArrayOfRemoveProjectEnvResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RemoveProjectEnvResponseBody", string(data)) +} + +func (u RemoveProjectEnvResponseBody) MarshalJSON() ([]byte, error) { + if u.ArrayOfRemoveProjectEnvResponseBody1 != nil { + return utils.MarshalJSON(u.ArrayOfRemoveProjectEnvResponseBody1, "", true) + } + + if u.RemoveProjectEnvResponseBody2 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvResponseBody2, "", true) + } + + if u.RemoveProjectEnvResponseBody3 != nil { + return utils.MarshalJSON(u.RemoveProjectEnvResponseBody3, "", true) + } + + return nil, errors.New("could not marshal union type RemoveProjectEnvResponseBody: all fields are null") +} + +type RemoveProjectEnvResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The environment variable was successfully removed + OneOf *RemoveProjectEnvResponseBody +} + +func (o *RemoveProjectEnvResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RemoveProjectEnvResponse) GetOneOf() *RemoveProjectEnvResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectmember.go b/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectmember.go new file mode 100644 index 00000000..e8d4b5ca --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/removeprojectmember.go @@ -0,0 +1,76 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RemoveProjectMemberRequest struct { + // The ID or name of the Project. + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The user ID of the member. + UID string `pathParam:"style=simple,explode=false,name=uid"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *RemoveProjectMemberRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *RemoveProjectMemberRequest) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *RemoveProjectMemberRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RemoveProjectMemberRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type RemoveProjectMemberResponseBody struct { + ID string `json:"id"` +} + +func (o *RemoveProjectMemberResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type RemoveProjectMemberResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *RemoveProjectMemberResponseBody +} + +func (o *RemoveProjectMemberResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RemoveProjectMemberResponse) GetObject() *RemoveProjectMemberResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/removerecord.go b/src/__tests__/mockserver/internal/sdk/models/operations/removerecord.go new file mode 100644 index 00000000..e38ec0a0 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/removerecord.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RemoveRecordRequest struct { + Domain string `pathParam:"style=simple,explode=false,name=domain"` + RecordID string `pathParam:"style=simple,explode=false,name=recordId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *RemoveRecordRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *RemoveRecordRequest) GetRecordID() string { + if o == nil { + return "" + } + return o.RecordID +} + +func (o *RemoveRecordRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RemoveRecordRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// RemoveRecordResponseBody - Successful response by removing the specified DNS record. +type RemoveRecordResponseBody struct { +} + +type RemoveRecordResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response by removing the specified DNS record. + Object *RemoveRecordResponseBody +} + +func (o *RemoveRecordResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RemoveRecordResponse) GetObject() *RemoveRecordResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/removeteammember.go b/src/__tests__/mockserver/internal/sdk/models/operations/removeteammember.go new file mode 100644 index 00000000..7d5d4531 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/removeteammember.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RemoveTeamMemberRequest struct { + // The user ID of the member. + UID string `pathParam:"style=simple,explode=false,name=uid"` + // The ID of the team to set as the new default team for the Northstar user. + NewDefaultTeamID *string `queryParam:"style=form,explode=true,name=newDefaultTeamId"` + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` +} + +func (o *RemoveTeamMemberRequest) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *RemoveTeamMemberRequest) GetNewDefaultTeamID() *string { + if o == nil { + return nil + } + return o.NewDefaultTeamID +} + +func (o *RemoveTeamMemberRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +// RemoveTeamMemberResponseBody - Successfully removed a member of the team. +type RemoveTeamMemberResponseBody struct { + // ID of the team. + ID string `json:"id"` +} + +func (o *RemoveTeamMemberResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type RemoveTeamMemberResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successfully removed a member of the team. + Object *RemoveTeamMemberResponseBody +} + +func (o *RemoveTeamMemberResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RemoveTeamMemberResponse) GetObject() *RemoveTeamMemberResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/requestaccesstoteam.go b/src/__tests__/mockserver/internal/sdk/models/operations/requestaccesstoteam.go new file mode 100644 index 00000000..e91f53f9 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/requestaccesstoteam.go @@ -0,0 +1,532 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// Origin - The origin of the request. +type Origin string + +const ( + OriginImport Origin = "import" + OriginTeams Origin = "teams" + OriginGithub Origin = "github" + OriginGitlab Origin = "gitlab" + OriginBitbucket Origin = "bitbucket" + OriginFeedback Origin = "feedback" + OriginOrganizationTeams Origin = "organization-teams" +) + +func (e Origin) ToPointer() *Origin { + return &e +} +func (e *Origin) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "import": + fallthrough + case "teams": + fallthrough + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + fallthrough + case "feedback": + fallthrough + case "organization-teams": + *e = Origin(v) + return nil + default: + return fmt.Errorf("invalid value for Origin: %v", v) + } +} + +type GitUserIDType string + +const ( + GitUserIDTypeStr GitUserIDType = "str" + GitUserIDTypeNumber GitUserIDType = "number" +) + +// GitUserID - The ID of the Git account of the user who requests access. +type GitUserID struct { + Str *string + Number *float64 + + Type GitUserIDType +} + +func CreateGitUserIDStr(str string) GitUserID { + typ := GitUserIDTypeStr + + return GitUserID{ + Str: &str, + Type: typ, + } +} + +func CreateGitUserIDNumber(number float64) GitUserID { + typ := GitUserIDTypeNumber + + return GitUserID{ + Number: &number, + Type: typ, + } +} + +func (u *GitUserID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = GitUserIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = GitUserIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GitUserID", string(data)) +} + +func (u GitUserID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type GitUserID: all fields are null") +} + +type JoinedFrom struct { + // The origin of the request. + Origin Origin `json:"origin"` + // The commit sha if the origin is a git provider. + CommitID *string `json:"commitId,omitempty"` + // The ID of the repository for the given Git provider. + RepoID *string `json:"repoId,omitempty"` + // The path to the repository for the given Git provider. + RepoPath *string `json:"repoPath,omitempty"` + // The ID of the Git account of the user who requests access. + GitUserID *GitUserID `json:"gitUserId,omitempty"` + // The login name for the Git account of the user who requests access. + GitUserLogin *string `json:"gitUserLogin,omitempty"` +} + +func (o *JoinedFrom) GetOrigin() Origin { + if o == nil { + return Origin("") + } + return o.Origin +} + +func (o *JoinedFrom) GetCommitID() *string { + if o == nil { + return nil + } + return o.CommitID +} + +func (o *JoinedFrom) GetRepoID() *string { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *JoinedFrom) GetRepoPath() *string { + if o == nil { + return nil + } + return o.RepoPath +} + +func (o *JoinedFrom) GetGitUserID() *GitUserID { + if o == nil { + return nil + } + return o.GitUserID +} + +func (o *JoinedFrom) GetGitUserLogin() *string { + if o == nil { + return nil + } + return o.GitUserLogin +} + +type RequestAccessToTeamRequestBody struct { + JoinedFrom JoinedFrom `json:"joinedFrom"` +} + +func (o *RequestAccessToTeamRequestBody) GetJoinedFrom() JoinedFrom { + if o == nil { + return JoinedFrom{} + } + return o.JoinedFrom +} + +type RequestAccessToTeamRequest struct { + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` + RequestBody RequestAccessToTeamRequestBody `request:"mediaType=application/json"` +} + +func (o *RequestAccessToTeamRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *RequestAccessToTeamRequest) GetRequestBody() RequestAccessToTeamRequestBody { + if o == nil { + return RequestAccessToTeamRequestBody{} + } + return o.RequestBody +} + +type RequestAccessToTeamOrigin string + +const ( + RequestAccessToTeamOriginImport RequestAccessToTeamOrigin = "import" + RequestAccessToTeamOriginTeams RequestAccessToTeamOrigin = "teams" + RequestAccessToTeamOriginGithub RequestAccessToTeamOrigin = "github" + RequestAccessToTeamOriginGitlab RequestAccessToTeamOrigin = "gitlab" + RequestAccessToTeamOriginBitbucket RequestAccessToTeamOrigin = "bitbucket" + RequestAccessToTeamOriginFeedback RequestAccessToTeamOrigin = "feedback" + RequestAccessToTeamOriginOrganizationTeams RequestAccessToTeamOrigin = "organization-teams" + RequestAccessToTeamOriginMail RequestAccessToTeamOrigin = "mail" + RequestAccessToTeamOriginLink RequestAccessToTeamOrigin = "link" + RequestAccessToTeamOriginSaml RequestAccessToTeamOrigin = "saml" + RequestAccessToTeamOriginDsync RequestAccessToTeamOrigin = "dsync" +) + +func (e RequestAccessToTeamOrigin) ToPointer() *RequestAccessToTeamOrigin { + return &e +} +func (e *RequestAccessToTeamOrigin) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "import": + fallthrough + case "teams": + fallthrough + case "github": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + fallthrough + case "feedback": + fallthrough + case "organization-teams": + fallthrough + case "mail": + fallthrough + case "link": + fallthrough + case "saml": + fallthrough + case "dsync": + *e = RequestAccessToTeamOrigin(v) + return nil + default: + return fmt.Errorf("invalid value for RequestAccessToTeamOrigin: %v", v) + } +} + +type RequestAccessToTeamGitUserIDType string + +const ( + RequestAccessToTeamGitUserIDTypeStr RequestAccessToTeamGitUserIDType = "str" + RequestAccessToTeamGitUserIDTypeNumber RequestAccessToTeamGitUserIDType = "number" +) + +type RequestAccessToTeamGitUserID struct { + Str *string + Number *float64 + + Type RequestAccessToTeamGitUserIDType +} + +func CreateRequestAccessToTeamGitUserIDStr(str string) RequestAccessToTeamGitUserID { + typ := RequestAccessToTeamGitUserIDTypeStr + + return RequestAccessToTeamGitUserID{ + Str: &str, + Type: typ, + } +} + +func CreateRequestAccessToTeamGitUserIDNumber(number float64) RequestAccessToTeamGitUserID { + typ := RequestAccessToTeamGitUserIDTypeNumber + + return RequestAccessToTeamGitUserID{ + Number: &number, + Type: typ, + } +} + +func (u *RequestAccessToTeamGitUserID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = RequestAccessToTeamGitUserIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = RequestAccessToTeamGitUserIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RequestAccessToTeamGitUserID", string(data)) +} + +func (u RequestAccessToTeamGitUserID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type RequestAccessToTeamGitUserID: all fields are null") +} + +type RequestAccessToTeamJoinedFrom struct { + Origin RequestAccessToTeamOrigin `json:"origin"` + CommitID *string `json:"commitId,omitempty"` + RepoID *string `json:"repoId,omitempty"` + RepoPath *string `json:"repoPath,omitempty"` + GitUserID *RequestAccessToTeamGitUserID `json:"gitUserId,omitempty"` + GitUserLogin *string `json:"gitUserLogin,omitempty"` + SsoUserID *string `json:"ssoUserId,omitempty"` + SsoConnectedAt *float64 `json:"ssoConnectedAt,omitempty"` + IdpUserID *string `json:"idpUserId,omitempty"` + DsyncUserID *string `json:"dsyncUserId,omitempty"` + DsyncConnectedAt *float64 `json:"dsyncConnectedAt,omitempty"` +} + +func (o *RequestAccessToTeamJoinedFrom) GetOrigin() RequestAccessToTeamOrigin { + if o == nil { + return RequestAccessToTeamOrigin("") + } + return o.Origin +} + +func (o *RequestAccessToTeamJoinedFrom) GetCommitID() *string { + if o == nil { + return nil + } + return o.CommitID +} + +func (o *RequestAccessToTeamJoinedFrom) GetRepoID() *string { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *RequestAccessToTeamJoinedFrom) GetRepoPath() *string { + if o == nil { + return nil + } + return o.RepoPath +} + +func (o *RequestAccessToTeamJoinedFrom) GetGitUserID() *RequestAccessToTeamGitUserID { + if o == nil { + return nil + } + return o.GitUserID +} + +func (o *RequestAccessToTeamJoinedFrom) GetGitUserLogin() *string { + if o == nil { + return nil + } + return o.GitUserLogin +} + +func (o *RequestAccessToTeamJoinedFrom) GetSsoUserID() *string { + if o == nil { + return nil + } + return o.SsoUserID +} + +func (o *RequestAccessToTeamJoinedFrom) GetSsoConnectedAt() *float64 { + if o == nil { + return nil + } + return o.SsoConnectedAt +} + +func (o *RequestAccessToTeamJoinedFrom) GetIdpUserID() *string { + if o == nil { + return nil + } + return o.IdpUserID +} + +func (o *RequestAccessToTeamJoinedFrom) GetDsyncUserID() *string { + if o == nil { + return nil + } + return o.DsyncUserID +} + +func (o *RequestAccessToTeamJoinedFrom) GetDsyncConnectedAt() *float64 { + if o == nil { + return nil + } + return o.DsyncConnectedAt +} + +type Github struct { + Login *string `json:"login,omitempty"` +} + +func (o *Github) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +type Gitlab struct { + Login *string `json:"login,omitempty"` +} + +func (o *Gitlab) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +type Bitbucket struct { + Login *string `json:"login,omitempty"` +} + +func (o *Bitbucket) GetLogin() *string { + if o == nil { + return nil + } + return o.Login +} + +// RequestAccessToTeamResponseBody - Successfuly requested access to the team. +type RequestAccessToTeamResponseBody struct { + TeamSlug string `json:"teamSlug"` + TeamName string `json:"teamName"` + Confirmed *bool `json:"confirmed,omitempty"` + JoinedFrom *RequestAccessToTeamJoinedFrom `json:"joinedFrom,omitempty"` + AccessRequestedAt *float64 `json:"accessRequestedAt,omitempty"` + Github *Github `json:"github"` + Gitlab *Gitlab `json:"gitlab"` + Bitbucket *Bitbucket `json:"bitbucket"` +} + +func (o *RequestAccessToTeamResponseBody) GetTeamSlug() string { + if o == nil { + return "" + } + return o.TeamSlug +} + +func (o *RequestAccessToTeamResponseBody) GetTeamName() string { + if o == nil { + return "" + } + return o.TeamName +} + +func (o *RequestAccessToTeamResponseBody) GetConfirmed() *bool { + if o == nil { + return nil + } + return o.Confirmed +} + +func (o *RequestAccessToTeamResponseBody) GetJoinedFrom() *RequestAccessToTeamJoinedFrom { + if o == nil { + return nil + } + return o.JoinedFrom +} + +func (o *RequestAccessToTeamResponseBody) GetAccessRequestedAt() *float64 { + if o == nil { + return nil + } + return o.AccessRequestedAt +} + +func (o *RequestAccessToTeamResponseBody) GetGithub() *Github { + if o == nil { + return nil + } + return o.Github +} + +func (o *RequestAccessToTeamResponseBody) GetGitlab() *Gitlab { + if o == nil { + return nil + } + return o.Gitlab +} + +func (o *RequestAccessToTeamResponseBody) GetBitbucket() *Bitbucket { + if o == nil { + return nil + } + return o.Bitbucket +} + +type RequestAccessToTeamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successfuly requested access to the team. + Object *RequestAccessToTeamResponseBody +} + +func (o *RequestAccessToTeamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RequestAccessToTeamResponse) GetObject() *RequestAccessToTeamResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/requestdelete.go b/src/__tests__/mockserver/internal/sdk/models/operations/requestdelete.go new file mode 100644 index 00000000..d6bb397b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/requestdelete.go @@ -0,0 +1,92 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +// RequestDeleteReasons - An object describing the reason why the User account is being deleted. +type RequestDeleteReasons struct { + // Idenitifier slug of the reason why the User account is being deleted. + Slug string `json:"slug"` + // Description of the reason why the User account is being deleted. + Description string `json:"description"` +} + +func (o *RequestDeleteReasons) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *RequestDeleteReasons) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +type RequestDeleteRequestBody struct { + // Optional array of objects that describe the reason why the User account is being deleted. + Reasons []RequestDeleteReasons `json:"reasons,omitempty"` +} + +func (o *RequestDeleteRequestBody) GetReasons() []RequestDeleteReasons { + if o == nil { + return nil + } + return o.Reasons +} + +// RequestDeleteResponseBody - Response indicating that the User deletion process has been initiated, and a confirmation email has been sent. +type RequestDeleteResponseBody struct { + // Unique identifier of the User who has initiated deletion. + ID string `json:"id"` + // Email address of the User who has initiated deletion. + Email string `json:"email"` + // User deletion progress status. + Message string `json:"message"` +} + +func (o *RequestDeleteResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *RequestDeleteResponseBody) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *RequestDeleteResponseBody) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type RequestDeleteResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Response indicating that the User deletion process has been initiated, and a confirmation email has been sent. + Object *RequestDeleteResponseBody +} + +func (o *RequestDeleteResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RequestDeleteResponse) GetObject() *RequestDeleteResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/requestpromote.go b/src/__tests__/mockserver/internal/sdk/models/operations/requestpromote.go new file mode 100644 index 00000000..d8d037b7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/requestpromote.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RequestPromoteRequest struct { + ProjectID string `pathParam:"style=simple,explode=false,name=projectId"` + DeploymentID string `pathParam:"style=simple,explode=false,name=deploymentId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *RequestPromoteRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *RequestPromoteRequest) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *RequestPromoteRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RequestPromoteRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type RequestPromoteResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *RequestPromoteResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/rerequestcheck.go b/src/__tests__/mockserver/internal/sdk/models/operations/rerequestcheck.go new file mode 100644 index 00000000..4576b5ad --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/rerequestcheck.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RerequestCheckRequest struct { + // The deployment to rerun the check for. + DeploymentID string `pathParam:"style=simple,explode=false,name=deploymentId"` + // The check to rerun + CheckID string `pathParam:"style=simple,explode=false,name=checkId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *RerequestCheckRequest) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *RerequestCheckRequest) GetCheckID() string { + if o == nil { + return "" + } + return o.CheckID +} + +func (o *RerequestCheckRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *RerequestCheckRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type RerequestCheckResponseBody struct { +} + +type RerequestCheckResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *RerequestCheckResponseBody +} + +func (o *RerequestCheckResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RerequestCheckResponse) GetObject() *RerequestCheckResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/searchrepo.go b/src/__tests__/mockserver/internal/sdk/models/operations/searchrepo.go new file mode 100644 index 00000000..45eaf46b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/searchrepo.go @@ -0,0 +1,680 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type NamespaceIDType string + +const ( + NamespaceIDTypeStr NamespaceIDType = "str" + NamespaceIDTypeNumber NamespaceIDType = "number" +) + +type NamespaceID struct { + Str *string + Number *float64 + + Type NamespaceIDType +} + +func CreateNamespaceIDStr(str string) NamespaceID { + typ := NamespaceIDTypeStr + + return NamespaceID{ + Str: &str, + Type: typ, + } +} + +func CreateNamespaceIDNumber(number float64) NamespaceID { + typ := NamespaceIDTypeNumber + + return NamespaceID{ + Number: &number, + Type: typ, + } +} + +func (u *NamespaceID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = NamespaceIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = NamespaceIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for NamespaceID", string(data)) +} + +func (u NamespaceID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type NamespaceID: all fields are null") +} + +type QueryParamProvider string + +const ( + QueryParamProviderGithub QueryParamProvider = "github" + QueryParamProviderGithubCustomHost QueryParamProvider = "github-custom-host" + QueryParamProviderGitlab QueryParamProvider = "gitlab" + QueryParamProviderBitbucket QueryParamProvider = "bitbucket" +) + +func (e QueryParamProvider) ToPointer() *QueryParamProvider { + return &e +} +func (e *QueryParamProvider) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + fallthrough + case "github-custom-host": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + *e = QueryParamProvider(v) + return nil + default: + return fmt.Errorf("invalid value for QueryParamProvider: %v", v) + } +} + +type SearchRepoRequest struct { + Query *string `queryParam:"style=form,explode=true,name=query"` + NamespaceID *NamespaceID `queryParam:"style=form,explode=true,name=namespaceId"` + Provider *QueryParamProvider `queryParam:"style=form,explode=true,name=provider"` + InstallationID *string `queryParam:"style=form,explode=true,name=installationId"` + // The custom Git host if using a custom Git provider, like GitHub Enterprise Server + Host *string `queryParam:"style=form,explode=true,name=host"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *SearchRepoRequest) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +func (o *SearchRepoRequest) GetNamespaceID() *NamespaceID { + if o == nil { + return nil + } + return o.NamespaceID +} + +func (o *SearchRepoRequest) GetProvider() *QueryParamProvider { + if o == nil { + return nil + } + return o.Provider +} + +func (o *SearchRepoRequest) GetInstallationID() *string { + if o == nil { + return nil + } + return o.InstallationID +} + +func (o *SearchRepoRequest) GetHost() *string { + if o == nil { + return nil + } + return o.Host +} + +func (o *SearchRepoRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *SearchRepoRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type ResponseBodyProvider string + +const ( + ResponseBodyProviderGithub ResponseBodyProvider = "github" + ResponseBodyProviderGithubCustomHost ResponseBodyProvider = "github-custom-host" + ResponseBodyProviderGitlab ResponseBodyProvider = "gitlab" + ResponseBodyProviderBitbucket ResponseBodyProvider = "bitbucket" +) + +func (e ResponseBodyProvider) ToPointer() *ResponseBodyProvider { + return &e +} +func (e *ResponseBodyProvider) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + fallthrough + case "github-custom-host": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + *e = ResponseBodyProvider(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyProvider: %v", v) + } +} + +type ResponseBodyNamespaceIDType string + +const ( + ResponseBodyNamespaceIDTypeStr ResponseBodyNamespaceIDType = "str" + ResponseBodyNamespaceIDTypeNumber ResponseBodyNamespaceIDType = "number" +) + +type ResponseBodyNamespaceID struct { + Str *string + Number *float64 + + Type ResponseBodyNamespaceIDType +} + +func CreateResponseBodyNamespaceIDStr(str string) ResponseBodyNamespaceID { + typ := ResponseBodyNamespaceIDTypeStr + + return ResponseBodyNamespaceID{ + Str: &str, + Type: typ, + } +} + +func CreateResponseBodyNamespaceIDNumber(number float64) ResponseBodyNamespaceID { + typ := ResponseBodyNamespaceIDTypeNumber + + return ResponseBodyNamespaceID{ + Number: &number, + Type: typ, + } +} + +func (u *ResponseBodyNamespaceID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = ResponseBodyNamespaceIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = ResponseBodyNamespaceIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyNamespaceID", string(data)) +} + +func (u ResponseBodyNamespaceID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyNamespaceID: all fields are null") +} + +type GitAccount struct { + Provider ResponseBodyProvider `json:"provider"` + NamespaceID *ResponseBodyNamespaceID `json:"namespaceId"` +} + +func (o *GitAccount) GetProvider() ResponseBodyProvider { + if o == nil { + return ResponseBodyProvider("") + } + return o.Provider +} + +func (o *GitAccount) GetNamespaceID() *ResponseBodyNamespaceID { + if o == nil { + return nil + } + return o.NamespaceID +} + +type ResponseBodyIDType string + +const ( + ResponseBodyIDTypeStr ResponseBodyIDType = "str" + ResponseBodyIDTypeNumber ResponseBodyIDType = "number" +) + +type ResponseBodyID struct { + Str *string + Number *float64 + + Type ResponseBodyIDType +} + +func CreateResponseBodyIDStr(str string) ResponseBodyID { + typ := ResponseBodyIDTypeStr + + return ResponseBodyID{ + Str: &str, + Type: typ, + } +} + +func CreateResponseBodyIDNumber(number float64) ResponseBodyID { + typ := ResponseBodyIDTypeNumber + + return ResponseBodyID{ + Number: &number, + Type: typ, + } +} + +func (u *ResponseBodyID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = ResponseBodyIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = ResponseBodyIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResponseBodyID", string(data)) +} + +func (u ResponseBodyID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type ResponseBodyID: all fields are null") +} + +type SearchRepoResponseBodyProvider string + +const ( + SearchRepoResponseBodyProviderGithub SearchRepoResponseBodyProvider = "github" + SearchRepoResponseBodyProviderGithubCustomHost SearchRepoResponseBodyProvider = "github-custom-host" + SearchRepoResponseBodyProviderGitlab SearchRepoResponseBodyProvider = "gitlab" + SearchRepoResponseBodyProviderBitbucket SearchRepoResponseBodyProvider = "bitbucket" +) + +func (e SearchRepoResponseBodyProvider) ToPointer() *SearchRepoResponseBodyProvider { + return &e +} +func (e *SearchRepoResponseBodyProvider) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + fallthrough + case "github-custom-host": + fallthrough + case "gitlab": + fallthrough + case "bitbucket": + *e = SearchRepoResponseBodyProvider(v) + return nil + default: + return fmt.Errorf("invalid value for SearchRepoResponseBodyProvider: %v", v) + } +} + +type SearchRepoResponseBodyIDType string + +const ( + SearchRepoResponseBodyIDTypeStr SearchRepoResponseBodyIDType = "str" + SearchRepoResponseBodyIDTypeNumber SearchRepoResponseBodyIDType = "number" +) + +type SearchRepoResponseBodyID struct { + Str *string + Number *float64 + + Type SearchRepoResponseBodyIDType +} + +func CreateSearchRepoResponseBodyIDStr(str string) SearchRepoResponseBodyID { + typ := SearchRepoResponseBodyIDTypeStr + + return SearchRepoResponseBodyID{ + Str: &str, + Type: typ, + } +} + +func CreateSearchRepoResponseBodyIDNumber(number float64) SearchRepoResponseBodyID { + typ := SearchRepoResponseBodyIDTypeNumber + + return SearchRepoResponseBodyID{ + Number: &number, + Type: typ, + } +} + +func (u *SearchRepoResponseBodyID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = SearchRepoResponseBodyIDTypeStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = SearchRepoResponseBodyIDTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for SearchRepoResponseBodyID", string(data)) +} + +func (u SearchRepoResponseBodyID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type SearchRepoResponseBodyID: all fields are null") +} + +type Owner struct { + ID SearchRepoResponseBodyID `json:"id"` + Name string `json:"name"` +} + +func (o *Owner) GetID() SearchRepoResponseBodyID { + if o == nil { + return SearchRepoResponseBodyID{} + } + return o.ID +} + +func (o *Owner) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +type ResponseBodyOwnerType string + +const ( + ResponseBodyOwnerTypeUser ResponseBodyOwnerType = "user" + ResponseBodyOwnerTypeTeam ResponseBodyOwnerType = "team" +) + +func (e ResponseBodyOwnerType) ToPointer() *ResponseBodyOwnerType { + return &e +} +func (e *ResponseBodyOwnerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "user": + fallthrough + case "team": + *e = ResponseBodyOwnerType(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseBodyOwnerType: %v", v) + } +} + +type Repos struct { + ID ResponseBodyID `json:"id"` + Provider SearchRepoResponseBodyProvider `json:"provider"` + URL string `json:"url"` + Name string `json:"name"` + Slug string `json:"slug"` + Namespace string `json:"namespace"` + Owner Owner `json:"owner"` + OwnerType ResponseBodyOwnerType `json:"ownerType"` + Private bool `json:"private"` + DefaultBranch string `json:"defaultBranch"` + UpdatedAt float64 `json:"updatedAt"` +} + +func (o *Repos) GetID() ResponseBodyID { + if o == nil { + return ResponseBodyID{} + } + return o.ID +} + +func (o *Repos) GetProvider() SearchRepoResponseBodyProvider { + if o == nil { + return SearchRepoResponseBodyProvider("") + } + return o.Provider +} + +func (o *Repos) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *Repos) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Repos) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +func (o *Repos) GetNamespace() string { + if o == nil { + return "" + } + return o.Namespace +} + +func (o *Repos) GetOwner() Owner { + if o == nil { + return Owner{} + } + return o.Owner +} + +func (o *Repos) GetOwnerType() ResponseBodyOwnerType { + if o == nil { + return ResponseBodyOwnerType("") + } + return o.OwnerType +} + +func (o *Repos) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *Repos) GetDefaultBranch() string { + if o == nil { + return "" + } + return o.DefaultBranch +} + +func (o *Repos) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +type SearchRepoResponseBody2 struct { + GitAccount GitAccount `json:"gitAccount"` + Repos []Repos `json:"repos"` +} + +func (o *SearchRepoResponseBody2) GetGitAccount() GitAccount { + if o == nil { + return GitAccount{} + } + return o.GitAccount +} + +func (o *SearchRepoResponseBody2) GetRepos() []Repos { + if o == nil { + return []Repos{} + } + return o.Repos +} + +type SearchRepoResponseBody1 struct { +} + +type SearchRepoResponseBodyType string + +const ( + SearchRepoResponseBodyTypeSearchRepoResponseBody1 SearchRepoResponseBodyType = "searchRepo_responseBody_1" + SearchRepoResponseBodyTypeSearchRepoResponseBody2 SearchRepoResponseBodyType = "searchRepo_responseBody_2" +) + +type SearchRepoResponseBody struct { + SearchRepoResponseBody1 *SearchRepoResponseBody1 + SearchRepoResponseBody2 *SearchRepoResponseBody2 + + Type SearchRepoResponseBodyType +} + +func CreateSearchRepoResponseBodySearchRepoResponseBody1(searchRepoResponseBody1 SearchRepoResponseBody1) SearchRepoResponseBody { + typ := SearchRepoResponseBodyTypeSearchRepoResponseBody1 + + return SearchRepoResponseBody{ + SearchRepoResponseBody1: &searchRepoResponseBody1, + Type: typ, + } +} + +func CreateSearchRepoResponseBodySearchRepoResponseBody2(searchRepoResponseBody2 SearchRepoResponseBody2) SearchRepoResponseBody { + typ := SearchRepoResponseBodyTypeSearchRepoResponseBody2 + + return SearchRepoResponseBody{ + SearchRepoResponseBody2: &searchRepoResponseBody2, + Type: typ, + } +} + +func (u *SearchRepoResponseBody) UnmarshalJSON(data []byte) error { + + var searchRepoResponseBody1 SearchRepoResponseBody1 = SearchRepoResponseBody1{} + if err := utils.UnmarshalJSON(data, &searchRepoResponseBody1, "", true, true); err == nil { + u.SearchRepoResponseBody1 = &searchRepoResponseBody1 + u.Type = SearchRepoResponseBodyTypeSearchRepoResponseBody1 + return nil + } + + var searchRepoResponseBody2 SearchRepoResponseBody2 = SearchRepoResponseBody2{} + if err := utils.UnmarshalJSON(data, &searchRepoResponseBody2, "", true, true); err == nil { + u.SearchRepoResponseBody2 = &searchRepoResponseBody2 + u.Type = SearchRepoResponseBodyTypeSearchRepoResponseBody2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for SearchRepoResponseBody", string(data)) +} + +func (u SearchRepoResponseBody) MarshalJSON() ([]byte, error) { + if u.SearchRepoResponseBody1 != nil { + return utils.MarshalJSON(u.SearchRepoResponseBody1, "", true) + } + + if u.SearchRepoResponseBody2 != nil { + return utils.MarshalJSON(u.SearchRepoResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type SearchRepoResponseBody: all fields are null") +} + +type SearchRepoResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + OneOf *SearchRepoResponseBody +} + +func (o *SearchRepoResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *SearchRepoResponse) GetOneOf() *SearchRepoResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/status.go b/src/__tests__/mockserver/internal/sdk/models/operations/status.go new file mode 100644 index 00000000..9f9ed2ae --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/status.go @@ -0,0 +1,92 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type StatusRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *StatusRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *StatusRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type StatusStatus string + +const ( + StatusStatusDisabled StatusStatus = "disabled" + StatusStatusEnabled StatusStatus = "enabled" + StatusStatusOverLimit StatusStatus = "over_limit" + StatusStatusPaused StatusStatus = "paused" +) + +func (e StatusStatus) ToPointer() *StatusStatus { + return &e +} +func (e *StatusStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "disabled": + fallthrough + case "enabled": + fallthrough + case "over_limit": + fallthrough + case "paused": + *e = StatusStatus(v) + return nil + default: + return fmt.Errorf("invalid value for StatusStatus: %v", v) + } +} + +type StatusResponseBody struct { + Status StatusStatus `json:"status"` +} + +func (o *StatusResponseBody) GetStatus() StatusStatus { + if o == nil { + return StatusStatus("") + } + return o.Status +} + +type StatusResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *StatusResponseBody +} + +func (o *StatusResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *StatusResponse) GetObject() *StatusResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/submitbillingdata.go b/src/__tests__/mockserver/internal/sdk/models/operations/submitbillingdata.go new file mode 100644 index 00000000..137efec5 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/submitbillingdata.go @@ -0,0 +1,593 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "time" +) + +// Period for the billing cycle. +type Period struct { + Start time.Time `json:"start"` + End time.Time `json:"end"` +} + +func (p Period) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *Period) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Period) GetStart() time.Time { + if o == nil { + return time.Time{} + } + return o.Start +} + +func (o *Period) GetEnd() time.Time { + if o == nil { + return time.Time{} + } + return o.End +} + +type BillingItems struct { + // Partner's billing plan ID. + BillingPlanID string `json:"billingPlanId"` + // Partner's resource ID. + ResourceID *string `json:"resourceId,omitempty"` + // Start and end are only needed if different from the period's start/end. + Start *time.Time `json:"start,omitempty"` + // Start and end are only needed if different from the period's start/end. + End *time.Time `json:"end,omitempty"` + // Line item name. + Name string `json:"name"` + // Line item details. + Details *string `json:"details,omitempty"` + // Price per unit. + Price string `json:"price"` + // Quantity of units. + Quantity float64 `json:"quantity"` + // Units of the quantity. + Units string `json:"units"` + // Total amount. + Total string `json:"total"` +} + +func (b BillingItems) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(b, "", false) +} + +func (b *BillingItems) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &b, "", false, false); err != nil { + return err + } + return nil +} + +func (o *BillingItems) GetBillingPlanID() string { + if o == nil { + return "" + } + return o.BillingPlanID +} + +func (o *BillingItems) GetResourceID() *string { + if o == nil { + return nil + } + return o.ResourceID +} + +func (o *BillingItems) GetStart() *time.Time { + if o == nil { + return nil + } + return o.Start +} + +func (o *BillingItems) GetEnd() *time.Time { + if o == nil { + return nil + } + return o.End +} + +func (o *BillingItems) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *BillingItems) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *BillingItems) GetPrice() string { + if o == nil { + return "" + } + return o.Price +} + +func (o *BillingItems) GetQuantity() float64 { + if o == nil { + return 0.0 + } + return o.Quantity +} + +func (o *BillingItems) GetUnits() string { + if o == nil { + return "" + } + return o.Units +} + +func (o *BillingItems) GetTotal() string { + if o == nil { + return "" + } + return o.Total +} + +type Discounts struct { + // Partner's billing plan ID. + BillingPlanID string `json:"billingPlanId"` + // Partner's resource ID. + ResourceID *string `json:"resourceId,omitempty"` + // Start and end are only needed if different from the period's start/end. + Start *time.Time `json:"start,omitempty"` + // Start and end are only needed if different from the period's start/end. + End *time.Time `json:"end,omitempty"` + // Discount name. + Name string `json:"name"` + // Discount details. + Details *string `json:"details,omitempty"` + // Discount amount. + Amount string `json:"amount"` +} + +func (d Discounts) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(d, "", false) +} + +func (d *Discounts) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &d, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Discounts) GetBillingPlanID() string { + if o == nil { + return "" + } + return o.BillingPlanID +} + +func (o *Discounts) GetResourceID() *string { + if o == nil { + return nil + } + return o.ResourceID +} + +func (o *Discounts) GetStart() *time.Time { + if o == nil { + return nil + } + return o.Start +} + +func (o *Discounts) GetEnd() *time.Time { + if o == nil { + return nil + } + return o.End +} + +func (o *Discounts) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Discounts) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *Discounts) GetAmount() string { + if o == nil { + return "" + } + return o.Amount +} + +type Billing2 struct { + Items []BillingItems `json:"items"` + Discounts []Discounts `json:"discounts,omitempty"` +} + +func (o *Billing2) GetItems() []BillingItems { + if o == nil { + return []BillingItems{} + } + return o.Items +} + +func (o *Billing2) GetDiscounts() []Discounts { + if o == nil { + return nil + } + return o.Discounts +} + +type Billing1 struct { + // Partner's billing plan ID. + BillingPlanID string `json:"billingPlanId"` + // Partner's resource ID. + ResourceID *string `json:"resourceId,omitempty"` + // Start and end are only needed if different from the period's start/end. + Start *time.Time `json:"start,omitempty"` + // Start and end are only needed if different from the period's start/end. + End *time.Time `json:"end,omitempty"` + // Line item name. + Name string `json:"name"` + // Line item details. + Details *string `json:"details,omitempty"` + // Price per unit. + Price string `json:"price"` + // Quantity of units. + Quantity float64 `json:"quantity"` + // Units of the quantity. + Units string `json:"units"` + // Total amount. + Total string `json:"total"` +} + +func (b Billing1) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(b, "", false) +} + +func (b *Billing1) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &b, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Billing1) GetBillingPlanID() string { + if o == nil { + return "" + } + return o.BillingPlanID +} + +func (o *Billing1) GetResourceID() *string { + if o == nil { + return nil + } + return o.ResourceID +} + +func (o *Billing1) GetStart() *time.Time { + if o == nil { + return nil + } + return o.Start +} + +func (o *Billing1) GetEnd() *time.Time { + if o == nil { + return nil + } + return o.End +} + +func (o *Billing1) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Billing1) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *Billing1) GetPrice() string { + if o == nil { + return "" + } + return o.Price +} + +func (o *Billing1) GetQuantity() float64 { + if o == nil { + return 0.0 + } + return o.Quantity +} + +func (o *Billing1) GetUnits() string { + if o == nil { + return "" + } + return o.Units +} + +func (o *Billing1) GetTotal() string { + if o == nil { + return "" + } + return o.Total +} + +type BillingType string + +const ( + BillingTypeArrayOfBilling1 BillingType = "arrayOfBilling1" + BillingTypeBilling2 BillingType = "billing_2" +) + +// Billing data (interim invoicing data). +type Billing struct { + ArrayOfBilling1 []Billing1 + Billing2 *Billing2 + + Type BillingType +} + +func CreateBillingArrayOfBilling1(arrayOfBilling1 []Billing1) Billing { + typ := BillingTypeArrayOfBilling1 + + return Billing{ + ArrayOfBilling1: arrayOfBilling1, + Type: typ, + } +} + +func CreateBillingBilling2(billing2 Billing2) Billing { + typ := BillingTypeBilling2 + + return Billing{ + Billing2: &billing2, + Type: typ, + } +} + +func (u *Billing) UnmarshalJSON(data []byte) error { + + var billing2 Billing2 = Billing2{} + if err := utils.UnmarshalJSON(data, &billing2, "", true, true); err == nil { + u.Billing2 = &billing2 + u.Type = BillingTypeBilling2 + return nil + } + + var arrayOfBilling1 []Billing1 = []Billing1{} + if err := utils.UnmarshalJSON(data, &arrayOfBilling1, "", true, true); err == nil { + u.ArrayOfBilling1 = arrayOfBilling1 + u.Type = BillingTypeArrayOfBilling1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Billing", string(data)) +} + +func (u Billing) MarshalJSON() ([]byte, error) { + if u.ArrayOfBilling1 != nil { + return utils.MarshalJSON(u.ArrayOfBilling1, "", true) + } + + if u.Billing2 != nil { + return utils.MarshalJSON(u.Billing2, "", true) + } + + return nil, errors.New("could not marshal union type Billing: all fields are null") +} + +// SubmitBillingDataType - \n Type of the metric.\n - total: measured total value, such as Database size\n - interval: usage during the period, such as i/o or number of queries.\n - rate: rate of usage, such as queries per second.\n +type SubmitBillingDataType string + +const ( + SubmitBillingDataTypeTotal SubmitBillingDataType = "total" + SubmitBillingDataTypeInterval SubmitBillingDataType = "interval" + SubmitBillingDataTypeRate SubmitBillingDataType = "rate" +) + +func (e SubmitBillingDataType) ToPointer() *SubmitBillingDataType { + return &e +} +func (e *SubmitBillingDataType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "total": + fallthrough + case "interval": + fallthrough + case "rate": + *e = SubmitBillingDataType(v) + return nil + default: + return fmt.Errorf("invalid value for SubmitBillingDataType: %v", v) + } +} + +type Usage struct { + // Partner's resource ID. + ResourceID string `json:"resourceId"` + // Metric name. + Name string `json:"name"` + // \n Type of the metric.\n - total: measured total value, such as Database size\n - interval: usage during the period, such as i/o or number of queries.\n - rate: rate of usage, such as queries per second.\n + Type SubmitBillingDataType `json:"type"` + // Metric units. Example: \"GB\" + Units string `json:"units"` + // Metric value for the day. Could be a final or an interim value for the day. + DayValue float64 `json:"dayValue"` + // Metric value for the billing period. Could be a final or an interim value for the period. + PeriodValue float64 `json:"periodValue"` + // The limit value of the metric for a billing period, if a limit is defined by the plan. + PlanValue *float64 `json:"planValue,omitempty"` +} + +func (o *Usage) GetResourceID() string { + if o == nil { + return "" + } + return o.ResourceID +} + +func (o *Usage) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Usage) GetType() SubmitBillingDataType { + if o == nil { + return SubmitBillingDataType("") + } + return o.Type +} + +func (o *Usage) GetUnits() string { + if o == nil { + return "" + } + return o.Units +} + +func (o *Usage) GetDayValue() float64 { + if o == nil { + return 0.0 + } + return o.DayValue +} + +func (o *Usage) GetPeriodValue() float64 { + if o == nil { + return 0.0 + } + return o.PeriodValue +} + +func (o *Usage) GetPlanValue() *float64 { + if o == nil { + return nil + } + return o.PlanValue +} + +type SubmitBillingDataRequestBody struct { + Timestamp time.Time `json:"timestamp"` + Eod time.Time `json:"eod"` + // Period for the billing cycle. + Period Period `json:"period"` + // Billing data (interim invoicing data). + Billing Billing `json:"billing"` + Usage []Usage `json:"usage"` +} + +func (s SubmitBillingDataRequestBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SubmitBillingDataRequestBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SubmitBillingDataRequestBody) GetTimestamp() time.Time { + if o == nil { + return time.Time{} + } + return o.Timestamp +} + +func (o *SubmitBillingDataRequestBody) GetEod() time.Time { + if o == nil { + return time.Time{} + } + return o.Eod +} + +func (o *SubmitBillingDataRequestBody) GetPeriod() Period { + if o == nil { + return Period{} + } + return o.Period +} + +func (o *SubmitBillingDataRequestBody) GetBilling() Billing { + if o == nil { + return Billing{} + } + return o.Billing +} + +func (o *SubmitBillingDataRequestBody) GetUsage() []Usage { + if o == nil { + return []Usage{} + } + return o.Usage +} + +type SubmitBillingDataRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` + RequestBody SubmitBillingDataRequestBody `request:"mediaType=application/json"` +} + +func (o *SubmitBillingDataRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +func (o *SubmitBillingDataRequest) GetRequestBody() SubmitBillingDataRequestBody { + if o == nil { + return SubmitBillingDataRequestBody{} + } + return o.RequestBody +} + +type SubmitBillingDataResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *SubmitBillingDataResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/submitinvoice.go b/src/__tests__/mockserver/internal/sdk/models/operations/submitinvoice.go new file mode 100644 index 00000000..2bf6168b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/submitinvoice.go @@ -0,0 +1,399 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "time" +) + +// SubmitInvoicePeriod - Subscription period for this billing cycle. +type SubmitInvoicePeriod struct { + Start time.Time `json:"start"` + End time.Time `json:"end"` +} + +func (s SubmitInvoicePeriod) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SubmitInvoicePeriod) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SubmitInvoicePeriod) GetStart() time.Time { + if o == nil { + return time.Time{} + } + return o.Start +} + +func (o *SubmitInvoicePeriod) GetEnd() time.Time { + if o == nil { + return time.Time{} + } + return o.End +} + +type SubmitInvoiceItems struct { + // Partner's resource ID. + ResourceID *string `json:"resourceId,omitempty"` + // Partner's billing plan ID. + BillingPlanID string `json:"billingPlanId"` + // Start and end are only needed if different from the period's start/end. + Start *time.Time `json:"start,omitempty"` + // Start and end are only needed if different from the period's start/end. + End *time.Time `json:"end,omitempty"` + Name string `json:"name"` + Details *string `json:"details,omitempty"` + Price string `json:"price"` + Quantity float64 `json:"quantity"` + Units string `json:"units"` + Total string `json:"total"` +} + +func (s SubmitInvoiceItems) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SubmitInvoiceItems) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SubmitInvoiceItems) GetResourceID() *string { + if o == nil { + return nil + } + return o.ResourceID +} + +func (o *SubmitInvoiceItems) GetBillingPlanID() string { + if o == nil { + return "" + } + return o.BillingPlanID +} + +func (o *SubmitInvoiceItems) GetStart() *time.Time { + if o == nil { + return nil + } + return o.Start +} + +func (o *SubmitInvoiceItems) GetEnd() *time.Time { + if o == nil { + return nil + } + return o.End +} + +func (o *SubmitInvoiceItems) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *SubmitInvoiceItems) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *SubmitInvoiceItems) GetPrice() string { + if o == nil { + return "" + } + return o.Price +} + +func (o *SubmitInvoiceItems) GetQuantity() float64 { + if o == nil { + return 0.0 + } + return o.Quantity +} + +func (o *SubmitInvoiceItems) GetUnits() string { + if o == nil { + return "" + } + return o.Units +} + +func (o *SubmitInvoiceItems) GetTotal() string { + if o == nil { + return "" + } + return o.Total +} + +type SubmitInvoiceDiscounts struct { + // Partner's resource ID. + ResourceID *string `json:"resourceId,omitempty"` + // Partner's billing plan ID. + BillingPlanID string `json:"billingPlanId"` + // Start and end are only needed if different from the period's start/end. + Start *time.Time `json:"start,omitempty"` + // Start and end are only needed if different from the period's start/end. + End *time.Time `json:"end,omitempty"` + Name string `json:"name"` + Details *string `json:"details,omitempty"` + Amount string `json:"amount"` +} + +func (s SubmitInvoiceDiscounts) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SubmitInvoiceDiscounts) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SubmitInvoiceDiscounts) GetResourceID() *string { + if o == nil { + return nil + } + return o.ResourceID +} + +func (o *SubmitInvoiceDiscounts) GetBillingPlanID() string { + if o == nil { + return "" + } + return o.BillingPlanID +} + +func (o *SubmitInvoiceDiscounts) GetStart() *time.Time { + if o == nil { + return nil + } + return o.Start +} + +func (o *SubmitInvoiceDiscounts) GetEnd() *time.Time { + if o == nil { + return nil + } + return o.End +} + +func (o *SubmitInvoiceDiscounts) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *SubmitInvoiceDiscounts) GetDetails() *string { + if o == nil { + return nil + } + return o.Details +} + +func (o *SubmitInvoiceDiscounts) GetAmount() string { + if o == nil { + return "" + } + return o.Amount +} + +type Result string + +const ( + ResultPaid Result = "paid" + ResultNotpaid Result = "notpaid" +) + +func (e Result) ToPointer() *Result { + return &e +} +func (e *Result) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "paid": + fallthrough + case "notpaid": + *e = Result(v) + return nil + default: + return fmt.Errorf("invalid value for Result: %v", v) + } +} + +// Test mode +type Test struct { + Validate *bool `json:"validate,omitempty"` + Result *Result `json:"result,omitempty"` +} + +func (o *Test) GetValidate() *bool { + if o == nil { + return nil + } + return o.Validate +} + +func (o *Test) GetResult() *Result { + if o == nil { + return nil + } + return o.Result +} + +type SubmitInvoiceRequestBody struct { + ExternalID *string `json:"externalId,omitempty"` + // Invoice date. Must be within the period's start and end. + InvoiceDate time.Time `json:"invoiceDate"` + // Additional memo for the invoice. + Memo *string `json:"memo,omitempty"` + // Subscription period for this billing cycle. + Period SubmitInvoicePeriod `json:"period"` + Items []SubmitInvoiceItems `json:"items"` + Discounts []SubmitInvoiceDiscounts `json:"discounts,omitempty"` + // Test mode + Test *Test `json:"test,omitempty"` +} + +func (s SubmitInvoiceRequestBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SubmitInvoiceRequestBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SubmitInvoiceRequestBody) GetExternalID() *string { + if o == nil { + return nil + } + return o.ExternalID +} + +func (o *SubmitInvoiceRequestBody) GetInvoiceDate() time.Time { + if o == nil { + return time.Time{} + } + return o.InvoiceDate +} + +func (o *SubmitInvoiceRequestBody) GetMemo() *string { + if o == nil { + return nil + } + return o.Memo +} + +func (o *SubmitInvoiceRequestBody) GetPeriod() SubmitInvoicePeriod { + if o == nil { + return SubmitInvoicePeriod{} + } + return o.Period +} + +func (o *SubmitInvoiceRequestBody) GetItems() []SubmitInvoiceItems { + if o == nil { + return []SubmitInvoiceItems{} + } + return o.Items +} + +func (o *SubmitInvoiceRequestBody) GetDiscounts() []SubmitInvoiceDiscounts { + if o == nil { + return nil + } + return o.Discounts +} + +func (o *SubmitInvoiceRequestBody) GetTest() *Test { + if o == nil { + return nil + } + return o.Test +} + +type SubmitInvoiceRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` + RequestBody SubmitInvoiceRequestBody `request:"mediaType=application/json"` +} + +func (o *SubmitInvoiceRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +func (o *SubmitInvoiceRequest) GetRequestBody() SubmitInvoiceRequestBody { + if o == nil { + return SubmitInvoiceRequestBody{} + } + return o.RequestBody +} + +type SubmitInvoiceResponseBody struct { + InvoiceID *string `json:"invoiceId,omitempty"` + Test *bool `json:"test,omitempty"` + ValidationErrors []string `json:"validationErrors,omitempty"` +} + +func (o *SubmitInvoiceResponseBody) GetInvoiceID() *string { + if o == nil { + return nil + } + return o.InvoiceID +} + +func (o *SubmitInvoiceResponseBody) GetTest() *bool { + if o == nil { + return nil + } + return o.Test +} + +func (o *SubmitInvoiceResponseBody) GetValidationErrors() []string { + if o == nil { + return nil + } + return o.ValidationErrors +} + +type SubmitInvoiceResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *SubmitInvoiceResponseBody +} + +func (o *SubmitInvoiceResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *SubmitInvoiceResponse) GetObject() *SubmitInvoiceResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateaccessgroup.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateaccessgroup.go new file mode 100644 index 00000000..771af5b0 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateaccessgroup.go @@ -0,0 +1,251 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// Role - The project role that will be added to this Access Group. \"null\" will remove this project level role. +type Role string + +const ( + RoleAdmin Role = "ADMIN" + RoleProjectViewer Role = "PROJECT_VIEWER" + RoleProjectDeveloper Role = "PROJECT_DEVELOPER" +) + +func (e Role) ToPointer() *Role { + return &e +} +func (e *Role) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_VIEWER": + fallthrough + case "PROJECT_DEVELOPER": + *e = Role(v) + return nil + default: + return fmt.Errorf("invalid value for Role: %v", v) + } +} + +type Projects struct { + // The ID of the project. + ProjectID string `json:"projectId"` + // The project role that will be added to this Access Group. \"null\" will remove this project level role. + Role *Role `json:"role"` +} + +func (o *Projects) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *Projects) GetRole() *Role { + if o == nil { + return nil + } + return o.Role +} + +type UpdateAccessGroupRequestBody struct { + // The name of the access group + Name *string `json:"name,omitempty"` + Projects []Projects `json:"projects,omitempty"` + // List of members to add to the access group. + MembersToAdd []string `json:"membersToAdd,omitempty"` + // List of members to remove from the access group. + MembersToRemove []string `json:"membersToRemove,omitempty"` +} + +func (o *UpdateAccessGroupRequestBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *UpdateAccessGroupRequestBody) GetProjects() []Projects { + if o == nil { + return nil + } + return o.Projects +} + +func (o *UpdateAccessGroupRequestBody) GetMembersToAdd() []string { + if o == nil { + return nil + } + return o.MembersToAdd +} + +func (o *UpdateAccessGroupRequestBody) GetMembersToRemove() []string { + if o == nil { + return nil + } + return o.MembersToRemove +} + +type UpdateAccessGroupRequest struct { + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateAccessGroupRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateAccessGroupRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *UpdateAccessGroupRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateAccessGroupRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateAccessGroupRequest) GetRequestBody() UpdateAccessGroupRequestBody { + if o == nil { + return UpdateAccessGroupRequestBody{} + } + return o.RequestBody +} + +type UpdateAccessGroupEntitlements string + +const ( + UpdateAccessGroupEntitlementsV0 UpdateAccessGroupEntitlements = "v0" +) + +func (e UpdateAccessGroupEntitlements) ToPointer() *UpdateAccessGroupEntitlements { + return &e +} +func (e *UpdateAccessGroupEntitlements) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "v0": + *e = UpdateAccessGroupEntitlements(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateAccessGroupEntitlements: %v", v) + } +} + +type UpdateAccessGroupResponseBody struct { + Entitlements []UpdateAccessGroupEntitlements `json:"entitlements,omitempty"` + // The name of this access group. + Name string `json:"name"` + // Timestamp in milliseconds when the access group was created. + CreatedAt string `json:"createdAt"` + // ID of the team that this access group belongs to. + TeamID string `json:"teamId"` + // Timestamp in milliseconds when the access group was last updated. + UpdatedAt string `json:"updatedAt"` + // ID of the access group. + AccessGroupID string `json:"accessGroupId"` + // Number of members in the access group. + MembersCount float64 `json:"membersCount"` + // Number of projects in the access group. + ProjectsCount float64 `json:"projectsCount"` +} + +func (o *UpdateAccessGroupResponseBody) GetEntitlements() []UpdateAccessGroupEntitlements { + if o == nil { + return nil + } + return o.Entitlements +} + +func (o *UpdateAccessGroupResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateAccessGroupResponseBody) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *UpdateAccessGroupResponseBody) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *UpdateAccessGroupResponseBody) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +func (o *UpdateAccessGroupResponseBody) GetAccessGroupID() string { + if o == nil { + return "" + } + return o.AccessGroupID +} + +func (o *UpdateAccessGroupResponseBody) GetMembersCount() float64 { + if o == nil { + return 0.0 + } + return o.MembersCount +} + +func (o *UpdateAccessGroupResponseBody) GetProjectsCount() float64 { + if o == nil { + return 0.0 + } + return o.ProjectsCount +} + +type UpdateAccessGroupResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateAccessGroupResponseBody +} + +func (o *UpdateAccessGroupResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateAccessGroupResponse) GetObject() *UpdateAccessGroupResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateaccessgroupproject.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateaccessgroupproject.go new file mode 100644 index 00000000..7eeaa7eb --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateaccessgroupproject.go @@ -0,0 +1,195 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// UpdateAccessGroupProjectRole - The project role that will be added to this Access Group. +type UpdateAccessGroupProjectRole string + +const ( + UpdateAccessGroupProjectRoleAdmin UpdateAccessGroupProjectRole = "ADMIN" + UpdateAccessGroupProjectRoleProjectViewer UpdateAccessGroupProjectRole = "PROJECT_VIEWER" + UpdateAccessGroupProjectRoleProjectDeveloper UpdateAccessGroupProjectRole = "PROJECT_DEVELOPER" +) + +func (e UpdateAccessGroupProjectRole) ToPointer() *UpdateAccessGroupProjectRole { + return &e +} +func (e *UpdateAccessGroupProjectRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_VIEWER": + fallthrough + case "PROJECT_DEVELOPER": + *e = UpdateAccessGroupProjectRole(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateAccessGroupProjectRole: %v", v) + } +} + +type UpdateAccessGroupProjectRequestBody struct { + // The project role that will be added to this Access Group. + Role UpdateAccessGroupProjectRole `json:"role"` +} + +func (o *UpdateAccessGroupProjectRequestBody) GetRole() UpdateAccessGroupProjectRole { + if o == nil { + return UpdateAccessGroupProjectRole("") + } + return o.Role +} + +type UpdateAccessGroupProjectRequest struct { + AccessGroupIDOrName string `pathParam:"style=simple,explode=false,name=accessGroupIdOrName"` + ProjectID string `pathParam:"style=simple,explode=false,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateAccessGroupProjectRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateAccessGroupProjectRequest) GetAccessGroupIDOrName() string { + if o == nil { + return "" + } + return o.AccessGroupIDOrName +} + +func (o *UpdateAccessGroupProjectRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateAccessGroupProjectRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateAccessGroupProjectRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateAccessGroupProjectRequest) GetRequestBody() UpdateAccessGroupProjectRequestBody { + if o == nil { + return UpdateAccessGroupProjectRequestBody{} + } + return o.RequestBody +} + +type UpdateAccessGroupProjectAccessGroupsRole string + +const ( + UpdateAccessGroupProjectAccessGroupsRoleAdmin UpdateAccessGroupProjectAccessGroupsRole = "ADMIN" + UpdateAccessGroupProjectAccessGroupsRoleProjectDeveloper UpdateAccessGroupProjectAccessGroupsRole = "PROJECT_DEVELOPER" + UpdateAccessGroupProjectAccessGroupsRoleProjectViewer UpdateAccessGroupProjectAccessGroupsRole = "PROJECT_VIEWER" +) + +func (e UpdateAccessGroupProjectAccessGroupsRole) ToPointer() *UpdateAccessGroupProjectAccessGroupsRole { + return &e +} +func (e *UpdateAccessGroupProjectAccessGroupsRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_DEVELOPER": + fallthrough + case "PROJECT_VIEWER": + *e = UpdateAccessGroupProjectAccessGroupsRole(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateAccessGroupProjectAccessGroupsRole: %v", v) + } +} + +type UpdateAccessGroupProjectResponseBody struct { + TeamID string `json:"teamId"` + AccessGroupID string `json:"accessGroupId"` + ProjectID string `json:"projectId"` + Role UpdateAccessGroupProjectAccessGroupsRole `json:"role"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` +} + +func (o *UpdateAccessGroupProjectResponseBody) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *UpdateAccessGroupProjectResponseBody) GetAccessGroupID() string { + if o == nil { + return "" + } + return o.AccessGroupID +} + +func (o *UpdateAccessGroupProjectResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateAccessGroupProjectResponseBody) GetRole() UpdateAccessGroupProjectAccessGroupsRole { + if o == nil { + return UpdateAccessGroupProjectAccessGroupsRole("") + } + return o.Role +} + +func (o *UpdateAccessGroupProjectResponseBody) GetCreatedAt() string { + if o == nil { + return "" + } + return o.CreatedAt +} + +func (o *UpdateAccessGroupProjectResponseBody) GetUpdatedAt() string { + if o == nil { + return "" + } + return o.UpdatedAt +} + +type UpdateAccessGroupProjectResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateAccessGroupProjectResponseBody +} + +func (o *UpdateAccessGroupProjectResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateAccessGroupProjectResponse) GetObject() *UpdateAccessGroupProjectResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateattackchallengemode.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateattackchallengemode.go new file mode 100644 index 00000000..4708be7e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateattackchallengemode.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UpdateAttackChallengeModeRequestBody struct { + ProjectID string `json:"projectId"` + AttackModeEnabled bool `json:"attackModeEnabled"` + AttackModeActiveUntil *float64 `json:"attackModeActiveUntil,omitempty"` +} + +func (o *UpdateAttackChallengeModeRequestBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateAttackChallengeModeRequestBody) GetAttackModeEnabled() bool { + if o == nil { + return false + } + return o.AttackModeEnabled +} + +func (o *UpdateAttackChallengeModeRequestBody) GetAttackModeActiveUntil() *float64 { + if o == nil { + return nil + } + return o.AttackModeActiveUntil +} + +type UpdateAttackChallengeModeRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateAttackChallengeModeRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateAttackChallengeModeRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateAttackChallengeModeRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateAttackChallengeModeRequest) GetRequestBody() UpdateAttackChallengeModeRequestBody { + if o == nil { + return UpdateAttackChallengeModeRequestBody{} + } + return o.RequestBody +} + +type UpdateAttackChallengeModeResponseBody struct { + AttackModeEnabled bool `json:"attackModeEnabled"` + AttackModeUpdatedAt float64 `json:"attackModeUpdatedAt"` +} + +func (o *UpdateAttackChallengeModeResponseBody) GetAttackModeEnabled() bool { + if o == nil { + return false + } + return o.AttackModeEnabled +} + +func (o *UpdateAttackChallengeModeResponseBody) GetAttackModeUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.AttackModeUpdatedAt +} + +type UpdateAttackChallengeModeResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateAttackChallengeModeResponseBody +} + +func (o *UpdateAttackChallengeModeResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateAttackChallengeModeResponse) GetObject() *UpdateAttackChallengeModeResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updatecheck.go b/src/__tests__/mockserver/internal/sdk/models/operations/updatecheck.go new file mode 100644 index 00000000..7624e52b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updatecheck.go @@ -0,0 +1,1023 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// Status - The current status of the check +type Status string + +const ( + StatusRunning Status = "running" + StatusCompleted Status = "completed" +) + +func (e Status) ToPointer() *Status { + return &e +} +func (e *Status) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "running": + fallthrough + case "completed": + *e = Status(v) + return nil + default: + return fmt.Errorf("invalid value for Status: %v", v) + } +} + +// Conclusion - The result of the check being run +type Conclusion string + +const ( + ConclusionCanceled Conclusion = "canceled" + ConclusionFailed Conclusion = "failed" + ConclusionNeutral Conclusion = "neutral" + ConclusionSucceeded Conclusion = "succeeded" + ConclusionSkipped Conclusion = "skipped" +) + +func (e Conclusion) ToPointer() *Conclusion { + return &e +} +func (e *Conclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "canceled": + fallthrough + case "failed": + fallthrough + case "neutral": + fallthrough + case "succeeded": + fallthrough + case "skipped": + *e = Conclusion(v) + return nil + default: + return fmt.Errorf("invalid value for Conclusion: %v", v) + } +} + +type UpdateCheckSource string + +const ( + UpdateCheckSourceWebVitals UpdateCheckSource = "web-vitals" +) + +func (e UpdateCheckSource) ToPointer() *UpdateCheckSource { + return &e +} +func (e *UpdateCheckSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckSource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckSource: %v", v) + } +} + +type Fcp struct { + // First Contentful Paint value + Value *float64 `json:"value"` + // Previous First Contentful Paint value to display a delta + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckSource `json:"source"` +} + +func (o *Fcp) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *Fcp) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *Fcp) GetSource() UpdateCheckSource { + if o == nil { + return UpdateCheckSource("") + } + return o.Source +} + +type UpdateCheckChecksSource string + +const ( + UpdateCheckChecksSourceWebVitals UpdateCheckChecksSource = "web-vitals" +) + +func (e UpdateCheckChecksSource) ToPointer() *UpdateCheckChecksSource { + return &e +} +func (e *UpdateCheckChecksSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksSource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksSource: %v", v) + } +} + +type Lcp struct { + // Largest Contentful Paint value + Value *float64 `json:"value"` + // Previous Largest Contentful Paint value to display a delta + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksSource `json:"source"` +} + +func (o *Lcp) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *Lcp) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *Lcp) GetSource() UpdateCheckChecksSource { + if o == nil { + return UpdateCheckChecksSource("") + } + return o.Source +} + +type UpdateCheckChecksRequestSource string + +const ( + UpdateCheckChecksRequestSourceWebVitals UpdateCheckChecksRequestSource = "web-vitals" +) + +func (e UpdateCheckChecksRequestSource) ToPointer() *UpdateCheckChecksRequestSource { + return &e +} +func (e *UpdateCheckChecksRequestSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksRequestSource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksRequestSource: %v", v) + } +} + +type Cls struct { + // Cumulative Layout Shift value + Value *float64 `json:"value"` + // Previous Cumulative Layout Shift value to display a delta + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksRequestSource `json:"source"` +} + +func (o *Cls) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *Cls) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *Cls) GetSource() UpdateCheckChecksRequestSource { + if o == nil { + return UpdateCheckChecksRequestSource("") + } + return o.Source +} + +type UpdateCheckChecksRequestRequestBodySource string + +const ( + UpdateCheckChecksRequestRequestBodySourceWebVitals UpdateCheckChecksRequestRequestBodySource = "web-vitals" +) + +func (e UpdateCheckChecksRequestRequestBodySource) ToPointer() *UpdateCheckChecksRequestRequestBodySource { + return &e +} +func (e *UpdateCheckChecksRequestRequestBodySource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksRequestRequestBodySource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksRequestRequestBodySource: %v", v) + } +} + +type Tbt struct { + // Total Blocking Time value + Value *float64 `json:"value"` + // Previous Total Blocking Time value to display a delta + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksRequestRequestBodySource `json:"source"` +} + +func (o *Tbt) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *Tbt) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *Tbt) GetSource() UpdateCheckChecksRequestRequestBodySource { + if o == nil { + return UpdateCheckChecksRequestRequestBodySource("") + } + return o.Source +} + +type UpdateCheckChecksRequestRequestBodyOutputSource string + +const ( + UpdateCheckChecksRequestRequestBodyOutputSourceWebVitals UpdateCheckChecksRequestRequestBodyOutputSource = "web-vitals" +) + +func (e UpdateCheckChecksRequestRequestBodyOutputSource) ToPointer() *UpdateCheckChecksRequestRequestBodyOutputSource { + return &e +} +func (e *UpdateCheckChecksRequestRequestBodyOutputSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksRequestRequestBodyOutputSource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksRequestRequestBodyOutputSource: %v", v) + } +} + +type VirtualExperienceScore struct { + // The calculated Virtual Experience Score value, between 0 and 100 + Value *int64 `json:"value"` + // A previous Virtual Experience Score value to display a delta, between 0 and 100 + PreviousValue *int64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksRequestRequestBodyOutputSource `json:"source"` +} + +func (o *VirtualExperienceScore) GetValue() *int64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *VirtualExperienceScore) GetPreviousValue() *int64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *VirtualExperienceScore) GetSource() UpdateCheckChecksRequestRequestBodyOutputSource { + if o == nil { + return UpdateCheckChecksRequestRequestBodyOutputSource("") + } + return o.Source +} + +// Metrics about the page +type Metrics struct { + Fcp Fcp `json:"FCP"` + Lcp Lcp `json:"LCP"` + Cls Cls `json:"CLS"` + Tbt Tbt `json:"TBT"` + VirtualExperienceScore *VirtualExperienceScore `json:"virtualExperienceScore,omitempty"` +} + +func (o *Metrics) GetFcp() Fcp { + if o == nil { + return Fcp{} + } + return o.Fcp +} + +func (o *Metrics) GetLcp() Lcp { + if o == nil { + return Lcp{} + } + return o.Lcp +} + +func (o *Metrics) GetCls() Cls { + if o == nil { + return Cls{} + } + return o.Cls +} + +func (o *Metrics) GetTbt() Tbt { + if o == nil { + return Tbt{} + } + return o.Tbt +} + +func (o *Metrics) GetVirtualExperienceScore() *VirtualExperienceScore { + if o == nil { + return nil + } + return o.VirtualExperienceScore +} + +// Output - The results of the check Run +type Output struct { + // Metrics about the page + Metrics *Metrics `json:"metrics,omitempty"` +} + +func (o *Output) GetMetrics() *Metrics { + if o == nil { + return nil + } + return o.Metrics +} + +type UpdateCheckRequestBody struct { + // The name of the check being created + Name *string `json:"name,omitempty"` + // Path of the page that is being checked + Path *string `json:"path,omitempty"` + // The current status of the check + Status *Status `json:"status,omitempty"` + // The result of the check being run + Conclusion *Conclusion `json:"conclusion,omitempty"` + // A URL a user may visit to see more information about the check + DetailsURL *string `json:"detailsUrl,omitempty"` + // The results of the check Run + Output *Output `json:"output,omitempty"` + // An identifier that can be used as an external reference + ExternalID *string `json:"externalId,omitempty"` +} + +func (o *UpdateCheckRequestBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *UpdateCheckRequestBody) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +func (o *UpdateCheckRequestBody) GetStatus() *Status { + if o == nil { + return nil + } + return o.Status +} + +func (o *UpdateCheckRequestBody) GetConclusion() *Conclusion { + if o == nil { + return nil + } + return o.Conclusion +} + +func (o *UpdateCheckRequestBody) GetDetailsURL() *string { + if o == nil { + return nil + } + return o.DetailsURL +} + +func (o *UpdateCheckRequestBody) GetOutput() *Output { + if o == nil { + return nil + } + return o.Output +} + +func (o *UpdateCheckRequestBody) GetExternalID() *string { + if o == nil { + return nil + } + return o.ExternalID +} + +type UpdateCheckRequest struct { + // The deployment to update the check for. + DeploymentID string `pathParam:"style=simple,explode=false,name=deploymentId"` + // The check being updated + CheckID string `pathParam:"style=simple,explode=false,name=checkId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateCheckRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateCheckRequest) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *UpdateCheckRequest) GetCheckID() string { + if o == nil { + return "" + } + return o.CheckID +} + +func (o *UpdateCheckRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateCheckRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateCheckRequest) GetRequestBody() UpdateCheckRequestBody { + if o == nil { + return UpdateCheckRequestBody{} + } + return o.RequestBody +} + +type UpdateCheckStatus string + +const ( + UpdateCheckStatusRegistered UpdateCheckStatus = "registered" + UpdateCheckStatusRunning UpdateCheckStatus = "running" + UpdateCheckStatusCompleted UpdateCheckStatus = "completed" +) + +func (e UpdateCheckStatus) ToPointer() *UpdateCheckStatus { + return &e +} +func (e *UpdateCheckStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = UpdateCheckStatus(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckStatus: %v", v) + } +} + +type UpdateCheckConclusion string + +const ( + UpdateCheckConclusionCanceled UpdateCheckConclusion = "canceled" + UpdateCheckConclusionFailed UpdateCheckConclusion = "failed" + UpdateCheckConclusionNeutral UpdateCheckConclusion = "neutral" + UpdateCheckConclusionSucceeded UpdateCheckConclusion = "succeeded" + UpdateCheckConclusionSkipped UpdateCheckConclusion = "skipped" + UpdateCheckConclusionStale UpdateCheckConclusion = "stale" +) + +func (e UpdateCheckConclusion) ToPointer() *UpdateCheckConclusion { + return &e +} +func (e *UpdateCheckConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "canceled": + fallthrough + case "failed": + fallthrough + case "neutral": + fallthrough + case "succeeded": + fallthrough + case "skipped": + fallthrough + case "stale": + *e = UpdateCheckConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckConclusion: %v", v) + } +} + +type UpdateCheckChecksResponseSource string + +const ( + UpdateCheckChecksResponseSourceWebVitals UpdateCheckChecksResponseSource = "web-vitals" +) + +func (e UpdateCheckChecksResponseSource) ToPointer() *UpdateCheckChecksResponseSource { + return &e +} +func (e *UpdateCheckChecksResponseSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksResponseSource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksResponseSource: %v", v) + } +} + +type UpdateCheckFCP struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksResponseSource `json:"source"` +} + +func (o *UpdateCheckFCP) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *UpdateCheckFCP) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *UpdateCheckFCP) GetSource() UpdateCheckChecksResponseSource { + if o == nil { + return UpdateCheckChecksResponseSource("") + } + return o.Source +} + +type UpdateCheckChecksResponse200Source string + +const ( + UpdateCheckChecksResponse200SourceWebVitals UpdateCheckChecksResponse200Source = "web-vitals" +) + +func (e UpdateCheckChecksResponse200Source) ToPointer() *UpdateCheckChecksResponse200Source { + return &e +} +func (e *UpdateCheckChecksResponse200Source) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksResponse200Source(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksResponse200Source: %v", v) + } +} + +type UpdateCheckLCP struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksResponse200Source `json:"source"` +} + +func (o *UpdateCheckLCP) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *UpdateCheckLCP) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *UpdateCheckLCP) GetSource() UpdateCheckChecksResponse200Source { + if o == nil { + return UpdateCheckChecksResponse200Source("") + } + return o.Source +} + +type UpdateCheckChecksResponse200ApplicationJSONSource string + +const ( + UpdateCheckChecksResponse200ApplicationJSONSourceWebVitals UpdateCheckChecksResponse200ApplicationJSONSource = "web-vitals" +) + +func (e UpdateCheckChecksResponse200ApplicationJSONSource) ToPointer() *UpdateCheckChecksResponse200ApplicationJSONSource { + return &e +} +func (e *UpdateCheckChecksResponse200ApplicationJSONSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksResponse200ApplicationJSONSource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksResponse200ApplicationJSONSource: %v", v) + } +} + +type UpdateCheckCLS struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksResponse200ApplicationJSONSource `json:"source"` +} + +func (o *UpdateCheckCLS) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *UpdateCheckCLS) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *UpdateCheckCLS) GetSource() UpdateCheckChecksResponse200ApplicationJSONSource { + if o == nil { + return UpdateCheckChecksResponse200ApplicationJSONSource("") + } + return o.Source +} + +type UpdateCheckChecksResponse200ApplicationJSONResponseBodySource string + +const ( + UpdateCheckChecksResponse200ApplicationJSONResponseBodySourceWebVitals UpdateCheckChecksResponse200ApplicationJSONResponseBodySource = "web-vitals" +) + +func (e UpdateCheckChecksResponse200ApplicationJSONResponseBodySource) ToPointer() *UpdateCheckChecksResponse200ApplicationJSONResponseBodySource { + return &e +} +func (e *UpdateCheckChecksResponse200ApplicationJSONResponseBodySource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksResponse200ApplicationJSONResponseBodySource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksResponse200ApplicationJSONResponseBodySource: %v", v) + } +} + +type UpdateCheckTBT struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksResponse200ApplicationJSONResponseBodySource `json:"source"` +} + +func (o *UpdateCheckTBT) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *UpdateCheckTBT) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *UpdateCheckTBT) GetSource() UpdateCheckChecksResponse200ApplicationJSONResponseBodySource { + if o == nil { + return UpdateCheckChecksResponse200ApplicationJSONResponseBodySource("") + } + return o.Source +} + +type UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource string + +const ( + UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSourceWebVitals UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource = "web-vitals" +) + +func (e UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource) ToPointer() *UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource { + return &e +} +func (e *UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "web-vitals": + *e = UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource: %v", v) + } +} + +type UpdateCheckVirtualExperienceScore struct { + Value *float64 `json:"value"` + PreviousValue *float64 `json:"previousValue,omitempty"` + Source UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource `json:"source"` +} + +func (o *UpdateCheckVirtualExperienceScore) GetValue() *float64 { + if o == nil { + return nil + } + return o.Value +} + +func (o *UpdateCheckVirtualExperienceScore) GetPreviousValue() *float64 { + if o == nil { + return nil + } + return o.PreviousValue +} + +func (o *UpdateCheckVirtualExperienceScore) GetSource() UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource { + if o == nil { + return UpdateCheckChecksResponse200ApplicationJSONResponseBodyOutputSource("") + } + return o.Source +} + +type UpdateCheckMetrics struct { + Fcp UpdateCheckFCP `json:"FCP"` + Lcp UpdateCheckLCP `json:"LCP"` + Cls UpdateCheckCLS `json:"CLS"` + Tbt UpdateCheckTBT `json:"TBT"` + VirtualExperienceScore *UpdateCheckVirtualExperienceScore `json:"virtualExperienceScore,omitempty"` +} + +func (o *UpdateCheckMetrics) GetFcp() UpdateCheckFCP { + if o == nil { + return UpdateCheckFCP{} + } + return o.Fcp +} + +func (o *UpdateCheckMetrics) GetLcp() UpdateCheckLCP { + if o == nil { + return UpdateCheckLCP{} + } + return o.Lcp +} + +func (o *UpdateCheckMetrics) GetCls() UpdateCheckCLS { + if o == nil { + return UpdateCheckCLS{} + } + return o.Cls +} + +func (o *UpdateCheckMetrics) GetTbt() UpdateCheckTBT { + if o == nil { + return UpdateCheckTBT{} + } + return o.Tbt +} + +func (o *UpdateCheckMetrics) GetVirtualExperienceScore() *UpdateCheckVirtualExperienceScore { + if o == nil { + return nil + } + return o.VirtualExperienceScore +} + +type UpdateCheckOutput struct { + Metrics *UpdateCheckMetrics `json:"metrics,omitempty"` +} + +func (o *UpdateCheckOutput) GetMetrics() *UpdateCheckMetrics { + if o == nil { + return nil + } + return o.Metrics +} + +type UpdateCheckResponseBody struct { + ID string `json:"id"` + Name string `json:"name"` + Path *string `json:"path,omitempty"` + Status UpdateCheckStatus `json:"status"` + Conclusion *UpdateCheckConclusion `json:"conclusion,omitempty"` + Blocking bool `json:"blocking"` + Output *UpdateCheckOutput `json:"output,omitempty"` + DetailsURL *string `json:"detailsUrl,omitempty"` + IntegrationID string `json:"integrationId"` + DeploymentID string `json:"deploymentId"` + ExternalID *string `json:"externalId,omitempty"` + CreatedAt float64 `json:"createdAt"` + UpdatedAt float64 `json:"updatedAt"` + StartedAt *float64 `json:"startedAt,omitempty"` + CompletedAt *float64 `json:"completedAt,omitempty"` + Rerequestable *bool `json:"rerequestable,omitempty"` +} + +func (o *UpdateCheckResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateCheckResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateCheckResponseBody) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +func (o *UpdateCheckResponseBody) GetStatus() UpdateCheckStatus { + if o == nil { + return UpdateCheckStatus("") + } + return o.Status +} + +func (o *UpdateCheckResponseBody) GetConclusion() *UpdateCheckConclusion { + if o == nil { + return nil + } + return o.Conclusion +} + +func (o *UpdateCheckResponseBody) GetBlocking() bool { + if o == nil { + return false + } + return o.Blocking +} + +func (o *UpdateCheckResponseBody) GetOutput() *UpdateCheckOutput { + if o == nil { + return nil + } + return o.Output +} + +func (o *UpdateCheckResponseBody) GetDetailsURL() *string { + if o == nil { + return nil + } + return o.DetailsURL +} + +func (o *UpdateCheckResponseBody) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *UpdateCheckResponseBody) GetDeploymentID() string { + if o == nil { + return "" + } + return o.DeploymentID +} + +func (o *UpdateCheckResponseBody) GetExternalID() *string { + if o == nil { + return nil + } + return o.ExternalID +} + +func (o *UpdateCheckResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *UpdateCheckResponseBody) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *UpdateCheckResponseBody) GetStartedAt() *float64 { + if o == nil { + return nil + } + return o.StartedAt +} + +func (o *UpdateCheckResponseBody) GetCompletedAt() *float64 { + if o == nil { + return nil + } + return o.CompletedAt +} + +func (o *UpdateCheckResponseBody) GetRerequestable() *bool { + if o == nil { + return nil + } + return o.Rerequestable +} + +type UpdateCheckResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateCheckResponseBody +} + +func (o *UpdateCheckResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateCheckResponse) GetObject() *UpdateCheckResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateedgeconfig.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateedgeconfig.go new file mode 100644 index 00000000..7b2e1ce3 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateedgeconfig.go @@ -0,0 +1,243 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type UpdateEdgeConfigRequestBody struct { + Slug string `json:"slug"` +} + +func (o *UpdateEdgeConfigRequestBody) GetSlug() string { + if o == nil { + return "" + } + return o.Slug +} + +type UpdateEdgeConfigRequest struct { + EdgeConfigID string `pathParam:"style=simple,explode=false,name=edgeConfigId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateEdgeConfigRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateEdgeConfigRequest) GetEdgeConfigID() string { + if o == nil { + return "" + } + return o.EdgeConfigID +} + +func (o *UpdateEdgeConfigRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateEdgeConfigRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateEdgeConfigRequest) GetRequestBody() UpdateEdgeConfigRequestBody { + if o == nil { + return UpdateEdgeConfigRequestBody{} + } + return o.RequestBody +} + +// UpdateEdgeConfigTransfer - Keeps track of the current state of the Edge Config while it gets transferred. +type UpdateEdgeConfigTransfer struct { + FromAccountID string `json:"fromAccountId"` + StartedAt float64 `json:"startedAt"` + DoneAt *float64 `json:"doneAt"` +} + +func (o *UpdateEdgeConfigTransfer) GetFromAccountID() string { + if o == nil { + return "" + } + return o.FromAccountID +} + +func (o *UpdateEdgeConfigTransfer) GetStartedAt() float64 { + if o == nil { + return 0.0 + } + return o.StartedAt +} + +func (o *UpdateEdgeConfigTransfer) GetDoneAt() *float64 { + if o == nil { + return nil + } + return o.DoneAt +} + +type UpdateEdgeConfigSchema struct { +} + +type UpdateEdgeConfigType string + +const ( + UpdateEdgeConfigTypeFlags UpdateEdgeConfigType = "flags" +) + +func (e UpdateEdgeConfigType) ToPointer() *UpdateEdgeConfigType { + return &e +} +func (e *UpdateEdgeConfigType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags": + *e = UpdateEdgeConfigType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateEdgeConfigType: %v", v) + } +} + +type UpdateEdgeConfigPurpose struct { + Type UpdateEdgeConfigType `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *UpdateEdgeConfigPurpose) GetType() UpdateEdgeConfigType { + if o == nil { + return UpdateEdgeConfigType("") + } + return o.Type +} + +func (o *UpdateEdgeConfigPurpose) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +// UpdateEdgeConfigResponseBody - An Edge Config +type UpdateEdgeConfigResponseBody struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + ID *string `json:"id,omitempty"` + // Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). + Slug *string `json:"slug,omitempty"` + OwnerID *string `json:"ownerId,omitempty"` + Digest *string `json:"digest,omitempty"` + // Keeps track of the current state of the Edge Config while it gets transferred. + Transfer *UpdateEdgeConfigTransfer `json:"transfer,omitempty"` + Schema *UpdateEdgeConfigSchema `json:"schema,omitempty"` + Purpose *UpdateEdgeConfigPurpose `json:"purpose,omitempty"` + SizeInBytes float64 `json:"sizeInBytes"` + ItemCount float64 `json:"itemCount"` +} + +func (o *UpdateEdgeConfigResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateEdgeConfigResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *UpdateEdgeConfigResponseBody) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *UpdateEdgeConfigResponseBody) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateEdgeConfigResponseBody) GetOwnerID() *string { + if o == nil { + return nil + } + return o.OwnerID +} + +func (o *UpdateEdgeConfigResponseBody) GetDigest() *string { + if o == nil { + return nil + } + return o.Digest +} + +func (o *UpdateEdgeConfigResponseBody) GetTransfer() *UpdateEdgeConfigTransfer { + if o == nil { + return nil + } + return o.Transfer +} + +func (o *UpdateEdgeConfigResponseBody) GetSchema() *UpdateEdgeConfigSchema { + if o == nil { + return nil + } + return o.Schema +} + +func (o *UpdateEdgeConfigResponseBody) GetPurpose() *UpdateEdgeConfigPurpose { + if o == nil { + return nil + } + return o.Purpose +} + +func (o *UpdateEdgeConfigResponseBody) GetSizeInBytes() float64 { + if o == nil { + return 0.0 + } + return o.SizeInBytes +} + +func (o *UpdateEdgeConfigResponseBody) GetItemCount() float64 { + if o == nil { + return 0.0 + } + return o.ItemCount +} + +type UpdateEdgeConfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateEdgeConfigResponseBody +} + +func (o *UpdateEdgeConfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateEdgeConfigResponse) GetObject() *UpdateEdgeConfigResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updatefirewallconfig.go b/src/__tests__/mockserver/internal/sdk/models/operations/updatefirewallconfig.go new file mode 100644 index 00000000..20aedd3f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updatefirewallconfig.go @@ -0,0 +1,2612 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type UpdateFirewallConfigRequestBodySecurityRequest11Action string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest11ActionManagedRulesUpdate UpdateFirewallConfigRequestBodySecurityRequest11Action = "managedRules.update" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest11Action) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest11Action { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest11Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "managedRules.update": + *e = UpdateFirewallConfigRequestBodySecurityRequest11Action(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest11Action: %v", v) + } +} + +type RequestBodyID string + +const ( + RequestBodyIDOwasp RequestBodyID = "owasp" +) + +func (e RequestBodyID) ToPointer() *RequestBodyID { + return &e +} +func (e *RequestBodyID) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "owasp": + *e = RequestBodyID(v) + return nil + default: + return fmt.Errorf("invalid value for RequestBodyID: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityRequest11Value struct { + Active bool `json:"active"` +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequest11Value) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +// Eleven - Update a managed ruleset +type Eleven struct { + Action UpdateFirewallConfigRequestBodySecurityRequest11Action `json:"action"` + ID RequestBodyID `json:"id"` + Value UpdateFirewallConfigRequestBodySecurityRequest11Value `json:"value"` +} + +func (o *Eleven) GetAction() UpdateFirewallConfigRequestBodySecurityRequest11Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest11Action("") + } + return o.Action +} + +func (o *Eleven) GetID() RequestBodyID { + if o == nil { + return RequestBodyID("") + } + return o.ID +} + +func (o *Eleven) GetValue() UpdateFirewallConfigRequestBodySecurityRequest11Value { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest11Value{} + } + return o.Value +} + +type UpdateFirewallConfigRequestBodySecurityRequest10Action string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest10ActionIPRemove UpdateFirewallConfigRequestBodySecurityRequest10Action = "ip.remove" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest10Action) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest10Action { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest10Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ip.remove": + *e = UpdateFirewallConfigRequestBodySecurityRequest10Action(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest10Action: %v", v) + } +} + +// RequestBody10 - Remove an IP Blocking rule +type RequestBody10 struct { + Action UpdateFirewallConfigRequestBodySecurityRequest10Action `json:"action"` + ID string `json:"id"` + Value any `json:"value,omitempty"` +} + +func (o *RequestBody10) GetAction() UpdateFirewallConfigRequestBodySecurityRequest10Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest10Action("") + } + return o.Action +} + +func (o *RequestBody10) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *RequestBody10) GetValue() any { + if o == nil { + return nil + } + return o.Value +} + +type UpdateFirewallConfigRequestBodySecurityRequest9Action string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest9ActionIPUpdate UpdateFirewallConfigRequestBodySecurityRequest9Action = "ip.update" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest9Action) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest9Action { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest9Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ip.update": + *e = UpdateFirewallConfigRequestBodySecurityRequest9Action(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest9Action: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityRequest9ValueAction string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest9ValueActionDeny UpdateFirewallConfigRequestBodySecurityRequest9ValueAction = "deny" + UpdateFirewallConfigRequestBodySecurityRequest9ValueActionChallenge UpdateFirewallConfigRequestBodySecurityRequest9ValueAction = "challenge" + UpdateFirewallConfigRequestBodySecurityRequest9ValueActionLog UpdateFirewallConfigRequestBodySecurityRequest9ValueAction = "log" + UpdateFirewallConfigRequestBodySecurityRequest9ValueActionBypass UpdateFirewallConfigRequestBodySecurityRequest9ValueAction = "bypass" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest9ValueAction) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest9ValueAction { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest9ValueAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "challenge": + fallthrough + case "log": + fallthrough + case "bypass": + *e = UpdateFirewallConfigRequestBodySecurityRequest9ValueAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest9ValueAction: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityRequest9Value struct { + Hostname string `json:"hostname"` + IP string `json:"ip"` + Notes *string `json:"notes,omitempty"` + Action UpdateFirewallConfigRequestBodySecurityRequest9ValueAction `json:"action"` +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequest9Value) GetHostname() string { + if o == nil { + return "" + } + return o.Hostname +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequest9Value) GetIP() string { + if o == nil { + return "" + } + return o.IP +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequest9Value) GetNotes() *string { + if o == nil { + return nil + } + return o.Notes +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequest9Value) GetAction() UpdateFirewallConfigRequestBodySecurityRequest9ValueAction { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest9ValueAction("") + } + return o.Action +} + +// RequestBody9 - Update an IP Blocking rule +type RequestBody9 struct { + Action UpdateFirewallConfigRequestBodySecurityRequest9Action `json:"action"` + ID string `json:"id"` + Value UpdateFirewallConfigRequestBodySecurityRequest9Value `json:"value"` +} + +func (o *RequestBody9) GetAction() UpdateFirewallConfigRequestBodySecurityRequest9Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest9Action("") + } + return o.Action +} + +func (o *RequestBody9) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *RequestBody9) GetValue() UpdateFirewallConfigRequestBodySecurityRequest9Value { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest9Value{} + } + return o.Value +} + +type UpdateFirewallConfigRequestBodySecurityRequest8Action string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest8ActionIPInsert UpdateFirewallConfigRequestBodySecurityRequest8Action = "ip.insert" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest8Action) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest8Action { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest8Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ip.insert": + *e = UpdateFirewallConfigRequestBodySecurityRequest8Action(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest8Action: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityRequest8ValueAction string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest8ValueActionDeny UpdateFirewallConfigRequestBodySecurityRequest8ValueAction = "deny" + UpdateFirewallConfigRequestBodySecurityRequest8ValueActionChallenge UpdateFirewallConfigRequestBodySecurityRequest8ValueAction = "challenge" + UpdateFirewallConfigRequestBodySecurityRequest8ValueActionLog UpdateFirewallConfigRequestBodySecurityRequest8ValueAction = "log" + UpdateFirewallConfigRequestBodySecurityRequest8ValueActionBypass UpdateFirewallConfigRequestBodySecurityRequest8ValueAction = "bypass" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest8ValueAction) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest8ValueAction { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest8ValueAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "challenge": + fallthrough + case "log": + fallthrough + case "bypass": + *e = UpdateFirewallConfigRequestBodySecurityRequest8ValueAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest8ValueAction: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityRequestValue struct { + Hostname string `json:"hostname"` + IP string `json:"ip"` + Notes *string `json:"notes,omitempty"` + Action UpdateFirewallConfigRequestBodySecurityRequest8ValueAction `json:"action"` +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequestValue) GetHostname() string { + if o == nil { + return "" + } + return o.Hostname +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequestValue) GetIP() string { + if o == nil { + return "" + } + return o.IP +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequestValue) GetNotes() *string { + if o == nil { + return nil + } + return o.Notes +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequestValue) GetAction() UpdateFirewallConfigRequestBodySecurityRequest8ValueAction { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest8ValueAction("") + } + return o.Action +} + +// RequestBody8 - Add an IP Blocking rule +type RequestBody8 struct { + Action UpdateFirewallConfigRequestBodySecurityRequest8Action `json:"action"` + ID any `json:"id,omitempty"` + Value UpdateFirewallConfigRequestBodySecurityRequestValue `json:"value"` +} + +func (o *RequestBody8) GetAction() UpdateFirewallConfigRequestBodySecurityRequest8Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest8Action("") + } + return o.Action +} + +func (o *RequestBody8) GetID() any { + if o == nil { + return nil + } + return o.ID +} + +func (o *RequestBody8) GetValue() UpdateFirewallConfigRequestBodySecurityRequestValue { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequestValue{} + } + return o.Value +} + +type UpdateFirewallConfigRequestBodySecurityRequest7Action string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest7ActionCrsDisable UpdateFirewallConfigRequestBodySecurityRequest7Action = "crs.disable" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest7Action) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest7Action { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest7Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "crs.disable": + *e = UpdateFirewallConfigRequestBodySecurityRequest7Action(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest7Action: %v", v) + } +} + +// RequestBody7 - Disable a managed rule +type RequestBody7 struct { + Action UpdateFirewallConfigRequestBodySecurityRequest7Action `json:"action"` + ID any `json:"id,omitempty"` + Value any `json:"value,omitempty"` +} + +func (o *RequestBody7) GetAction() UpdateFirewallConfigRequestBodySecurityRequest7Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest7Action("") + } + return o.Action +} + +func (o *RequestBody7) GetID() any { + if o == nil { + return nil + } + return o.ID +} + +func (o *RequestBody7) GetValue() any { + if o == nil { + return nil + } + return o.Value +} + +type UpdateFirewallConfigRequestBodySecurityRequest6Action string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest6ActionCrsUpdate UpdateFirewallConfigRequestBodySecurityRequest6Action = "crs.update" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest6Action) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest6Action { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest6Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "crs.update": + *e = UpdateFirewallConfigRequestBodySecurityRequest6Action(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest6Action: %v", v) + } +} + +type ID string + +const ( + IDSd ID = "sd" + IDMa ID = "ma" + IDLfi ID = "lfi" + IDRfi ID = "rfi" + IDRce ID = "rce" + IDPhp ID = "php" + IDGen ID = "gen" + IDXSS ID = "xss" + IDSqli ID = "sqli" + IDSf ID = "sf" + IDJava ID = "java" +) + +func (e ID) ToPointer() *ID { + return &e +} +func (e *ID) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "sd": + fallthrough + case "ma": + fallthrough + case "lfi": + fallthrough + case "rfi": + fallthrough + case "rce": + fallthrough + case "php": + fallthrough + case "gen": + fallthrough + case "xss": + fallthrough + case "sqli": + fallthrough + case "sf": + fallthrough + case "java": + *e = ID(v) + return nil + default: + return fmt.Errorf("invalid value for ID: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityRequest6ValueAction string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest6ValueActionDeny UpdateFirewallConfigRequestBodySecurityRequest6ValueAction = "deny" + UpdateFirewallConfigRequestBodySecurityRequest6ValueActionLog UpdateFirewallConfigRequestBodySecurityRequest6ValueAction = "log" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest6ValueAction) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest6ValueAction { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest6ValueAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "log": + *e = UpdateFirewallConfigRequestBodySecurityRequest6ValueAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest6ValueAction: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityValue struct { + Active bool `json:"active"` + Action UpdateFirewallConfigRequestBodySecurityRequest6ValueAction `json:"action"` +} + +func (o *UpdateFirewallConfigRequestBodySecurityValue) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *UpdateFirewallConfigRequestBodySecurityValue) GetAction() UpdateFirewallConfigRequestBodySecurityRequest6ValueAction { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest6ValueAction("") + } + return o.Action +} + +// RequestBody6 - Enable a managed rule +type RequestBody6 struct { + Action UpdateFirewallConfigRequestBodySecurityRequest6Action `json:"action"` + ID ID `json:"id"` + Value UpdateFirewallConfigRequestBodySecurityValue `json:"value"` +} + +func (o *RequestBody6) GetAction() UpdateFirewallConfigRequestBodySecurityRequest6Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest6Action("") + } + return o.Action +} + +func (o *RequestBody6) GetID() ID { + if o == nil { + return ID("") + } + return o.ID +} + +func (o *RequestBody6) GetValue() UpdateFirewallConfigRequestBodySecurityValue { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityValue{} + } + return o.Value +} + +type UpdateFirewallConfigRequestBodySecurityRequest5Action string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest5ActionRulesPriority UpdateFirewallConfigRequestBodySecurityRequest5Action = "rules.priority" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest5Action) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest5Action { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest5Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "rules.priority": + *e = UpdateFirewallConfigRequestBodySecurityRequest5Action(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest5Action: %v", v) + } +} + +// UpdateFirewallConfigRequestBody5 - Reorder a custom rule +type UpdateFirewallConfigRequestBody5 struct { + Action UpdateFirewallConfigRequestBodySecurityRequest5Action `json:"action"` + ID string `json:"id"` + Value float64 `json:"value"` +} + +func (o *UpdateFirewallConfigRequestBody5) GetAction() UpdateFirewallConfigRequestBodySecurityRequest5Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest5Action("") + } + return o.Action +} + +func (o *UpdateFirewallConfigRequestBody5) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateFirewallConfigRequestBody5) GetValue() float64 { + if o == nil { + return 0.0 + } + return o.Value +} + +type UpdateFirewallConfigRequestBodySecurityRequestAction string + +const ( + UpdateFirewallConfigRequestBodySecurityRequestActionRulesRemove UpdateFirewallConfigRequestBodySecurityRequestAction = "rules.remove" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequestAction) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequestAction { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequestAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "rules.remove": + *e = UpdateFirewallConfigRequestBodySecurityRequestAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequestAction: %v", v) + } +} + +// UpdateFirewallConfigRequestBody4 - Remove a custom rule +type UpdateFirewallConfigRequestBody4 struct { + Action UpdateFirewallConfigRequestBodySecurityRequestAction `json:"action"` + ID string `json:"id"` + Value any `json:"value,omitempty"` +} + +func (o *UpdateFirewallConfigRequestBody4) GetAction() UpdateFirewallConfigRequestBodySecurityRequestAction { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequestAction("") + } + return o.Action +} + +func (o *UpdateFirewallConfigRequestBody4) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateFirewallConfigRequestBody4) GetValue() any { + if o == nil { + return nil + } + return o.Value +} + +type UpdateFirewallConfigRequestBodySecurityAction string + +const ( + UpdateFirewallConfigRequestBodySecurityActionRulesUpdate UpdateFirewallConfigRequestBodySecurityAction = "rules.update" +) + +func (e UpdateFirewallConfigRequestBodySecurityAction) ToPointer() *UpdateFirewallConfigRequestBodySecurityAction { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "rules.update": + *e = UpdateFirewallConfigRequestBodySecurityAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityAction: %v", v) + } +} + +// UpdateFirewallConfigRequestBodySecurityType - [Parameter](https://vercel.com/docs/security/vercel-waf/rule-configuration#parameters) from the incoming traffic. +type UpdateFirewallConfigRequestBodySecurityType string + +const ( + UpdateFirewallConfigRequestBodySecurityTypeHost UpdateFirewallConfigRequestBodySecurityType = "host" + UpdateFirewallConfigRequestBodySecurityTypePath UpdateFirewallConfigRequestBodySecurityType = "path" + UpdateFirewallConfigRequestBodySecurityTypeMethod UpdateFirewallConfigRequestBodySecurityType = "method" + UpdateFirewallConfigRequestBodySecurityTypeHeader UpdateFirewallConfigRequestBodySecurityType = "header" + UpdateFirewallConfigRequestBodySecurityTypeQuery UpdateFirewallConfigRequestBodySecurityType = "query" + UpdateFirewallConfigRequestBodySecurityTypeCookie UpdateFirewallConfigRequestBodySecurityType = "cookie" + UpdateFirewallConfigRequestBodySecurityTypeTargetPath UpdateFirewallConfigRequestBodySecurityType = "target_path" + UpdateFirewallConfigRequestBodySecurityTypeRawPath UpdateFirewallConfigRequestBodySecurityType = "raw_path" + UpdateFirewallConfigRequestBodySecurityTypeIPAddress UpdateFirewallConfigRequestBodySecurityType = "ip_address" + UpdateFirewallConfigRequestBodySecurityTypeRegion UpdateFirewallConfigRequestBodySecurityType = "region" + UpdateFirewallConfigRequestBodySecurityTypeProtocol UpdateFirewallConfigRequestBodySecurityType = "protocol" + UpdateFirewallConfigRequestBodySecurityTypeScheme UpdateFirewallConfigRequestBodySecurityType = "scheme" + UpdateFirewallConfigRequestBodySecurityTypeEnvironment UpdateFirewallConfigRequestBodySecurityType = "environment" + UpdateFirewallConfigRequestBodySecurityTypeUserAgent UpdateFirewallConfigRequestBodySecurityType = "user_agent" + UpdateFirewallConfigRequestBodySecurityTypeGeoContinent UpdateFirewallConfigRequestBodySecurityType = "geo_continent" + UpdateFirewallConfigRequestBodySecurityTypeGeoCountry UpdateFirewallConfigRequestBodySecurityType = "geo_country" + UpdateFirewallConfigRequestBodySecurityTypeGeoCountryRegion UpdateFirewallConfigRequestBodySecurityType = "geo_country_region" + UpdateFirewallConfigRequestBodySecurityTypeGeoCity UpdateFirewallConfigRequestBodySecurityType = "geo_city" + UpdateFirewallConfigRequestBodySecurityTypeGeoAsNumber UpdateFirewallConfigRequestBodySecurityType = "geo_as_number" + UpdateFirewallConfigRequestBodySecurityTypeJa4Digest UpdateFirewallConfigRequestBodySecurityType = "ja4_digest" + UpdateFirewallConfigRequestBodySecurityTypeJa3Digest UpdateFirewallConfigRequestBodySecurityType = "ja3_digest" + UpdateFirewallConfigRequestBodySecurityTypeRateLimitAPIID UpdateFirewallConfigRequestBodySecurityType = "rate_limit_api_id" +) + +func (e UpdateFirewallConfigRequestBodySecurityType) ToPointer() *UpdateFirewallConfigRequestBodySecurityType { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + fallthrough + case "path": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "query": + fallthrough + case "cookie": + fallthrough + case "target_path": + fallthrough + case "raw_path": + fallthrough + case "ip_address": + fallthrough + case "region": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "user_agent": + fallthrough + case "geo_continent": + fallthrough + case "geo_country": + fallthrough + case "geo_country_region": + fallthrough + case "geo_city": + fallthrough + case "geo_as_number": + fallthrough + case "ja4_digest": + fallthrough + case "ja3_digest": + fallthrough + case "rate_limit_api_id": + *e = UpdateFirewallConfigRequestBodySecurityType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityType: %v", v) + } +} + +// UpdateFirewallConfigRequestBodyOp - [Operator](https://vercel.com/docs/security/vercel-waf/rule-configuration#operators) used to compare the parameter with a value +type UpdateFirewallConfigRequestBodyOp string + +const ( + UpdateFirewallConfigRequestBodyOpRe UpdateFirewallConfigRequestBodyOp = "re" + UpdateFirewallConfigRequestBodyOpEq UpdateFirewallConfigRequestBodyOp = "eq" + UpdateFirewallConfigRequestBodyOpNeq UpdateFirewallConfigRequestBodyOp = "neq" + UpdateFirewallConfigRequestBodyOpEx UpdateFirewallConfigRequestBodyOp = "ex" + UpdateFirewallConfigRequestBodyOpNex UpdateFirewallConfigRequestBodyOp = "nex" + UpdateFirewallConfigRequestBodyOpInc UpdateFirewallConfigRequestBodyOp = "inc" + UpdateFirewallConfigRequestBodyOpNinc UpdateFirewallConfigRequestBodyOp = "ninc" + UpdateFirewallConfigRequestBodyOpPre UpdateFirewallConfigRequestBodyOp = "pre" + UpdateFirewallConfigRequestBodyOpSuf UpdateFirewallConfigRequestBodyOp = "suf" + UpdateFirewallConfigRequestBodyOpSub UpdateFirewallConfigRequestBodyOp = "sub" + UpdateFirewallConfigRequestBodyOpGt UpdateFirewallConfigRequestBodyOp = "gt" + UpdateFirewallConfigRequestBodyOpGte UpdateFirewallConfigRequestBodyOp = "gte" + UpdateFirewallConfigRequestBodyOpLt UpdateFirewallConfigRequestBodyOp = "lt" + UpdateFirewallConfigRequestBodyOpLte UpdateFirewallConfigRequestBodyOp = "lte" +) + +func (e UpdateFirewallConfigRequestBodyOp) ToPointer() *UpdateFirewallConfigRequestBodyOp { + return &e +} +func (e *UpdateFirewallConfigRequestBodyOp) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "re": + fallthrough + case "eq": + fallthrough + case "neq": + fallthrough + case "ex": + fallthrough + case "nex": + fallthrough + case "inc": + fallthrough + case "ninc": + fallthrough + case "pre": + fallthrough + case "suf": + fallthrough + case "sub": + fallthrough + case "gt": + fallthrough + case "gte": + fallthrough + case "lt": + fallthrough + case "lte": + *e = UpdateFirewallConfigRequestBodyOp(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodyOp: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityRequest3ValueType string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeStr UpdateFirewallConfigRequestBodySecurityRequest3ValueType = "str" + UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeArrayOfStr UpdateFirewallConfigRequestBodySecurityRequest3ValueType = "arrayOfStr" + UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeNumber UpdateFirewallConfigRequestBodySecurityRequest3ValueType = "number" +) + +type UpdateFirewallConfigRequestBodySecurityRequest3Value struct { + Str *string + ArrayOfStr []string + Number *float64 + + Type UpdateFirewallConfigRequestBodySecurityRequest3ValueType +} + +func CreateUpdateFirewallConfigRequestBodySecurityRequest3ValueStr(str string) UpdateFirewallConfigRequestBodySecurityRequest3Value { + typ := UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeStr + + return UpdateFirewallConfigRequestBodySecurityRequest3Value{ + Str: &str, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodySecurityRequest3ValueArrayOfStr(arrayOfStr []string) UpdateFirewallConfigRequestBodySecurityRequest3Value { + typ := UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeArrayOfStr + + return UpdateFirewallConfigRequestBodySecurityRequest3Value{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodySecurityRequest3ValueNumber(number float64) UpdateFirewallConfigRequestBodySecurityRequest3Value { + typ := UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeNumber + + return UpdateFirewallConfigRequestBodySecurityRequest3Value{ + Number: &number, + Type: typ, + } +} + +func (u *UpdateFirewallConfigRequestBodySecurityRequest3Value) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeArrayOfStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = UpdateFirewallConfigRequestBodySecurityRequest3ValueTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateFirewallConfigRequestBodySecurityRequest3Value", string(data)) +} + +func (u UpdateFirewallConfigRequestBodySecurityRequest3Value) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type UpdateFirewallConfigRequestBodySecurityRequest3Value: all fields are null") +} + +type UpdateFirewallConfigRequestBodyConditions struct { + // [Parameter](https://vercel.com/docs/security/vercel-waf/rule-configuration#parameters) from the incoming traffic. + Type UpdateFirewallConfigRequestBodySecurityType `json:"type"` + // [Operator](https://vercel.com/docs/security/vercel-waf/rule-configuration#operators) used to compare the parameter with a value + Op UpdateFirewallConfigRequestBodyOp `json:"op"` + Neg *bool `json:"neg,omitempty"` + Key *string `json:"key,omitempty"` + Value *UpdateFirewallConfigRequestBodySecurityRequest3Value `json:"value,omitempty"` +} + +func (o *UpdateFirewallConfigRequestBodyConditions) GetType() UpdateFirewallConfigRequestBodySecurityType { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityType("") + } + return o.Type +} + +func (o *UpdateFirewallConfigRequestBodyConditions) GetOp() UpdateFirewallConfigRequestBodyOp { + if o == nil { + return UpdateFirewallConfigRequestBodyOp("") + } + return o.Op +} + +func (o *UpdateFirewallConfigRequestBodyConditions) GetNeg() *bool { + if o == nil { + return nil + } + return o.Neg +} + +func (o *UpdateFirewallConfigRequestBodyConditions) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *UpdateFirewallConfigRequestBodyConditions) GetValue() *UpdateFirewallConfigRequestBodySecurityRequest3Value { + if o == nil { + return nil + } + return o.Value +} + +type UpdateFirewallConfigRequestBodyConditionGroup struct { + Conditions []UpdateFirewallConfigRequestBodyConditions `json:"conditions"` +} + +func (o *UpdateFirewallConfigRequestBodyConditionGroup) GetConditions() []UpdateFirewallConfigRequestBodyConditions { + if o == nil { + return []UpdateFirewallConfigRequestBodyConditions{} + } + return o.Conditions +} + +type UpdateFirewallConfigRequestBodySecurityRequest3ValueAction string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest3ValueActionLog UpdateFirewallConfigRequestBodySecurityRequest3ValueAction = "log" + UpdateFirewallConfigRequestBodySecurityRequest3ValueActionChallenge UpdateFirewallConfigRequestBodySecurityRequest3ValueAction = "challenge" + UpdateFirewallConfigRequestBodySecurityRequest3ValueActionDeny UpdateFirewallConfigRequestBodySecurityRequest3ValueAction = "deny" + UpdateFirewallConfigRequestBodySecurityRequest3ValueActionBypass UpdateFirewallConfigRequestBodySecurityRequest3ValueAction = "bypass" + UpdateFirewallConfigRequestBodySecurityRequest3ValueActionRateLimit UpdateFirewallConfigRequestBodySecurityRequest3ValueAction = "rate_limit" + UpdateFirewallConfigRequestBodySecurityRequest3ValueActionRedirect UpdateFirewallConfigRequestBodySecurityRequest3ValueAction = "redirect" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest3ValueAction) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest3ValueAction { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest3ValueAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "log": + fallthrough + case "challenge": + fallthrough + case "deny": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = UpdateFirewallConfigRequestBodySecurityRequest3ValueAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest3ValueAction: %v", v) + } +} + +type UpdateFirewallConfigRateLimitAlgo string + +const ( + UpdateFirewallConfigRateLimitAlgoFixedWindow UpdateFirewallConfigRateLimitAlgo = "fixed_window" + UpdateFirewallConfigRateLimitAlgoTokenBucket UpdateFirewallConfigRateLimitAlgo = "token_bucket" +) + +func (e UpdateFirewallConfigRateLimitAlgo) ToPointer() *UpdateFirewallConfigRateLimitAlgo { + return &e +} +func (e *UpdateFirewallConfigRateLimitAlgo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = UpdateFirewallConfigRateLimitAlgo(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRateLimitAlgo: %v", v) + } +} + +type UpdateFirewallConfigActionSecurity1 string + +const ( + UpdateFirewallConfigActionSecurity1Log UpdateFirewallConfigActionSecurity1 = "log" + UpdateFirewallConfigActionSecurity1Challenge UpdateFirewallConfigActionSecurity1 = "challenge" + UpdateFirewallConfigActionSecurity1Deny UpdateFirewallConfigActionSecurity1 = "deny" + UpdateFirewallConfigActionSecurity1RateLimit UpdateFirewallConfigActionSecurity1 = "rate_limit" +) + +func (e UpdateFirewallConfigActionSecurity1) ToPointer() *UpdateFirewallConfigActionSecurity1 { + return &e +} +func (e *UpdateFirewallConfigActionSecurity1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "log": + fallthrough + case "challenge": + fallthrough + case "deny": + fallthrough + case "rate_limit": + *e = UpdateFirewallConfigActionSecurity1(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigActionSecurity1: %v", v) + } +} + +type UpdateFirewallConfigRateLimitSecurityActionType string + +const ( + UpdateFirewallConfigRateLimitSecurityActionTypeUpdateFirewallConfigActionSecurity1 UpdateFirewallConfigRateLimitSecurityActionType = "updateFirewallConfig_action_security_1" + UpdateFirewallConfigRateLimitSecurityActionTypeAny UpdateFirewallConfigRateLimitSecurityActionType = "any" +) + +type UpdateFirewallConfigRateLimitSecurityAction struct { + UpdateFirewallConfigActionSecurity1 *UpdateFirewallConfigActionSecurity1 + Any any + + Type UpdateFirewallConfigRateLimitSecurityActionType +} + +func CreateUpdateFirewallConfigRateLimitSecurityActionUpdateFirewallConfigActionSecurity1(updateFirewallConfigActionSecurity1 UpdateFirewallConfigActionSecurity1) UpdateFirewallConfigRateLimitSecurityAction { + typ := UpdateFirewallConfigRateLimitSecurityActionTypeUpdateFirewallConfigActionSecurity1 + + return UpdateFirewallConfigRateLimitSecurityAction{ + UpdateFirewallConfigActionSecurity1: &updateFirewallConfigActionSecurity1, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRateLimitSecurityActionAny(any any) UpdateFirewallConfigRateLimitSecurityAction { + typ := UpdateFirewallConfigRateLimitSecurityActionTypeAny + + return UpdateFirewallConfigRateLimitSecurityAction{ + Any: any, + Type: typ, + } +} + +func (u *UpdateFirewallConfigRateLimitSecurityAction) UnmarshalJSON(data []byte) error { + + var updateFirewallConfigActionSecurity1 UpdateFirewallConfigActionSecurity1 = UpdateFirewallConfigActionSecurity1("") + if err := utils.UnmarshalJSON(data, &updateFirewallConfigActionSecurity1, "", true, true); err == nil { + u.UpdateFirewallConfigActionSecurity1 = &updateFirewallConfigActionSecurity1 + u.Type = UpdateFirewallConfigRateLimitSecurityActionTypeUpdateFirewallConfigActionSecurity1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = UpdateFirewallConfigRateLimitSecurityActionTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateFirewallConfigRateLimitSecurityAction", string(data)) +} + +func (u UpdateFirewallConfigRateLimitSecurityAction) MarshalJSON() ([]byte, error) { + if u.UpdateFirewallConfigActionSecurity1 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigActionSecurity1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type UpdateFirewallConfigRateLimitSecurityAction: all fields are null") +} + +type UpdateFirewallConfigRateLimitSecurity1 struct { + Algo UpdateFirewallConfigRateLimitAlgo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` + Action *UpdateFirewallConfigRateLimitSecurityAction `json:"action,omitempty"` +} + +func (o *UpdateFirewallConfigRateLimitSecurity1) GetAlgo() UpdateFirewallConfigRateLimitAlgo { + if o == nil { + return UpdateFirewallConfigRateLimitAlgo("") + } + return o.Algo +} + +func (o *UpdateFirewallConfigRateLimitSecurity1) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *UpdateFirewallConfigRateLimitSecurity1) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *UpdateFirewallConfigRateLimitSecurity1) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +func (o *UpdateFirewallConfigRateLimitSecurity1) GetAction() *UpdateFirewallConfigRateLimitSecurityAction { + if o == nil { + return nil + } + return o.Action +} + +type UpdateFirewallConfigRequestBodyRateLimitType string + +const ( + UpdateFirewallConfigRequestBodyRateLimitTypeUpdateFirewallConfigRateLimitSecurity1 UpdateFirewallConfigRequestBodyRateLimitType = "updateFirewallConfig_rateLimit_security_1" + UpdateFirewallConfigRequestBodyRateLimitTypeAny UpdateFirewallConfigRequestBodyRateLimitType = "any" +) + +type UpdateFirewallConfigRequestBodyRateLimit struct { + UpdateFirewallConfigRateLimitSecurity1 *UpdateFirewallConfigRateLimitSecurity1 + Any any + + Type UpdateFirewallConfigRequestBodyRateLimitType +} + +func CreateUpdateFirewallConfigRequestBodyRateLimitUpdateFirewallConfigRateLimitSecurity1(updateFirewallConfigRateLimitSecurity1 UpdateFirewallConfigRateLimitSecurity1) UpdateFirewallConfigRequestBodyRateLimit { + typ := UpdateFirewallConfigRequestBodyRateLimitTypeUpdateFirewallConfigRateLimitSecurity1 + + return UpdateFirewallConfigRequestBodyRateLimit{ + UpdateFirewallConfigRateLimitSecurity1: &updateFirewallConfigRateLimitSecurity1, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyRateLimitAny(any any) UpdateFirewallConfigRequestBodyRateLimit { + typ := UpdateFirewallConfigRequestBodyRateLimitTypeAny + + return UpdateFirewallConfigRequestBodyRateLimit{ + Any: any, + Type: typ, + } +} + +func (u *UpdateFirewallConfigRequestBodyRateLimit) UnmarshalJSON(data []byte) error { + + var updateFirewallConfigRateLimitSecurity1 UpdateFirewallConfigRateLimitSecurity1 = UpdateFirewallConfigRateLimitSecurity1{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRateLimitSecurity1, "", true, true); err == nil { + u.UpdateFirewallConfigRateLimitSecurity1 = &updateFirewallConfigRateLimitSecurity1 + u.Type = UpdateFirewallConfigRequestBodyRateLimitTypeUpdateFirewallConfigRateLimitSecurity1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = UpdateFirewallConfigRequestBodyRateLimitTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateFirewallConfigRequestBodyRateLimit", string(data)) +} + +func (u UpdateFirewallConfigRequestBodyRateLimit) MarshalJSON() ([]byte, error) { + if u.UpdateFirewallConfigRateLimitSecurity1 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRateLimitSecurity1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type UpdateFirewallConfigRequestBodyRateLimit: all fields are null") +} + +type UpdateFirewallConfigRedirectSecurity1 struct { + Location string `json:"location"` + Permanent bool `json:"permanent"` +} + +func (o *UpdateFirewallConfigRedirectSecurity1) GetLocation() string { + if o == nil { + return "" + } + return o.Location +} + +func (o *UpdateFirewallConfigRedirectSecurity1) GetPermanent() bool { + if o == nil { + return false + } + return o.Permanent +} + +type UpdateFirewallConfigRequestBodyRedirectType string + +const ( + UpdateFirewallConfigRequestBodyRedirectTypeUpdateFirewallConfigRedirectSecurity1 UpdateFirewallConfigRequestBodyRedirectType = "updateFirewallConfig_redirect_security_1" + UpdateFirewallConfigRequestBodyRedirectTypeAny UpdateFirewallConfigRequestBodyRedirectType = "any" +) + +type UpdateFirewallConfigRequestBodyRedirect struct { + UpdateFirewallConfigRedirectSecurity1 *UpdateFirewallConfigRedirectSecurity1 + Any any + + Type UpdateFirewallConfigRequestBodyRedirectType +} + +func CreateUpdateFirewallConfigRequestBodyRedirectUpdateFirewallConfigRedirectSecurity1(updateFirewallConfigRedirectSecurity1 UpdateFirewallConfigRedirectSecurity1) UpdateFirewallConfigRequestBodyRedirect { + typ := UpdateFirewallConfigRequestBodyRedirectTypeUpdateFirewallConfigRedirectSecurity1 + + return UpdateFirewallConfigRequestBodyRedirect{ + UpdateFirewallConfigRedirectSecurity1: &updateFirewallConfigRedirectSecurity1, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyRedirectAny(any any) UpdateFirewallConfigRequestBodyRedirect { + typ := UpdateFirewallConfigRequestBodyRedirectTypeAny + + return UpdateFirewallConfigRequestBodyRedirect{ + Any: any, + Type: typ, + } +} + +func (u *UpdateFirewallConfigRequestBodyRedirect) UnmarshalJSON(data []byte) error { + + var updateFirewallConfigRedirectSecurity1 UpdateFirewallConfigRedirectSecurity1 = UpdateFirewallConfigRedirectSecurity1{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRedirectSecurity1, "", true, true); err == nil { + u.UpdateFirewallConfigRedirectSecurity1 = &updateFirewallConfigRedirectSecurity1 + u.Type = UpdateFirewallConfigRequestBodyRedirectTypeUpdateFirewallConfigRedirectSecurity1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = UpdateFirewallConfigRequestBodyRedirectTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateFirewallConfigRequestBodyRedirect", string(data)) +} + +func (u UpdateFirewallConfigRequestBodyRedirect) MarshalJSON() ([]byte, error) { + if u.UpdateFirewallConfigRedirectSecurity1 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRedirectSecurity1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type UpdateFirewallConfigRequestBodyRedirect: all fields are null") +} + +type UpdateFirewallConfigRequestBodyMitigate struct { + Action UpdateFirewallConfigRequestBodySecurityRequest3ValueAction `json:"action"` + RateLimit *UpdateFirewallConfigRequestBodyRateLimit `json:"rateLimit,omitempty"` + Redirect *UpdateFirewallConfigRequestBodyRedirect `json:"redirect,omitempty"` + ActionDuration *string `json:"actionDuration,omitempty"` +} + +func (o *UpdateFirewallConfigRequestBodyMitigate) GetAction() UpdateFirewallConfigRequestBodySecurityRequest3ValueAction { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest3ValueAction("") + } + return o.Action +} + +func (o *UpdateFirewallConfigRequestBodyMitigate) GetRateLimit() *UpdateFirewallConfigRequestBodyRateLimit { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *UpdateFirewallConfigRequestBodyMitigate) GetRedirect() *UpdateFirewallConfigRequestBodyRedirect { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *UpdateFirewallConfigRequestBodyMitigate) GetActionDuration() *string { + if o == nil { + return nil + } + return o.ActionDuration +} + +type UpdateFirewallConfigRequestBodySecurityRequest3Action struct { + Mitigate *UpdateFirewallConfigRequestBodyMitigate `json:"mitigate,omitempty"` +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequest3Action) GetMitigate() *UpdateFirewallConfigRequestBodyMitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type UpdateFirewallConfigRequestBodyValue struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Active bool `json:"active"` + ConditionGroup []UpdateFirewallConfigRequestBodyConditionGroup `json:"conditionGroup"` + Action UpdateFirewallConfigRequestBodySecurityRequest3Action `json:"action"` +} + +func (o *UpdateFirewallConfigRequestBodyValue) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateFirewallConfigRequestBodyValue) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *UpdateFirewallConfigRequestBodyValue) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *UpdateFirewallConfigRequestBodyValue) GetConditionGroup() []UpdateFirewallConfigRequestBodyConditionGroup { + if o == nil { + return []UpdateFirewallConfigRequestBodyConditionGroup{} + } + return o.ConditionGroup +} + +func (o *UpdateFirewallConfigRequestBodyValue) GetAction() UpdateFirewallConfigRequestBodySecurityRequest3Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest3Action{} + } + return o.Action +} + +// UpdateFirewallConfigRequestBody3 - Update a custom rule +type UpdateFirewallConfigRequestBody3 struct { + Action UpdateFirewallConfigRequestBodySecurityAction `json:"action"` + ID string `json:"id"` + Value UpdateFirewallConfigRequestBodyValue `json:"value"` +} + +func (o *UpdateFirewallConfigRequestBody3) GetAction() UpdateFirewallConfigRequestBodySecurityAction { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityAction("") + } + return o.Action +} + +func (o *UpdateFirewallConfigRequestBody3) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateFirewallConfigRequestBody3) GetValue() UpdateFirewallConfigRequestBodyValue { + if o == nil { + return UpdateFirewallConfigRequestBodyValue{} + } + return o.Value +} + +type UpdateFirewallConfigRequestBodyAction string + +const ( + UpdateFirewallConfigRequestBodyActionRulesInsert UpdateFirewallConfigRequestBodyAction = "rules.insert" +) + +func (e UpdateFirewallConfigRequestBodyAction) ToPointer() *UpdateFirewallConfigRequestBodyAction { + return &e +} +func (e *UpdateFirewallConfigRequestBodyAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "rules.insert": + *e = UpdateFirewallConfigRequestBodyAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodyAction: %v", v) + } +} + +// UpdateFirewallConfigRequestBodyType - [Parameter](https://vercel.com/docs/security/vercel-waf/rule-configuration#parameters) from the incoming traffic. +type UpdateFirewallConfigRequestBodyType string + +const ( + UpdateFirewallConfigRequestBodyTypeHost UpdateFirewallConfigRequestBodyType = "host" + UpdateFirewallConfigRequestBodyTypePath UpdateFirewallConfigRequestBodyType = "path" + UpdateFirewallConfigRequestBodyTypeMethod UpdateFirewallConfigRequestBodyType = "method" + UpdateFirewallConfigRequestBodyTypeHeader UpdateFirewallConfigRequestBodyType = "header" + UpdateFirewallConfigRequestBodyTypeQuery UpdateFirewallConfigRequestBodyType = "query" + UpdateFirewallConfigRequestBodyTypeCookie UpdateFirewallConfigRequestBodyType = "cookie" + UpdateFirewallConfigRequestBodyTypeTargetPath UpdateFirewallConfigRequestBodyType = "target_path" + UpdateFirewallConfigRequestBodyTypeRawPath UpdateFirewallConfigRequestBodyType = "raw_path" + UpdateFirewallConfigRequestBodyTypeIPAddress UpdateFirewallConfigRequestBodyType = "ip_address" + UpdateFirewallConfigRequestBodyTypeRegion UpdateFirewallConfigRequestBodyType = "region" + UpdateFirewallConfigRequestBodyTypeProtocol UpdateFirewallConfigRequestBodyType = "protocol" + UpdateFirewallConfigRequestBodyTypeScheme UpdateFirewallConfigRequestBodyType = "scheme" + UpdateFirewallConfigRequestBodyTypeEnvironment UpdateFirewallConfigRequestBodyType = "environment" + UpdateFirewallConfigRequestBodyTypeUserAgent UpdateFirewallConfigRequestBodyType = "user_agent" + UpdateFirewallConfigRequestBodyTypeGeoContinent UpdateFirewallConfigRequestBodyType = "geo_continent" + UpdateFirewallConfigRequestBodyTypeGeoCountry UpdateFirewallConfigRequestBodyType = "geo_country" + UpdateFirewallConfigRequestBodyTypeGeoCountryRegion UpdateFirewallConfigRequestBodyType = "geo_country_region" + UpdateFirewallConfigRequestBodyTypeGeoCity UpdateFirewallConfigRequestBodyType = "geo_city" + UpdateFirewallConfigRequestBodyTypeGeoAsNumber UpdateFirewallConfigRequestBodyType = "geo_as_number" + UpdateFirewallConfigRequestBodyTypeJa4Digest UpdateFirewallConfigRequestBodyType = "ja4_digest" + UpdateFirewallConfigRequestBodyTypeJa3Digest UpdateFirewallConfigRequestBodyType = "ja3_digest" + UpdateFirewallConfigRequestBodyTypeRateLimitAPIID UpdateFirewallConfigRequestBodyType = "rate_limit_api_id" +) + +func (e UpdateFirewallConfigRequestBodyType) ToPointer() *UpdateFirewallConfigRequestBodyType { + return &e +} +func (e *UpdateFirewallConfigRequestBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "host": + fallthrough + case "path": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "query": + fallthrough + case "cookie": + fallthrough + case "target_path": + fallthrough + case "raw_path": + fallthrough + case "ip_address": + fallthrough + case "region": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "user_agent": + fallthrough + case "geo_continent": + fallthrough + case "geo_country": + fallthrough + case "geo_country_region": + fallthrough + case "geo_city": + fallthrough + case "geo_as_number": + fallthrough + case "ja4_digest": + fallthrough + case "ja3_digest": + fallthrough + case "rate_limit_api_id": + *e = UpdateFirewallConfigRequestBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodyType: %v", v) + } +} + +// RequestBodyOp - [Operator](https://vercel.com/docs/security/vercel-waf/rule-configuration#operators) used to compare the parameter with a value. +type RequestBodyOp string + +const ( + RequestBodyOpRe RequestBodyOp = "re" + RequestBodyOpEq RequestBodyOp = "eq" + RequestBodyOpNeq RequestBodyOp = "neq" + RequestBodyOpEx RequestBodyOp = "ex" + RequestBodyOpNex RequestBodyOp = "nex" + RequestBodyOpInc RequestBodyOp = "inc" + RequestBodyOpNinc RequestBodyOp = "ninc" + RequestBodyOpPre RequestBodyOp = "pre" + RequestBodyOpSuf RequestBodyOp = "suf" + RequestBodyOpSub RequestBodyOp = "sub" + RequestBodyOpGt RequestBodyOp = "gt" + RequestBodyOpGte RequestBodyOp = "gte" + RequestBodyOpLt RequestBodyOp = "lt" + RequestBodyOpLte RequestBodyOp = "lte" +) + +func (e RequestBodyOp) ToPointer() *RequestBodyOp { + return &e +} +func (e *RequestBodyOp) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "re": + fallthrough + case "eq": + fallthrough + case "neq": + fallthrough + case "ex": + fallthrough + case "nex": + fallthrough + case "inc": + fallthrough + case "ninc": + fallthrough + case "pre": + fallthrough + case "suf": + fallthrough + case "sub": + fallthrough + case "gt": + fallthrough + case "gte": + fallthrough + case "lt": + fallthrough + case "lte": + *e = RequestBodyOp(v) + return nil + default: + return fmt.Errorf("invalid value for RequestBodyOp: %v", v) + } +} + +type UpdateFirewallConfigRequestBodySecurityRequest2ValueType string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeStr UpdateFirewallConfigRequestBodySecurityRequest2ValueType = "str" + UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeArrayOfStr UpdateFirewallConfigRequestBodySecurityRequest2ValueType = "arrayOfStr" + UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeNumber UpdateFirewallConfigRequestBodySecurityRequest2ValueType = "number" +) + +type UpdateFirewallConfigRequestBodySecurityRequest2Value struct { + Str *string + ArrayOfStr []string + Number *float64 + + Type UpdateFirewallConfigRequestBodySecurityRequest2ValueType +} + +func CreateUpdateFirewallConfigRequestBodySecurityRequest2ValueStr(str string) UpdateFirewallConfigRequestBodySecurityRequest2Value { + typ := UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeStr + + return UpdateFirewallConfigRequestBodySecurityRequest2Value{ + Str: &str, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodySecurityRequest2ValueArrayOfStr(arrayOfStr []string) UpdateFirewallConfigRequestBodySecurityRequest2Value { + typ := UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeArrayOfStr + + return UpdateFirewallConfigRequestBodySecurityRequest2Value{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodySecurityRequest2ValueNumber(number float64) UpdateFirewallConfigRequestBodySecurityRequest2Value { + typ := UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeNumber + + return UpdateFirewallConfigRequestBodySecurityRequest2Value{ + Number: &number, + Type: typ, + } +} + +func (u *UpdateFirewallConfigRequestBodySecurityRequest2Value) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeArrayOfStr + return nil + } + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = UpdateFirewallConfigRequestBodySecurityRequest2ValueTypeNumber + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateFirewallConfigRequestBodySecurityRequest2Value", string(data)) +} + +func (u UpdateFirewallConfigRequestBodySecurityRequest2Value) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + return nil, errors.New("could not marshal union type UpdateFirewallConfigRequestBodySecurityRequest2Value: all fields are null") +} + +type RequestBodyConditions struct { + // [Parameter](https://vercel.com/docs/security/vercel-waf/rule-configuration#parameters) from the incoming traffic. + Type UpdateFirewallConfigRequestBodyType `json:"type"` + // [Operator](https://vercel.com/docs/security/vercel-waf/rule-configuration#operators) used to compare the parameter with a value. + Op RequestBodyOp `json:"op"` + Neg *bool `json:"neg,omitempty"` + Key *string `json:"key,omitempty"` + Value *UpdateFirewallConfigRequestBodySecurityRequest2Value `json:"value,omitempty"` +} + +func (o *RequestBodyConditions) GetType() UpdateFirewallConfigRequestBodyType { + if o == nil { + return UpdateFirewallConfigRequestBodyType("") + } + return o.Type +} + +func (o *RequestBodyConditions) GetOp() RequestBodyOp { + if o == nil { + return RequestBodyOp("") + } + return o.Op +} + +func (o *RequestBodyConditions) GetNeg() *bool { + if o == nil { + return nil + } + return o.Neg +} + +func (o *RequestBodyConditions) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *RequestBodyConditions) GetValue() *UpdateFirewallConfigRequestBodySecurityRequest2Value { + if o == nil { + return nil + } + return o.Value +} + +type RequestBodyConditionGroup struct { + Conditions []RequestBodyConditions `json:"conditions"` +} + +func (o *RequestBodyConditionGroup) GetConditions() []RequestBodyConditions { + if o == nil { + return []RequestBodyConditions{} + } + return o.Conditions +} + +type UpdateFirewallConfigRequestBodySecurityRequest2ValueAction string + +const ( + UpdateFirewallConfigRequestBodySecurityRequest2ValueActionLog UpdateFirewallConfigRequestBodySecurityRequest2ValueAction = "log" + UpdateFirewallConfigRequestBodySecurityRequest2ValueActionChallenge UpdateFirewallConfigRequestBodySecurityRequest2ValueAction = "challenge" + UpdateFirewallConfigRequestBodySecurityRequest2ValueActionDeny UpdateFirewallConfigRequestBodySecurityRequest2ValueAction = "deny" + UpdateFirewallConfigRequestBodySecurityRequest2ValueActionBypass UpdateFirewallConfigRequestBodySecurityRequest2ValueAction = "bypass" + UpdateFirewallConfigRequestBodySecurityRequest2ValueActionRateLimit UpdateFirewallConfigRequestBodySecurityRequest2ValueAction = "rate_limit" + UpdateFirewallConfigRequestBodySecurityRequest2ValueActionRedirect UpdateFirewallConfigRequestBodySecurityRequest2ValueAction = "redirect" +) + +func (e UpdateFirewallConfigRequestBodySecurityRequest2ValueAction) ToPointer() *UpdateFirewallConfigRequestBodySecurityRequest2ValueAction { + return &e +} +func (e *UpdateFirewallConfigRequestBodySecurityRequest2ValueAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "log": + fallthrough + case "challenge": + fallthrough + case "deny": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = UpdateFirewallConfigRequestBodySecurityRequest2ValueAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigRequestBodySecurityRequest2ValueAction: %v", v) + } +} + +type RateLimitAlgo string + +const ( + RateLimitAlgoFixedWindow RateLimitAlgo = "fixed_window" + RateLimitAlgoTokenBucket RateLimitAlgo = "token_bucket" +) + +func (e RateLimitAlgo) ToPointer() *RateLimitAlgo { + return &e +} +func (e *RateLimitAlgo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = RateLimitAlgo(v) + return nil + default: + return fmt.Errorf("invalid value for RateLimitAlgo: %v", v) + } +} + +type UpdateFirewallConfigAction1 string + +const ( + UpdateFirewallConfigAction1Log UpdateFirewallConfigAction1 = "log" + UpdateFirewallConfigAction1Challenge UpdateFirewallConfigAction1 = "challenge" + UpdateFirewallConfigAction1Deny UpdateFirewallConfigAction1 = "deny" + UpdateFirewallConfigAction1RateLimit UpdateFirewallConfigAction1 = "rate_limit" +) + +func (e UpdateFirewallConfigAction1) ToPointer() *UpdateFirewallConfigAction1 { + return &e +} +func (e *UpdateFirewallConfigAction1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "log": + fallthrough + case "challenge": + fallthrough + case "deny": + fallthrough + case "rate_limit": + *e = UpdateFirewallConfigAction1(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateFirewallConfigAction1: %v", v) + } +} + +type UpdateFirewallConfigRateLimitActionType string + +const ( + UpdateFirewallConfigRateLimitActionTypeUpdateFirewallConfigAction1 UpdateFirewallConfigRateLimitActionType = "updateFirewallConfig_action_1" + UpdateFirewallConfigRateLimitActionTypeAny UpdateFirewallConfigRateLimitActionType = "any" +) + +type UpdateFirewallConfigRateLimitAction struct { + UpdateFirewallConfigAction1 *UpdateFirewallConfigAction1 + Any any + + Type UpdateFirewallConfigRateLimitActionType +} + +func CreateUpdateFirewallConfigRateLimitActionUpdateFirewallConfigAction1(updateFirewallConfigAction1 UpdateFirewallConfigAction1) UpdateFirewallConfigRateLimitAction { + typ := UpdateFirewallConfigRateLimitActionTypeUpdateFirewallConfigAction1 + + return UpdateFirewallConfigRateLimitAction{ + UpdateFirewallConfigAction1: &updateFirewallConfigAction1, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRateLimitActionAny(any any) UpdateFirewallConfigRateLimitAction { + typ := UpdateFirewallConfigRateLimitActionTypeAny + + return UpdateFirewallConfigRateLimitAction{ + Any: any, + Type: typ, + } +} + +func (u *UpdateFirewallConfigRateLimitAction) UnmarshalJSON(data []byte) error { + + var updateFirewallConfigAction1 UpdateFirewallConfigAction1 = UpdateFirewallConfigAction1("") + if err := utils.UnmarshalJSON(data, &updateFirewallConfigAction1, "", true, true); err == nil { + u.UpdateFirewallConfigAction1 = &updateFirewallConfigAction1 + u.Type = UpdateFirewallConfigRateLimitActionTypeUpdateFirewallConfigAction1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = UpdateFirewallConfigRateLimitActionTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateFirewallConfigRateLimitAction", string(data)) +} + +func (u UpdateFirewallConfigRateLimitAction) MarshalJSON() ([]byte, error) { + if u.UpdateFirewallConfigAction1 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigAction1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type UpdateFirewallConfigRateLimitAction: all fields are null") +} + +type UpdateFirewallConfigRateLimit1 struct { + Algo RateLimitAlgo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` + Action *UpdateFirewallConfigRateLimitAction `json:"action,omitempty"` +} + +func (o *UpdateFirewallConfigRateLimit1) GetAlgo() RateLimitAlgo { + if o == nil { + return RateLimitAlgo("") + } + return o.Algo +} + +func (o *UpdateFirewallConfigRateLimit1) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *UpdateFirewallConfigRateLimit1) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *UpdateFirewallConfigRateLimit1) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +func (o *UpdateFirewallConfigRateLimit1) GetAction() *UpdateFirewallConfigRateLimitAction { + if o == nil { + return nil + } + return o.Action +} + +type RequestBodyRateLimitType string + +const ( + RequestBodyRateLimitTypeUpdateFirewallConfigRateLimit1 RequestBodyRateLimitType = "updateFirewallConfig_rateLimit_1" + RequestBodyRateLimitTypeAny RequestBodyRateLimitType = "any" +) + +type RequestBodyRateLimit struct { + UpdateFirewallConfigRateLimit1 *UpdateFirewallConfigRateLimit1 + Any any + + Type RequestBodyRateLimitType +} + +func CreateRequestBodyRateLimitUpdateFirewallConfigRateLimit1(updateFirewallConfigRateLimit1 UpdateFirewallConfigRateLimit1) RequestBodyRateLimit { + typ := RequestBodyRateLimitTypeUpdateFirewallConfigRateLimit1 + + return RequestBodyRateLimit{ + UpdateFirewallConfigRateLimit1: &updateFirewallConfigRateLimit1, + Type: typ, + } +} + +func CreateRequestBodyRateLimitAny(any any) RequestBodyRateLimit { + typ := RequestBodyRateLimitTypeAny + + return RequestBodyRateLimit{ + Any: any, + Type: typ, + } +} + +func (u *RequestBodyRateLimit) UnmarshalJSON(data []byte) error { + + var updateFirewallConfigRateLimit1 UpdateFirewallConfigRateLimit1 = UpdateFirewallConfigRateLimit1{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRateLimit1, "", true, true); err == nil { + u.UpdateFirewallConfigRateLimit1 = &updateFirewallConfigRateLimit1 + u.Type = RequestBodyRateLimitTypeUpdateFirewallConfigRateLimit1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = RequestBodyRateLimitTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RequestBodyRateLimit", string(data)) +} + +func (u RequestBodyRateLimit) MarshalJSON() ([]byte, error) { + if u.UpdateFirewallConfigRateLimit1 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRateLimit1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type RequestBodyRateLimit: all fields are null") +} + +type UpdateFirewallConfigRedirect1 struct { + Location string `json:"location"` + Permanent bool `json:"permanent"` +} + +func (o *UpdateFirewallConfigRedirect1) GetLocation() string { + if o == nil { + return "" + } + return o.Location +} + +func (o *UpdateFirewallConfigRedirect1) GetPermanent() bool { + if o == nil { + return false + } + return o.Permanent +} + +type RequestBodyRedirectType string + +const ( + RequestBodyRedirectTypeUpdateFirewallConfigRedirect1 RequestBodyRedirectType = "updateFirewallConfig_redirect_1" + RequestBodyRedirectTypeAny RequestBodyRedirectType = "any" +) + +type RequestBodyRedirect struct { + UpdateFirewallConfigRedirect1 *UpdateFirewallConfigRedirect1 + Any any + + Type RequestBodyRedirectType +} + +func CreateRequestBodyRedirectUpdateFirewallConfigRedirect1(updateFirewallConfigRedirect1 UpdateFirewallConfigRedirect1) RequestBodyRedirect { + typ := RequestBodyRedirectTypeUpdateFirewallConfigRedirect1 + + return RequestBodyRedirect{ + UpdateFirewallConfigRedirect1: &updateFirewallConfigRedirect1, + Type: typ, + } +} + +func CreateRequestBodyRedirectAny(any any) RequestBodyRedirect { + typ := RequestBodyRedirectTypeAny + + return RequestBodyRedirect{ + Any: any, + Type: typ, + } +} + +func (u *RequestBodyRedirect) UnmarshalJSON(data []byte) error { + + var updateFirewallConfigRedirect1 UpdateFirewallConfigRedirect1 = UpdateFirewallConfigRedirect1{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRedirect1, "", true, true); err == nil { + u.UpdateFirewallConfigRedirect1 = &updateFirewallConfigRedirect1 + u.Type = RequestBodyRedirectTypeUpdateFirewallConfigRedirect1 + return nil + } + + var any any = nil + if err := utils.UnmarshalJSON(data, &any, "", true, true); err == nil { + u.Any = any + u.Type = RequestBodyRedirectTypeAny + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for RequestBodyRedirect", string(data)) +} + +func (u RequestBodyRedirect) MarshalJSON() ([]byte, error) { + if u.UpdateFirewallConfigRedirect1 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRedirect1, "", true) + } + + if u.Any != nil { + return utils.MarshalJSON(u.Any, "", true) + } + + return nil, errors.New("could not marshal union type RequestBodyRedirect: all fields are null") +} + +type RequestBodyMitigate struct { + Action UpdateFirewallConfigRequestBodySecurityRequest2ValueAction `json:"action"` + RateLimit *RequestBodyRateLimit `json:"rateLimit,omitempty"` + Redirect *RequestBodyRedirect `json:"redirect,omitempty"` + ActionDuration *string `json:"actionDuration,omitempty"` +} + +func (o *RequestBodyMitigate) GetAction() UpdateFirewallConfigRequestBodySecurityRequest2ValueAction { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest2ValueAction("") + } + return o.Action +} + +func (o *RequestBodyMitigate) GetRateLimit() *RequestBodyRateLimit { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *RequestBodyMitigate) GetRedirect() *RequestBodyRedirect { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *RequestBodyMitigate) GetActionDuration() *string { + if o == nil { + return nil + } + return o.ActionDuration +} + +type UpdateFirewallConfigRequestBodySecurityRequest2Action struct { + Mitigate *RequestBodyMitigate `json:"mitigate,omitempty"` +} + +func (o *UpdateFirewallConfigRequestBodySecurityRequest2Action) GetMitigate() *RequestBodyMitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type RequestBodyValue struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Active bool `json:"active"` + ConditionGroup []RequestBodyConditionGroup `json:"conditionGroup"` + Action UpdateFirewallConfigRequestBodySecurityRequest2Action `json:"action"` +} + +func (o *RequestBodyValue) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *RequestBodyValue) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *RequestBodyValue) GetActive() bool { + if o == nil { + return false + } + return o.Active +} + +func (o *RequestBodyValue) GetConditionGroup() []RequestBodyConditionGroup { + if o == nil { + return []RequestBodyConditionGroup{} + } + return o.ConditionGroup +} + +func (o *RequestBodyValue) GetAction() UpdateFirewallConfigRequestBodySecurityRequest2Action { + if o == nil { + return UpdateFirewallConfigRequestBodySecurityRequest2Action{} + } + return o.Action +} + +// UpdateFirewallConfigRequestBody2 - Add a custom rule +type UpdateFirewallConfigRequestBody2 struct { + Action UpdateFirewallConfigRequestBodyAction `json:"action"` + ID any `json:"id,omitempty"` + Value RequestBodyValue `json:"value"` +} + +func (o *UpdateFirewallConfigRequestBody2) GetAction() UpdateFirewallConfigRequestBodyAction { + if o == nil { + return UpdateFirewallConfigRequestBodyAction("") + } + return o.Action +} + +func (o *UpdateFirewallConfigRequestBody2) GetID() any { + if o == nil { + return nil + } + return o.ID +} + +func (o *UpdateFirewallConfigRequestBody2) GetValue() RequestBodyValue { + if o == nil { + return RequestBodyValue{} + } + return o.Value +} + +type RequestBodyAction string + +const ( + RequestBodyActionFirewallEnabled RequestBodyAction = "firewallEnabled" +) + +func (e RequestBodyAction) ToPointer() *RequestBodyAction { + return &e +} +func (e *RequestBodyAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "firewallEnabled": + *e = RequestBodyAction(v) + return nil + default: + return fmt.Errorf("invalid value for RequestBodyAction: %v", v) + } +} + +// UpdateFirewallConfigRequestBody1 - Enable Firewall +type UpdateFirewallConfigRequestBody1 struct { + Action RequestBodyAction `json:"action"` + ID any `json:"id,omitempty"` + Value bool `json:"value"` +} + +func (o *UpdateFirewallConfigRequestBody1) GetAction() RequestBodyAction { + if o == nil { + return RequestBodyAction("") + } + return o.Action +} + +func (o *UpdateFirewallConfigRequestBody1) GetID() any { + if o == nil { + return nil + } + return o.ID +} + +func (o *UpdateFirewallConfigRequestBody1) GetValue() bool { + if o == nil { + return false + } + return o.Value +} + +type UpdateFirewallConfigRequestBodyUnionType string + +const ( + UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody1 UpdateFirewallConfigRequestBodyUnionType = "updateFirewallConfig_requestBody_1" + UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody2 UpdateFirewallConfigRequestBodyUnionType = "updateFirewallConfig_requestBody_2" + UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody3 UpdateFirewallConfigRequestBodyUnionType = "updateFirewallConfig_requestBody_3" + UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody4 UpdateFirewallConfigRequestBodyUnionType = "updateFirewallConfig_requestBody_4" + UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody5 UpdateFirewallConfigRequestBodyUnionType = "updateFirewallConfig_requestBody_5" + UpdateFirewallConfigRequestBodyUnionTypeRequestBody6 UpdateFirewallConfigRequestBodyUnionType = "requestBody_6" + UpdateFirewallConfigRequestBodyUnionTypeRequestBody7 UpdateFirewallConfigRequestBodyUnionType = "requestBody_7" + UpdateFirewallConfigRequestBodyUnionTypeRequestBody8 UpdateFirewallConfigRequestBodyUnionType = "requestBody_8" + UpdateFirewallConfigRequestBodyUnionTypeRequestBody9 UpdateFirewallConfigRequestBodyUnionType = "requestBody_9" + UpdateFirewallConfigRequestBodyUnionTypeRequestBody10 UpdateFirewallConfigRequestBodyUnionType = "requestBody_10" + UpdateFirewallConfigRequestBodyUnionTypeEleven UpdateFirewallConfigRequestBodyUnionType = "11" +) + +type UpdateFirewallConfigRequestBody struct { + UpdateFirewallConfigRequestBody1 *UpdateFirewallConfigRequestBody1 + UpdateFirewallConfigRequestBody2 *UpdateFirewallConfigRequestBody2 + UpdateFirewallConfigRequestBody3 *UpdateFirewallConfigRequestBody3 + UpdateFirewallConfigRequestBody4 *UpdateFirewallConfigRequestBody4 + UpdateFirewallConfigRequestBody5 *UpdateFirewallConfigRequestBody5 + RequestBody6 *RequestBody6 + RequestBody7 *RequestBody7 + RequestBody8 *RequestBody8 + RequestBody9 *RequestBody9 + RequestBody10 *RequestBody10 + Eleven *Eleven + + Type UpdateFirewallConfigRequestBodyUnionType +} + +func CreateUpdateFirewallConfigRequestBodyUpdateFirewallConfigRequestBody1(updateFirewallConfigRequestBody1 UpdateFirewallConfigRequestBody1) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody1 + + return UpdateFirewallConfigRequestBody{ + UpdateFirewallConfigRequestBody1: &updateFirewallConfigRequestBody1, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyUpdateFirewallConfigRequestBody2(updateFirewallConfigRequestBody2 UpdateFirewallConfigRequestBody2) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody2 + + return UpdateFirewallConfigRequestBody{ + UpdateFirewallConfigRequestBody2: &updateFirewallConfigRequestBody2, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyUpdateFirewallConfigRequestBody3(updateFirewallConfigRequestBody3 UpdateFirewallConfigRequestBody3) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody3 + + return UpdateFirewallConfigRequestBody{ + UpdateFirewallConfigRequestBody3: &updateFirewallConfigRequestBody3, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyUpdateFirewallConfigRequestBody4(updateFirewallConfigRequestBody4 UpdateFirewallConfigRequestBody4) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody4 + + return UpdateFirewallConfigRequestBody{ + UpdateFirewallConfigRequestBody4: &updateFirewallConfigRequestBody4, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyUpdateFirewallConfigRequestBody5(updateFirewallConfigRequestBody5 UpdateFirewallConfigRequestBody5) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody5 + + return UpdateFirewallConfigRequestBody{ + UpdateFirewallConfigRequestBody5: &updateFirewallConfigRequestBody5, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyRequestBody6(requestBody6 RequestBody6) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeRequestBody6 + + return UpdateFirewallConfigRequestBody{ + RequestBody6: &requestBody6, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyRequestBody7(requestBody7 RequestBody7) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeRequestBody7 + + return UpdateFirewallConfigRequestBody{ + RequestBody7: &requestBody7, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyRequestBody8(requestBody8 RequestBody8) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeRequestBody8 + + return UpdateFirewallConfigRequestBody{ + RequestBody8: &requestBody8, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyRequestBody9(requestBody9 RequestBody9) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeRequestBody9 + + return UpdateFirewallConfigRequestBody{ + RequestBody9: &requestBody9, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyRequestBody10(requestBody10 RequestBody10) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeRequestBody10 + + return UpdateFirewallConfigRequestBody{ + RequestBody10: &requestBody10, + Type: typ, + } +} + +func CreateUpdateFirewallConfigRequestBodyEleven(eleven Eleven) UpdateFirewallConfigRequestBody { + typ := UpdateFirewallConfigRequestBodyUnionTypeEleven + + return UpdateFirewallConfigRequestBody{ + Eleven: &eleven, + Type: typ, + } +} + +func (u *UpdateFirewallConfigRequestBody) UnmarshalJSON(data []byte) error { + + var updateFirewallConfigRequestBody1 UpdateFirewallConfigRequestBody1 = UpdateFirewallConfigRequestBody1{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRequestBody1, "", true, true); err == nil { + u.UpdateFirewallConfigRequestBody1 = &updateFirewallConfigRequestBody1 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody1 + return nil + } + + var updateFirewallConfigRequestBody2 UpdateFirewallConfigRequestBody2 = UpdateFirewallConfigRequestBody2{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRequestBody2, "", true, true); err == nil { + u.UpdateFirewallConfigRequestBody2 = &updateFirewallConfigRequestBody2 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody2 + return nil + } + + var updateFirewallConfigRequestBody3 UpdateFirewallConfigRequestBody3 = UpdateFirewallConfigRequestBody3{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRequestBody3, "", true, true); err == nil { + u.UpdateFirewallConfigRequestBody3 = &updateFirewallConfigRequestBody3 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody3 + return nil + } + + var updateFirewallConfigRequestBody4 UpdateFirewallConfigRequestBody4 = UpdateFirewallConfigRequestBody4{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRequestBody4, "", true, true); err == nil { + u.UpdateFirewallConfigRequestBody4 = &updateFirewallConfigRequestBody4 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody4 + return nil + } + + var updateFirewallConfigRequestBody5 UpdateFirewallConfigRequestBody5 = UpdateFirewallConfigRequestBody5{} + if err := utils.UnmarshalJSON(data, &updateFirewallConfigRequestBody5, "", true, true); err == nil { + u.UpdateFirewallConfigRequestBody5 = &updateFirewallConfigRequestBody5 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeUpdateFirewallConfigRequestBody5 + return nil + } + + var requestBody6 RequestBody6 = RequestBody6{} + if err := utils.UnmarshalJSON(data, &requestBody6, "", true, true); err == nil { + u.RequestBody6 = &requestBody6 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeRequestBody6 + return nil + } + + var requestBody7 RequestBody7 = RequestBody7{} + if err := utils.UnmarshalJSON(data, &requestBody7, "", true, true); err == nil { + u.RequestBody7 = &requestBody7 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeRequestBody7 + return nil + } + + var requestBody8 RequestBody8 = RequestBody8{} + if err := utils.UnmarshalJSON(data, &requestBody8, "", true, true); err == nil { + u.RequestBody8 = &requestBody8 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeRequestBody8 + return nil + } + + var requestBody9 RequestBody9 = RequestBody9{} + if err := utils.UnmarshalJSON(data, &requestBody9, "", true, true); err == nil { + u.RequestBody9 = &requestBody9 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeRequestBody9 + return nil + } + + var requestBody10 RequestBody10 = RequestBody10{} + if err := utils.UnmarshalJSON(data, &requestBody10, "", true, true); err == nil { + u.RequestBody10 = &requestBody10 + u.Type = UpdateFirewallConfigRequestBodyUnionTypeRequestBody10 + return nil + } + + var eleven Eleven = Eleven{} + if err := utils.UnmarshalJSON(data, &eleven, "", true, true); err == nil { + u.Eleven = &eleven + u.Type = UpdateFirewallConfigRequestBodyUnionTypeEleven + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateFirewallConfigRequestBody", string(data)) +} + +func (u UpdateFirewallConfigRequestBody) MarshalJSON() ([]byte, error) { + if u.UpdateFirewallConfigRequestBody1 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRequestBody1, "", true) + } + + if u.UpdateFirewallConfigRequestBody2 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRequestBody2, "", true) + } + + if u.UpdateFirewallConfigRequestBody3 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRequestBody3, "", true) + } + + if u.UpdateFirewallConfigRequestBody4 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRequestBody4, "", true) + } + + if u.UpdateFirewallConfigRequestBody5 != nil { + return utils.MarshalJSON(u.UpdateFirewallConfigRequestBody5, "", true) + } + + if u.RequestBody6 != nil { + return utils.MarshalJSON(u.RequestBody6, "", true) + } + + if u.RequestBody7 != nil { + return utils.MarshalJSON(u.RequestBody7, "", true) + } + + if u.RequestBody8 != nil { + return utils.MarshalJSON(u.RequestBody8, "", true) + } + + if u.RequestBody9 != nil { + return utils.MarshalJSON(u.RequestBody9, "", true) + } + + if u.RequestBody10 != nil { + return utils.MarshalJSON(u.RequestBody10, "", true) + } + + if u.Eleven != nil { + return utils.MarshalJSON(u.Eleven, "", true) + } + + return nil, errors.New("could not marshal union type UpdateFirewallConfigRequestBody: all fields are null") +} + +type UpdateFirewallConfigRequest struct { + ProjectID string `queryParam:"style=form,explode=true,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateFirewallConfigRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateFirewallConfigRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateFirewallConfigRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateFirewallConfigRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateFirewallConfigRequest) GetRequestBody() UpdateFirewallConfigRequestBody { + if o == nil { + return UpdateFirewallConfigRequestBody{} + } + return o.RequestBody +} + +type UpdateFirewallConfigResponseBody struct { +} + +type UpdateFirewallConfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateFirewallConfigResponseBody +} + +func (o *UpdateFirewallConfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateFirewallConfigResponse) GetObject() *UpdateFirewallConfigResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateinvoice.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateinvoice.go new file mode 100644 index 00000000..1339f33e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateinvoice.go @@ -0,0 +1,99 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +type Action string + +const ( + ActionRefund Action = "refund" +) + +func (e Action) ToPointer() *Action { + return &e +} +func (e *Action) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "refund": + *e = Action(v) + return nil + default: + return fmt.Errorf("invalid value for Action: %v", v) + } +} + +type UpdateInvoiceRequestBody struct { + Action Action `json:"action"` + // Refund reason. + Reason string `json:"reason"` + // The total amount to be refunded. Must be less than or equal to the total amount of the invoice. + Total string `json:"total"` +} + +func (o *UpdateInvoiceRequestBody) GetAction() Action { + if o == nil { + return Action("") + } + return o.Action +} + +func (o *UpdateInvoiceRequestBody) GetReason() string { + if o == nil { + return "" + } + return o.Reason +} + +func (o *UpdateInvoiceRequestBody) GetTotal() string { + if o == nil { + return "" + } + return o.Total +} + +type UpdateInvoiceRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` + InvoiceID string `pathParam:"style=simple,explode=false,name=invoiceId"` + RequestBody UpdateInvoiceRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateInvoiceRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +func (o *UpdateInvoiceRequest) GetInvoiceID() string { + if o == nil { + return "" + } + return o.InvoiceID +} + +func (o *UpdateInvoiceRequest) GetRequestBody() UpdateInvoiceRequestBody { + if o == nil { + return UpdateInvoiceRequestBody{} + } + return o.RequestBody +} + +type UpdateInvoiceResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *UpdateInvoiceResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateproject.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateproject.go new file mode 100644 index 00000000..914e36a4 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateproject.go @@ -0,0 +1,8394 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// UpdateProjectFramework - The framework that is being used for this project. When `null` is used no framework is selected +type UpdateProjectFramework string + +const ( + UpdateProjectFrameworkBlitzjs UpdateProjectFramework = "blitzjs" + UpdateProjectFrameworkNextjs UpdateProjectFramework = "nextjs" + UpdateProjectFrameworkGatsby UpdateProjectFramework = "gatsby" + UpdateProjectFrameworkRemix UpdateProjectFramework = "remix" + UpdateProjectFrameworkAstro UpdateProjectFramework = "astro" + UpdateProjectFrameworkHexo UpdateProjectFramework = "hexo" + UpdateProjectFrameworkEleventy UpdateProjectFramework = "eleventy" + UpdateProjectFrameworkDocusaurus2 UpdateProjectFramework = "docusaurus-2" + UpdateProjectFrameworkDocusaurus UpdateProjectFramework = "docusaurus" + UpdateProjectFrameworkPreact UpdateProjectFramework = "preact" + UpdateProjectFrameworkSolidstart1 UpdateProjectFramework = "solidstart-1" + UpdateProjectFrameworkSolidstart UpdateProjectFramework = "solidstart" + UpdateProjectFrameworkDojo UpdateProjectFramework = "dojo" + UpdateProjectFrameworkEmber UpdateProjectFramework = "ember" + UpdateProjectFrameworkVue UpdateProjectFramework = "vue" + UpdateProjectFrameworkScully UpdateProjectFramework = "scully" + UpdateProjectFrameworkIonicAngular UpdateProjectFramework = "ionic-angular" + UpdateProjectFrameworkAngular UpdateProjectFramework = "angular" + UpdateProjectFrameworkPolymer UpdateProjectFramework = "polymer" + UpdateProjectFrameworkSvelte UpdateProjectFramework = "svelte" + UpdateProjectFrameworkSveltekit UpdateProjectFramework = "sveltekit" + UpdateProjectFrameworkSveltekit1 UpdateProjectFramework = "sveltekit-1" + UpdateProjectFrameworkIonicReact UpdateProjectFramework = "ionic-react" + UpdateProjectFrameworkCreateReactApp UpdateProjectFramework = "create-react-app" + UpdateProjectFrameworkGridsome UpdateProjectFramework = "gridsome" + UpdateProjectFrameworkUmijs UpdateProjectFramework = "umijs" + UpdateProjectFrameworkSapper UpdateProjectFramework = "sapper" + UpdateProjectFrameworkSaber UpdateProjectFramework = "saber" + UpdateProjectFrameworkStencil UpdateProjectFramework = "stencil" + UpdateProjectFrameworkNuxtjs UpdateProjectFramework = "nuxtjs" + UpdateProjectFrameworkRedwoodjs UpdateProjectFramework = "redwoodjs" + UpdateProjectFrameworkHugo UpdateProjectFramework = "hugo" + UpdateProjectFrameworkJekyll UpdateProjectFramework = "jekyll" + UpdateProjectFrameworkBrunch UpdateProjectFramework = "brunch" + UpdateProjectFrameworkMiddleman UpdateProjectFramework = "middleman" + UpdateProjectFrameworkZola UpdateProjectFramework = "zola" + UpdateProjectFrameworkHydrogen UpdateProjectFramework = "hydrogen" + UpdateProjectFrameworkVite UpdateProjectFramework = "vite" + UpdateProjectFrameworkVitepress UpdateProjectFramework = "vitepress" + UpdateProjectFrameworkVuepress UpdateProjectFramework = "vuepress" + UpdateProjectFrameworkParcel UpdateProjectFramework = "parcel" + UpdateProjectFrameworkFasthtml UpdateProjectFramework = "fasthtml" + UpdateProjectFrameworkSanityV3 UpdateProjectFramework = "sanity-v3" + UpdateProjectFrameworkSanity UpdateProjectFramework = "sanity" + UpdateProjectFrameworkStorybook UpdateProjectFramework = "storybook" +) + +func (e UpdateProjectFramework) ToPointer() *UpdateProjectFramework { + return &e +} +func (e *UpdateProjectFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = UpdateProjectFramework(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectFramework: %v", v) + } +} + +type UpdateProjectNodeVersion string + +const ( + UpdateProjectNodeVersionTwentyTwoX UpdateProjectNodeVersion = "22.x" + UpdateProjectNodeVersionTwentyX UpdateProjectNodeVersion = "20.x" + UpdateProjectNodeVersionEighteenX UpdateProjectNodeVersion = "18.x" + UpdateProjectNodeVersionSixteenX UpdateProjectNodeVersion = "16.x" + UpdateProjectNodeVersionFourteenX UpdateProjectNodeVersion = "14.x" + UpdateProjectNodeVersionTwelveX UpdateProjectNodeVersion = "12.x" + UpdateProjectNodeVersionTenX UpdateProjectNodeVersion = "10.x" +) + +func (e UpdateProjectNodeVersion) ToPointer() *UpdateProjectNodeVersion { + return &e +} +func (e *UpdateProjectNodeVersion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "22.x": + fallthrough + case "20.x": + fallthrough + case "18.x": + fallthrough + case "16.x": + fallthrough + case "14.x": + fallthrough + case "12.x": + fallthrough + case "10.x": + *e = UpdateProjectNodeVersion(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectNodeVersion: %v", v) + } +} + +// UpdateProjectIssuerMode - team: `https://oidc.vercel.com/[team_slug]` global: `https://oidc.vercel.com` +type UpdateProjectIssuerMode string + +const ( + UpdateProjectIssuerModeTeam UpdateProjectIssuerMode = "team" + UpdateProjectIssuerModeGlobal UpdateProjectIssuerMode = "global" +) + +func (e UpdateProjectIssuerMode) ToPointer() *UpdateProjectIssuerMode { + return &e +} +func (e *UpdateProjectIssuerMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "global": + *e = UpdateProjectIssuerMode(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectIssuerMode: %v", v) + } +} + +// UpdateProjectOidcTokenConfig - OpenID Connect JSON Web Token generation configuration. +type UpdateProjectOidcTokenConfig struct { + // Whether or not to generate OpenID Connect JSON Web Tokens. + Enabled bool `json:"enabled"` + // team: `https://oidc.vercel.com/[team_slug]` global: `https://oidc.vercel.com` + IssuerMode *UpdateProjectIssuerMode `default:"global" json:"issuerMode"` +} + +func (u UpdateProjectOidcTokenConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(u, "", false) +} + +func (u *UpdateProjectOidcTokenConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &u, "", false, false); err != nil { + return err + } + return nil +} + +func (o *UpdateProjectOidcTokenConfig) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *UpdateProjectOidcTokenConfig) GetIssuerMode() *UpdateProjectIssuerMode { + if o == nil { + return nil + } + return o.IssuerMode +} + +// DeploymentType - Specify if the password will apply to every Deployment Target or just Preview +type DeploymentType string + +const ( + DeploymentTypeAll DeploymentType = "all" + DeploymentTypePreview DeploymentType = "preview" + DeploymentTypeProdDeploymentUrlsAndAllPreviews DeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e DeploymentType) ToPointer() *DeploymentType { + return &e +} +func (e *DeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "all": + fallthrough + case "preview": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = DeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for DeploymentType: %v", v) + } +} + +// PasswordProtection - Allows to protect project deployments with a password +type PasswordProtection struct { + // Specify if the password will apply to every Deployment Target or just Preview + DeploymentType DeploymentType `json:"deploymentType"` + // The password that will be used to protect Project Deployments + Password *string `json:"password,omitempty"` +} + +func (o *PasswordProtection) GetDeploymentType() DeploymentType { + if o == nil { + return DeploymentType("") + } + return o.DeploymentType +} + +func (o *PasswordProtection) GetPassword() *string { + if o == nil { + return nil + } + return o.Password +} + +// UpdateProjectDeploymentType - Specify if the Vercel Authentication (SSO Protection) will apply to every Deployment Target or just Preview +type UpdateProjectDeploymentType string + +const ( + UpdateProjectDeploymentTypeAll UpdateProjectDeploymentType = "all" + UpdateProjectDeploymentTypePreview UpdateProjectDeploymentType = "preview" + UpdateProjectDeploymentTypeProdDeploymentUrlsAndAllPreviews UpdateProjectDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e UpdateProjectDeploymentType) ToPointer() *UpdateProjectDeploymentType { + return &e +} +func (e *UpdateProjectDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "all": + fallthrough + case "preview": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = UpdateProjectDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDeploymentType: %v", v) + } +} + +// SsoProtection - Ensures visitors to your Preview Deployments are logged into Vercel and have a minimum of Viewer access on your team +type SsoProtection struct { + // Specify if the Vercel Authentication (SSO Protection) will apply to every Deployment Target or just Preview + DeploymentType *UpdateProjectDeploymentType `default:"preview" json:"deploymentType"` +} + +func (s SsoProtection) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SsoProtection) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SsoProtection) GetDeploymentType() *UpdateProjectDeploymentType { + if o == nil { + return nil + } + return o.DeploymentType +} + +// UpdateProjectProjectsDeploymentType - Specify if the Trusted IPs will apply to every Deployment Target or just Preview +type UpdateProjectProjectsDeploymentType string + +const ( + UpdateProjectProjectsDeploymentTypeAll UpdateProjectProjectsDeploymentType = "all" + UpdateProjectProjectsDeploymentTypePreview UpdateProjectProjectsDeploymentType = "preview" + UpdateProjectProjectsDeploymentTypeProduction UpdateProjectProjectsDeploymentType = "production" + UpdateProjectProjectsDeploymentTypeProdDeploymentUrlsAndAllPreviews UpdateProjectProjectsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e UpdateProjectProjectsDeploymentType) ToPointer() *UpdateProjectProjectsDeploymentType { + return &e +} +func (e *UpdateProjectProjectsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "all": + fallthrough + case "preview": + fallthrough + case "production": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = UpdateProjectProjectsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsDeploymentType: %v", v) + } +} + +type Addresses struct { + // The IP addresses that are allowlisted. Supports IPv4 addresses and CIDR notations. IPv6 is not supported + Value string `json:"value"` + // An optional note explaining what the IP address or subnet is used for + Note *string `json:"note,omitempty"` +} + +func (o *Addresses) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Addresses) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +// ProtectionMode - exclusive: ip match is enough to bypass deployment protection (regardless of other settings). additional: ip must match + any other protection should be also provided (password, vercel auth, shareable link, automation bypass header, automation bypass query param) +type ProtectionMode string + +const ( + ProtectionModeExclusive ProtectionMode = "exclusive" + ProtectionModeAdditional ProtectionMode = "additional" +) + +func (e ProtectionMode) ToPointer() *ProtectionMode { + return &e +} +func (e *ProtectionMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "exclusive": + fallthrough + case "additional": + *e = ProtectionMode(v) + return nil + default: + return fmt.Errorf("invalid value for ProtectionMode: %v", v) + } +} + +// TrustedIps - Restricts access to deployments based on the incoming request IP address +type TrustedIps struct { + // Specify if the Trusted IPs will apply to every Deployment Target or just Preview + DeploymentType UpdateProjectProjectsDeploymentType `json:"deploymentType"` + Addresses []Addresses `json:"addresses"` + // exclusive: ip match is enough to bypass deployment protection (regardless of other settings). additional: ip must match + any other protection should be also provided (password, vercel auth, shareable link, automation bypass header, automation bypass query param) + ProtectionMode ProtectionMode `json:"protectionMode"` +} + +func (o *TrustedIps) GetDeploymentType() UpdateProjectProjectsDeploymentType { + if o == nil { + return UpdateProjectProjectsDeploymentType("") + } + return o.DeploymentType +} + +func (o *TrustedIps) GetAddresses() []Addresses { + if o == nil { + return []Addresses{} + } + return o.Addresses +} + +func (o *TrustedIps) GetProtectionMode() ProtectionMode { + if o == nil { + return ProtectionMode("") + } + return o.ProtectionMode +} + +type Paths struct { + // The regex path that should not be protected by Deployment Protection + Value string `json:"value"` +} + +func (o *Paths) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +// OptionsAllowlist - Specify a list of paths that should not be protected by Deployment Protection to enable Cors preflight requests +type OptionsAllowlist struct { + Paths []Paths `json:"paths"` +} + +func (o *OptionsAllowlist) GetPaths() []Paths { + if o == nil { + return []Paths{} + } + return o.Paths +} + +type UpdateProjectRequestBody struct { + AutoExposeSystemEnvs *bool `json:"autoExposeSystemEnvs,omitempty"` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + AutoAssignCustomDomainsUpdatedBy *string `json:"autoAssignCustomDomainsUpdatedBy,omitempty"` + // The build command for this project. When `null` is used this value will be automatically detected + BuildCommand *string `json:"buildCommand,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + // Specifies whether customer support can see git source for a deployment + CustomerSupportCodeVisibility *bool `json:"customerSupportCodeVisibility,omitempty"` + // The dev command for this project. When `null` is used this value will be automatically detected + DevCommand *string `json:"devCommand,omitempty"` + DirectoryListing *bool `json:"directoryListing,omitempty"` + // The framework that is being used for this project. When `null` is used no framework is selected + Framework *UpdateProjectFramework `json:"framework,omitempty"` + // Specifies whether PRs from Git forks should require a team member's authorization before it can be deployed + GitForkProtection *bool `json:"gitForkProtection,omitempty"` + // Specifies whether Git LFS is enabled for this project. + GitLFS *bool `json:"gitLFS,omitempty"` + // The install command for this project. When `null` is used this value will be automatically detected + InstallCommand *string `json:"installCommand,omitempty"` + // The desired name for the project + Name *string `json:"name,omitempty"` + NodeVersion *UpdateProjectNodeVersion `json:"nodeVersion,omitempty"` + // The output directory of the project. When `null` is used this value will be automatically detected + OutputDirectory *string `json:"outputDirectory,omitempty"` + // Specifies whether preview deployments are disabled for this project. + PreviewDeploymentsDisabled *bool `json:"previewDeploymentsDisabled,omitempty"` + // Specifies whether the source code and logs of the deployments for this project should be public or not + PublicSource *bool `json:"publicSource,omitempty"` + // The name of a directory or relative path to the source code of your project. When `null` is used it will default to the project root + RootDirectory *string `json:"rootDirectory,omitempty"` + // The region to deploy Serverless Functions in this project + ServerlessFunctionRegion *string `json:"serverlessFunctionRegion,omitempty"` + // Specifies whether Zero Config Failover is enabled for this project. + ServerlessFunctionZeroConfigFailover *bool `json:"serverlessFunctionZeroConfigFailover,omitempty"` + // Deployments created before this absolute datetime have Skew Protection disabled. Value is in milliseconds since epoch to match \"createdAt\" fields. + SkewProtectionBoundaryAt *int64 `json:"skewProtectionBoundaryAt,omitempty"` + // Deployments created before this rolling window have Skew Protection disabled. Value is in seconds to match \"revalidate\" fields. + SkewProtectionMaxAge *int64 `json:"skewProtectionMaxAge,omitempty"` + // Opts-out of the message prompting a CLI user to connect a Git repository in `vercel link`. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + SkipGitConnectDuringLink *bool `json:"skipGitConnectDuringLink,omitempty"` + // Indicates if there are source files outside of the root directory + SourceFilesOutsideRootDirectory *bool `json:"sourceFilesOutsideRootDirectory,omitempty"` + // Opt-in to preview toolbar on the project level + EnablePreviewFeedback *bool `json:"enablePreviewFeedback,omitempty"` + // Opt-in to production toolbar on the project level + EnableProductionFeedback *bool `json:"enableProductionFeedback,omitempty"` + // Opt-in to skip deployments when there are no changes to the root directory and its dependencies + EnableAffectedProjectsDeployments *bool `json:"enableAffectedProjectsDeployments,omitempty"` + // OpenID Connect JSON Web Token generation configuration. + OidcTokenConfig *UpdateProjectOidcTokenConfig `json:"oidcTokenConfig,omitempty"` + // Allows to protect project deployments with a password + PasswordProtection *PasswordProtection `json:"passwordProtection,omitempty"` + // Ensures visitors to your Preview Deployments are logged into Vercel and have a minimum of Viewer access on your team + SsoProtection *SsoProtection `json:"ssoProtection,omitempty"` + // Restricts access to deployments based on the incoming request IP address + TrustedIps *TrustedIps `json:"trustedIps,omitempty"` + // Specify a list of paths that should not be protected by Deployment Protection to enable Cors preflight requests + OptionsAllowlist *OptionsAllowlist `json:"optionsAllowlist,omitempty"` +} + +func (o *UpdateProjectRequestBody) GetAutoExposeSystemEnvs() *bool { + if o == nil { + return nil + } + return o.AutoExposeSystemEnvs +} + +func (o *UpdateProjectRequestBody) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *UpdateProjectRequestBody) GetAutoAssignCustomDomainsUpdatedBy() *string { + if o == nil { + return nil + } + return o.AutoAssignCustomDomainsUpdatedBy +} + +func (o *UpdateProjectRequestBody) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *UpdateProjectRequestBody) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *UpdateProjectRequestBody) GetCustomerSupportCodeVisibility() *bool { + if o == nil { + return nil + } + return o.CustomerSupportCodeVisibility +} + +func (o *UpdateProjectRequestBody) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *UpdateProjectRequestBody) GetDirectoryListing() *bool { + if o == nil { + return nil + } + return o.DirectoryListing +} + +func (o *UpdateProjectRequestBody) GetFramework() *UpdateProjectFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *UpdateProjectRequestBody) GetGitForkProtection() *bool { + if o == nil { + return nil + } + return o.GitForkProtection +} + +func (o *UpdateProjectRequestBody) GetGitLFS() *bool { + if o == nil { + return nil + } + return o.GitLFS +} + +func (o *UpdateProjectRequestBody) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *UpdateProjectRequestBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *UpdateProjectRequestBody) GetNodeVersion() *UpdateProjectNodeVersion { + if o == nil { + return nil + } + return o.NodeVersion +} + +func (o *UpdateProjectRequestBody) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *UpdateProjectRequestBody) GetPreviewDeploymentsDisabled() *bool { + if o == nil { + return nil + } + return o.PreviewDeploymentsDisabled +} + +func (o *UpdateProjectRequestBody) GetPublicSource() *bool { + if o == nil { + return nil + } + return o.PublicSource +} + +func (o *UpdateProjectRequestBody) GetRootDirectory() *string { + if o == nil { + return nil + } + return o.RootDirectory +} + +func (o *UpdateProjectRequestBody) GetServerlessFunctionRegion() *string { + if o == nil { + return nil + } + return o.ServerlessFunctionRegion +} + +func (o *UpdateProjectRequestBody) GetServerlessFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.ServerlessFunctionZeroConfigFailover +} + +func (o *UpdateProjectRequestBody) GetSkewProtectionBoundaryAt() *int64 { + if o == nil { + return nil + } + return o.SkewProtectionBoundaryAt +} + +func (o *UpdateProjectRequestBody) GetSkewProtectionMaxAge() *int64 { + if o == nil { + return nil + } + return o.SkewProtectionMaxAge +} + +func (o *UpdateProjectRequestBody) GetSkipGitConnectDuringLink() *bool { + if o == nil { + return nil + } + return o.SkipGitConnectDuringLink +} + +func (o *UpdateProjectRequestBody) GetSourceFilesOutsideRootDirectory() *bool { + if o == nil { + return nil + } + return o.SourceFilesOutsideRootDirectory +} + +func (o *UpdateProjectRequestBody) GetEnablePreviewFeedback() *bool { + if o == nil { + return nil + } + return o.EnablePreviewFeedback +} + +func (o *UpdateProjectRequestBody) GetEnableProductionFeedback() *bool { + if o == nil { + return nil + } + return o.EnableProductionFeedback +} + +func (o *UpdateProjectRequestBody) GetEnableAffectedProjectsDeployments() *bool { + if o == nil { + return nil + } + return o.EnableAffectedProjectsDeployments +} + +func (o *UpdateProjectRequestBody) GetOidcTokenConfig() *UpdateProjectOidcTokenConfig { + if o == nil { + return nil + } + return o.OidcTokenConfig +} + +func (o *UpdateProjectRequestBody) GetPasswordProtection() *PasswordProtection { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *UpdateProjectRequestBody) GetSsoProtection() *SsoProtection { + if o == nil { + return nil + } + return o.SsoProtection +} + +func (o *UpdateProjectRequestBody) GetTrustedIps() *TrustedIps { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *UpdateProjectRequestBody) GetOptionsAllowlist() *OptionsAllowlist { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +type UpdateProjectRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateProjectRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateProjectRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *UpdateProjectRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateProjectRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateProjectRequest) GetRequestBody() UpdateProjectRequestBody { + if o == nil { + return UpdateProjectRequestBody{} + } + return o.RequestBody +} + +type UpdateProjectAnalytics struct { + ID string `json:"id"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + DisabledAt float64 `json:"disabledAt"` + EnabledAt float64 `json:"enabledAt"` + PaidAt *float64 `json:"paidAt,omitempty"` + SampleRatePercent *float64 `json:"sampleRatePercent,omitempty"` + SpendLimitInDollars *float64 `json:"spendLimitInDollars,omitempty"` +} + +func (o *UpdateProjectAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *UpdateProjectAnalytics) GetDisabledAt() float64 { + if o == nil { + return 0.0 + } + return o.DisabledAt +} + +func (o *UpdateProjectAnalytics) GetEnabledAt() float64 { + if o == nil { + return 0.0 + } + return o.EnabledAt +} + +func (o *UpdateProjectAnalytics) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +func (o *UpdateProjectAnalytics) GetSampleRatePercent() *float64 { + if o == nil { + return nil + } + return o.SampleRatePercent +} + +func (o *UpdateProjectAnalytics) GetSpendLimitInDollars() *float64 { + if o == nil { + return nil + } + return o.SpendLimitInDollars +} + +type UpdateProjectSpeedInsights struct { + ID string `json:"id"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` + PaidAt *float64 `json:"paidAt,omitempty"` +} + +func (o *UpdateProjectSpeedInsights) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectSpeedInsights) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *UpdateProjectSpeedInsights) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *UpdateProjectSpeedInsights) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *UpdateProjectSpeedInsights) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +func (o *UpdateProjectSpeedInsights) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +type UpdateProjectDefinitions struct { + // The hostname that should be used. + Host string `json:"host"` + // The path that should be called for the cronjob. + Path string `json:"path"` + // The cron expression. + Schedule string `json:"schedule"` +} + +func (o *UpdateProjectDefinitions) GetHost() string { + if o == nil { + return "" + } + return o.Host +} + +func (o *UpdateProjectDefinitions) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *UpdateProjectDefinitions) GetSchedule() string { + if o == nil { + return "" + } + return o.Schedule +} + +type UpdateProjectCrons struct { + // The time the feature was enabled for this project. Note: It enables automatically with the first Deployment that outputs cronjobs. + EnabledAt float64 `json:"enabledAt"` + // The time the feature was disabled for this project. + DisabledAt *float64 `json:"disabledAt"` + UpdatedAt float64 `json:"updatedAt"` + // The ID of the Deployment from which the definitions originated. + DeploymentID *string `json:"deploymentId"` + Definitions []UpdateProjectDefinitions `json:"definitions"` +} + +func (o *UpdateProjectCrons) GetEnabledAt() float64 { + if o == nil { + return 0.0 + } + return o.EnabledAt +} + +func (o *UpdateProjectCrons) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *UpdateProjectCrons) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *UpdateProjectCrons) GetDeploymentID() *string { + if o == nil { + return nil + } + return o.DeploymentID +} + +func (o *UpdateProjectCrons) GetDefinitions() []UpdateProjectDefinitions { + if o == nil { + return []UpdateProjectDefinitions{} + } + return o.Definitions +} + +type UpdateProjectDataCache struct { + UserDisabled bool `json:"userDisabled"` + StorageSizeBytes *float64 `json:"storageSizeBytes,omitempty"` + Unlimited *bool `json:"unlimited,omitempty"` +} + +func (o *UpdateProjectDataCache) GetUserDisabled() bool { + if o == nil { + return false + } + return o.UserDisabled +} + +func (o *UpdateProjectDataCache) GetStorageSizeBytes() *float64 { + if o == nil { + return nil + } + return o.StorageSizeBytes +} + +func (o *UpdateProjectDataCache) GetUnlimited() *bool { + if o == nil { + return nil + } + return o.Unlimited +} + +type UpdateProjectDeploymentExpiration struct { + ExpirationDays *float64 `json:"expirationDays,omitempty"` + ExpirationDaysProduction *float64 `json:"expirationDaysProduction,omitempty"` + ExpirationDaysCanceled *float64 `json:"expirationDaysCanceled,omitempty"` + ExpirationDaysErrored *float64 `json:"expirationDaysErrored,omitempty"` + DeploymentsToKeep *float64 `json:"deploymentsToKeep,omitempty"` +} + +func (o *UpdateProjectDeploymentExpiration) GetExpirationDays() *float64 { + if o == nil { + return nil + } + return o.ExpirationDays +} + +func (o *UpdateProjectDeploymentExpiration) GetExpirationDaysProduction() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysProduction +} + +func (o *UpdateProjectDeploymentExpiration) GetExpirationDaysCanceled() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysCanceled +} + +func (o *UpdateProjectDeploymentExpiration) GetExpirationDaysErrored() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysErrored +} + +func (o *UpdateProjectDeploymentExpiration) GetDeploymentsToKeep() *float64 { + if o == nil { + return nil + } + return o.DeploymentsToKeep +} + +type UpdateProjectTarget2 string + +const ( + UpdateProjectTarget2Production UpdateProjectTarget2 = "production" + UpdateProjectTarget2Preview UpdateProjectTarget2 = "preview" + UpdateProjectTarget2Development UpdateProjectTarget2 = "development" +) + +func (e UpdateProjectTarget2) ToPointer() *UpdateProjectTarget2 { + return &e +} +func (e *UpdateProjectTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = UpdateProjectTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectTarget2: %v", v) + } +} + +type UpdateProjectTargetType string + +const ( + UpdateProjectTargetTypeArrayOfStr UpdateProjectTargetType = "arrayOfStr" + UpdateProjectTargetTypeUpdateProjectTarget2 UpdateProjectTargetType = "updateProject_target_2" +) + +type UpdateProjectTarget struct { + ArrayOfStr []string + UpdateProjectTarget2 *UpdateProjectTarget2 + + Type UpdateProjectTargetType +} + +func CreateUpdateProjectTargetArrayOfStr(arrayOfStr []string) UpdateProjectTarget { + typ := UpdateProjectTargetTypeArrayOfStr + + return UpdateProjectTarget{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func CreateUpdateProjectTargetUpdateProjectTarget2(updateProjectTarget2 UpdateProjectTarget2) UpdateProjectTarget { + typ := UpdateProjectTargetTypeUpdateProjectTarget2 + + return UpdateProjectTarget{ + UpdateProjectTarget2: &updateProjectTarget2, + Type: typ, + } +} + +func (u *UpdateProjectTarget) UnmarshalJSON(data []byte) error { + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, true); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = UpdateProjectTargetTypeArrayOfStr + return nil + } + + var updateProjectTarget2 UpdateProjectTarget2 = UpdateProjectTarget2("") + if err := utils.UnmarshalJSON(data, &updateProjectTarget2, "", true, true); err == nil { + u.UpdateProjectTarget2 = &updateProjectTarget2 + u.Type = UpdateProjectTargetTypeUpdateProjectTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectTarget", string(data)) +} + +func (u UpdateProjectTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + if u.UpdateProjectTarget2 != nil { + return utils.MarshalJSON(u.UpdateProjectTarget2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectTarget: all fields are null") +} + +type UpdateProjectType string + +const ( + UpdateProjectTypeSystem UpdateProjectType = "system" + UpdateProjectTypeEncrypted UpdateProjectType = "encrypted" + UpdateProjectTypePlain UpdateProjectType = "plain" + UpdateProjectTypeSensitive UpdateProjectType = "sensitive" + UpdateProjectTypeSecret UpdateProjectType = "secret" +) + +func (e UpdateProjectType) ToPointer() *UpdateProjectType { + return &e +} +func (e *UpdateProjectType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + fallthrough + case "secret": + *e = UpdateProjectType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectType: %v", v) + } +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15TypeFlagsConnectionString UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type = "flags-connection-string" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type: %v", v) + } +} + +type UpdateProjectContentHint15 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *UpdateProjectContentHint15) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint15) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14TypeIntegrationStoreSecret UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type = "integration-store-secret" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type: %v", v) + } +} + +type UpdateProjectContentHint14 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *UpdateProjectContentHint14) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint14) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *UpdateProjectContentHint14) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *UpdateProjectContentHint14) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *UpdateProjectContentHint14) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13TypePostgresURLNoSsl UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type = "postgres-url-no-ssl" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type: %v", v) + } +} + +type UpdateProjectContentHint13 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint13) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint13) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12TypePostgresDatabase UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type = "postgres-database" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type: %v", v) + } +} + +type UpdateProjectContentHint12 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint12) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint12) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11TypePostgresPassword UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type = "postgres-password" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type: %v", v) + } +} + +type UpdateProjectContentHint11 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint11) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10TypePostgresHost UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type = "postgres-host" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type: %v", v) + } +} + +type UpdateProjectContentHint10 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint10) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9TypePostgresUser UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type = "postgres-user" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type: %v", v) + } +} + +type UpdateProjectContentHint9 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint9) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8TypePostgresPrismaURL UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type = "postgres-prisma-url" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type: %v", v) + } +} + +type UpdateProjectContentHint8 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint8) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnv8Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvTypePostgresURLNonPooling UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType = "postgres-url-non-pooling" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType: %v", v) + } +} + +type UpdateProjectContentHint7 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint7) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType("") + } + return o.Type +} + +func (o *UpdateProjectContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyTypePostgresURL UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType = "postgres-url" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type UpdateProjectContentHint6 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint6) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *UpdateProjectContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200ApplicationJSONType string + +const ( + UpdateProjectContentHintProjectsResponse200ApplicationJSONTypeBlobReadWriteToken UpdateProjectContentHintProjectsResponse200ApplicationJSONType = "blob-read-write-token" +) + +func (e UpdateProjectContentHintProjectsResponse200ApplicationJSONType) ToPointer() *UpdateProjectContentHintProjectsResponse200ApplicationJSONType { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = UpdateProjectContentHintProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type UpdateProjectContentHint5 struct { + Type UpdateProjectContentHintProjectsResponse200ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint5) GetType() UpdateProjectContentHintProjectsResponse200ApplicationJSONType { + if o == nil { + return UpdateProjectContentHintProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *UpdateProjectContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponse200Type string + +const ( + UpdateProjectContentHintProjectsResponse200TypeRedisRestAPIReadOnlyToken UpdateProjectContentHintProjectsResponse200Type = "redis-rest-api-read-only-token" +) + +func (e UpdateProjectContentHintProjectsResponse200Type) ToPointer() *UpdateProjectContentHintProjectsResponse200Type { + return &e +} +func (e *UpdateProjectContentHintProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = UpdateProjectContentHintProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponse200Type: %v", v) + } +} + +type UpdateProjectContentHint4 struct { + Type UpdateProjectContentHintProjectsResponse200Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint4) GetType() UpdateProjectContentHintProjectsResponse200Type { + if o == nil { + return UpdateProjectContentHintProjectsResponse200Type("") + } + return o.Type +} + +func (o *UpdateProjectContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsResponseType string + +const ( + UpdateProjectContentHintProjectsResponseTypeRedisRestAPIToken UpdateProjectContentHintProjectsResponseType = "redis-rest-api-token" +) + +func (e UpdateProjectContentHintProjectsResponseType) ToPointer() *UpdateProjectContentHintProjectsResponseType { + return &e +} +func (e *UpdateProjectContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = UpdateProjectContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsResponseType: %v", v) + } +} + +type UpdateProjectContentHint3 struct { + Type UpdateProjectContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint3) GetType() UpdateProjectContentHintProjectsResponseType { + if o == nil { + return UpdateProjectContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *UpdateProjectContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintProjectsType string + +const ( + UpdateProjectContentHintProjectsTypeRedisRestAPIURL UpdateProjectContentHintProjectsType = "redis-rest-api-url" +) + +func (e UpdateProjectContentHintProjectsType) ToPointer() *UpdateProjectContentHintProjectsType { + return &e +} +func (e *UpdateProjectContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = UpdateProjectContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintProjectsType: %v", v) + } +} + +type UpdateProjectContentHint2 struct { + Type UpdateProjectContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint2) GetType() UpdateProjectContentHintProjectsType { + if o == nil { + return UpdateProjectContentHintProjectsType("") + } + return o.Type +} + +func (o *UpdateProjectContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintType string + +const ( + UpdateProjectContentHintTypeRedisURL UpdateProjectContentHintType = "redis-url" +) + +func (e UpdateProjectContentHintType) ToPointer() *UpdateProjectContentHintType { + return &e +} +func (e *UpdateProjectContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = UpdateProjectContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectContentHintType: %v", v) + } +} + +type UpdateProjectContentHint1 struct { + Type UpdateProjectContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectContentHint1) GetType() UpdateProjectContentHintType { + if o == nil { + return UpdateProjectContentHintType("") + } + return o.Type +} + +func (o *UpdateProjectContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectContentHintUnionType string + +const ( + UpdateProjectContentHintUnionTypeUpdateProjectContentHint1 UpdateProjectContentHintUnionType = "updateProject_contentHint_1" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint2 UpdateProjectContentHintUnionType = "updateProject_contentHint_2" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint3 UpdateProjectContentHintUnionType = "updateProject_contentHint_3" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint4 UpdateProjectContentHintUnionType = "updateProject_contentHint_4" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint5 UpdateProjectContentHintUnionType = "updateProject_contentHint_5" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint6 UpdateProjectContentHintUnionType = "updateProject_contentHint_6" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint7 UpdateProjectContentHintUnionType = "updateProject_contentHint_7" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint8 UpdateProjectContentHintUnionType = "updateProject_contentHint_8" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint9 UpdateProjectContentHintUnionType = "updateProject_contentHint_9" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint10 UpdateProjectContentHintUnionType = "updateProject_contentHint_10" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint11 UpdateProjectContentHintUnionType = "updateProject_contentHint_11" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint12 UpdateProjectContentHintUnionType = "updateProject_contentHint_12" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint13 UpdateProjectContentHintUnionType = "updateProject_contentHint_13" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint14 UpdateProjectContentHintUnionType = "updateProject_contentHint_14" + UpdateProjectContentHintUnionTypeUpdateProjectContentHint15 UpdateProjectContentHintUnionType = "updateProject_contentHint_15" +) + +type UpdateProjectContentHint struct { + UpdateProjectContentHint1 *UpdateProjectContentHint1 + UpdateProjectContentHint2 *UpdateProjectContentHint2 + UpdateProjectContentHint3 *UpdateProjectContentHint3 + UpdateProjectContentHint4 *UpdateProjectContentHint4 + UpdateProjectContentHint5 *UpdateProjectContentHint5 + UpdateProjectContentHint6 *UpdateProjectContentHint6 + UpdateProjectContentHint7 *UpdateProjectContentHint7 + UpdateProjectContentHint8 *UpdateProjectContentHint8 + UpdateProjectContentHint9 *UpdateProjectContentHint9 + UpdateProjectContentHint10 *UpdateProjectContentHint10 + UpdateProjectContentHint11 *UpdateProjectContentHint11 + UpdateProjectContentHint12 *UpdateProjectContentHint12 + UpdateProjectContentHint13 *UpdateProjectContentHint13 + UpdateProjectContentHint14 *UpdateProjectContentHint14 + UpdateProjectContentHint15 *UpdateProjectContentHint15 + + Type UpdateProjectContentHintUnionType +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint1(updateProjectContentHint1 UpdateProjectContentHint1) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint1 + + return UpdateProjectContentHint{ + UpdateProjectContentHint1: &updateProjectContentHint1, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint2(updateProjectContentHint2 UpdateProjectContentHint2) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint2 + + return UpdateProjectContentHint{ + UpdateProjectContentHint2: &updateProjectContentHint2, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint3(updateProjectContentHint3 UpdateProjectContentHint3) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint3 + + return UpdateProjectContentHint{ + UpdateProjectContentHint3: &updateProjectContentHint3, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint4(updateProjectContentHint4 UpdateProjectContentHint4) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint4 + + return UpdateProjectContentHint{ + UpdateProjectContentHint4: &updateProjectContentHint4, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint5(updateProjectContentHint5 UpdateProjectContentHint5) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint5 + + return UpdateProjectContentHint{ + UpdateProjectContentHint5: &updateProjectContentHint5, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint6(updateProjectContentHint6 UpdateProjectContentHint6) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint6 + + return UpdateProjectContentHint{ + UpdateProjectContentHint6: &updateProjectContentHint6, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint7(updateProjectContentHint7 UpdateProjectContentHint7) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint7 + + return UpdateProjectContentHint{ + UpdateProjectContentHint7: &updateProjectContentHint7, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint8(updateProjectContentHint8 UpdateProjectContentHint8) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint8 + + return UpdateProjectContentHint{ + UpdateProjectContentHint8: &updateProjectContentHint8, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint9(updateProjectContentHint9 UpdateProjectContentHint9) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint9 + + return UpdateProjectContentHint{ + UpdateProjectContentHint9: &updateProjectContentHint9, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint10(updateProjectContentHint10 UpdateProjectContentHint10) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint10 + + return UpdateProjectContentHint{ + UpdateProjectContentHint10: &updateProjectContentHint10, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint11(updateProjectContentHint11 UpdateProjectContentHint11) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint11 + + return UpdateProjectContentHint{ + UpdateProjectContentHint11: &updateProjectContentHint11, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint12(updateProjectContentHint12 UpdateProjectContentHint12) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint12 + + return UpdateProjectContentHint{ + UpdateProjectContentHint12: &updateProjectContentHint12, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint13(updateProjectContentHint13 UpdateProjectContentHint13) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint13 + + return UpdateProjectContentHint{ + UpdateProjectContentHint13: &updateProjectContentHint13, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint14(updateProjectContentHint14 UpdateProjectContentHint14) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint14 + + return UpdateProjectContentHint{ + UpdateProjectContentHint14: &updateProjectContentHint14, + Type: typ, + } +} + +func CreateUpdateProjectContentHintUpdateProjectContentHint15(updateProjectContentHint15 UpdateProjectContentHint15) UpdateProjectContentHint { + typ := UpdateProjectContentHintUnionTypeUpdateProjectContentHint15 + + return UpdateProjectContentHint{ + UpdateProjectContentHint15: &updateProjectContentHint15, + Type: typ, + } +} + +func (u *UpdateProjectContentHint) UnmarshalJSON(data []byte) error { + + var updateProjectContentHint7 UpdateProjectContentHint7 = UpdateProjectContentHint7{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint7, "", true, true); err == nil { + u.UpdateProjectContentHint7 = &updateProjectContentHint7 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint7 + return nil + } + + var updateProjectContentHint9 UpdateProjectContentHint9 = UpdateProjectContentHint9{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint9, "", true, true); err == nil { + u.UpdateProjectContentHint9 = &updateProjectContentHint9 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint9 + return nil + } + + var updateProjectContentHint3 UpdateProjectContentHint3 = UpdateProjectContentHint3{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint3, "", true, true); err == nil { + u.UpdateProjectContentHint3 = &updateProjectContentHint3 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint3 + return nil + } + + var updateProjectContentHint4 UpdateProjectContentHint4 = UpdateProjectContentHint4{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint4, "", true, true); err == nil { + u.UpdateProjectContentHint4 = &updateProjectContentHint4 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint4 + return nil + } + + var updateProjectContentHint5 UpdateProjectContentHint5 = UpdateProjectContentHint5{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint5, "", true, true); err == nil { + u.UpdateProjectContentHint5 = &updateProjectContentHint5 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint5 + return nil + } + + var updateProjectContentHint6 UpdateProjectContentHint6 = UpdateProjectContentHint6{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint6, "", true, true); err == nil { + u.UpdateProjectContentHint6 = &updateProjectContentHint6 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint6 + return nil + } + + var updateProjectContentHint2 UpdateProjectContentHint2 = UpdateProjectContentHint2{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint2, "", true, true); err == nil { + u.UpdateProjectContentHint2 = &updateProjectContentHint2 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint2 + return nil + } + + var updateProjectContentHint8 UpdateProjectContentHint8 = UpdateProjectContentHint8{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint8, "", true, true); err == nil { + u.UpdateProjectContentHint8 = &updateProjectContentHint8 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint8 + return nil + } + + var updateProjectContentHint1 UpdateProjectContentHint1 = UpdateProjectContentHint1{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint1, "", true, true); err == nil { + u.UpdateProjectContentHint1 = &updateProjectContentHint1 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint1 + return nil + } + + var updateProjectContentHint10 UpdateProjectContentHint10 = UpdateProjectContentHint10{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint10, "", true, true); err == nil { + u.UpdateProjectContentHint10 = &updateProjectContentHint10 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint10 + return nil + } + + var updateProjectContentHint11 UpdateProjectContentHint11 = UpdateProjectContentHint11{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint11, "", true, true); err == nil { + u.UpdateProjectContentHint11 = &updateProjectContentHint11 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint11 + return nil + } + + var updateProjectContentHint12 UpdateProjectContentHint12 = UpdateProjectContentHint12{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint12, "", true, true); err == nil { + u.UpdateProjectContentHint12 = &updateProjectContentHint12 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint12 + return nil + } + + var updateProjectContentHint13 UpdateProjectContentHint13 = UpdateProjectContentHint13{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint13, "", true, true); err == nil { + u.UpdateProjectContentHint13 = &updateProjectContentHint13 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint13 + return nil + } + + var updateProjectContentHint15 UpdateProjectContentHint15 = UpdateProjectContentHint15{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint15, "", true, true); err == nil { + u.UpdateProjectContentHint15 = &updateProjectContentHint15 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint15 + return nil + } + + var updateProjectContentHint14 UpdateProjectContentHint14 = UpdateProjectContentHint14{} + if err := utils.UnmarshalJSON(data, &updateProjectContentHint14, "", true, true); err == nil { + u.UpdateProjectContentHint14 = &updateProjectContentHint14 + u.Type = UpdateProjectContentHintUnionTypeUpdateProjectContentHint14 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectContentHint", string(data)) +} + +func (u UpdateProjectContentHint) MarshalJSON() ([]byte, error) { + if u.UpdateProjectContentHint1 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint1, "", true) + } + + if u.UpdateProjectContentHint2 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint2, "", true) + } + + if u.UpdateProjectContentHint3 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint3, "", true) + } + + if u.UpdateProjectContentHint4 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint4, "", true) + } + + if u.UpdateProjectContentHint5 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint5, "", true) + } + + if u.UpdateProjectContentHint6 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint6, "", true) + } + + if u.UpdateProjectContentHint7 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint7, "", true) + } + + if u.UpdateProjectContentHint8 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint8, "", true) + } + + if u.UpdateProjectContentHint9 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint9, "", true) + } + + if u.UpdateProjectContentHint10 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint10, "", true) + } + + if u.UpdateProjectContentHint11 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint11, "", true) + } + + if u.UpdateProjectContentHint12 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint12, "", true) + } + + if u.UpdateProjectContentHint13 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint13, "", true) + } + + if u.UpdateProjectContentHint14 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint14, "", true) + } + + if u.UpdateProjectContentHint15 != nil { + return utils.MarshalJSON(u.UpdateProjectContentHint15, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectContentHint: all fields are null") +} + +type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType string + +const ( + UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvTypeFlagsSecret UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType = "flags-secret" +) + +func (e UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType) ToPointer() *UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType { + return &e +} +func (e *UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType: %v", v) + } +} + +// UpdateProjectInternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type UpdateProjectInternalContentHint struct { + Type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *UpdateProjectInternalContentHint) GetType() UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType { + if o == nil { + return UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType("") + } + return o.Type +} + +func (o *UpdateProjectInternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type UpdateProjectEnv struct { + Target *UpdateProjectTarget `json:"target,omitempty"` + Type UpdateProjectType `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *UpdateProjectContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *UpdateProjectInternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *UpdateProjectEnv) GetTarget() *UpdateProjectTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *UpdateProjectEnv) GetType() UpdateProjectType { + if o == nil { + return UpdateProjectType("") + } + return o.Type +} + +func (o *UpdateProjectEnv) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *UpdateProjectEnv) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *UpdateProjectEnv) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *UpdateProjectEnv) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *UpdateProjectEnv) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *UpdateProjectEnv) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectEnv) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *UpdateProjectEnv) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *UpdateProjectEnv) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *UpdateProjectEnv) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *UpdateProjectEnv) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *UpdateProjectEnv) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *UpdateProjectEnv) GetContentHint() *UpdateProjectContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *UpdateProjectEnv) GetInternalContentHint() *UpdateProjectInternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *UpdateProjectEnv) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *UpdateProjectEnv) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *UpdateProjectEnv) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *UpdateProjectEnv) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type UpdateProjectCustomEnvironments struct { +} + +type UpdateProjectProjectsFramework string + +const ( + UpdateProjectProjectsFrameworkBlitzjs UpdateProjectProjectsFramework = "blitzjs" + UpdateProjectProjectsFrameworkNextjs UpdateProjectProjectsFramework = "nextjs" + UpdateProjectProjectsFrameworkGatsby UpdateProjectProjectsFramework = "gatsby" + UpdateProjectProjectsFrameworkRemix UpdateProjectProjectsFramework = "remix" + UpdateProjectProjectsFrameworkAstro UpdateProjectProjectsFramework = "astro" + UpdateProjectProjectsFrameworkHexo UpdateProjectProjectsFramework = "hexo" + UpdateProjectProjectsFrameworkEleventy UpdateProjectProjectsFramework = "eleventy" + UpdateProjectProjectsFrameworkDocusaurus2 UpdateProjectProjectsFramework = "docusaurus-2" + UpdateProjectProjectsFrameworkDocusaurus UpdateProjectProjectsFramework = "docusaurus" + UpdateProjectProjectsFrameworkPreact UpdateProjectProjectsFramework = "preact" + UpdateProjectProjectsFrameworkSolidstart1 UpdateProjectProjectsFramework = "solidstart-1" + UpdateProjectProjectsFrameworkSolidstart UpdateProjectProjectsFramework = "solidstart" + UpdateProjectProjectsFrameworkDojo UpdateProjectProjectsFramework = "dojo" + UpdateProjectProjectsFrameworkEmber UpdateProjectProjectsFramework = "ember" + UpdateProjectProjectsFrameworkVue UpdateProjectProjectsFramework = "vue" + UpdateProjectProjectsFrameworkScully UpdateProjectProjectsFramework = "scully" + UpdateProjectProjectsFrameworkIonicAngular UpdateProjectProjectsFramework = "ionic-angular" + UpdateProjectProjectsFrameworkAngular UpdateProjectProjectsFramework = "angular" + UpdateProjectProjectsFrameworkPolymer UpdateProjectProjectsFramework = "polymer" + UpdateProjectProjectsFrameworkSvelte UpdateProjectProjectsFramework = "svelte" + UpdateProjectProjectsFrameworkSveltekit UpdateProjectProjectsFramework = "sveltekit" + UpdateProjectProjectsFrameworkSveltekit1 UpdateProjectProjectsFramework = "sveltekit-1" + UpdateProjectProjectsFrameworkIonicReact UpdateProjectProjectsFramework = "ionic-react" + UpdateProjectProjectsFrameworkCreateReactApp UpdateProjectProjectsFramework = "create-react-app" + UpdateProjectProjectsFrameworkGridsome UpdateProjectProjectsFramework = "gridsome" + UpdateProjectProjectsFrameworkUmijs UpdateProjectProjectsFramework = "umijs" + UpdateProjectProjectsFrameworkSapper UpdateProjectProjectsFramework = "sapper" + UpdateProjectProjectsFrameworkSaber UpdateProjectProjectsFramework = "saber" + UpdateProjectProjectsFrameworkStencil UpdateProjectProjectsFramework = "stencil" + UpdateProjectProjectsFrameworkNuxtjs UpdateProjectProjectsFramework = "nuxtjs" + UpdateProjectProjectsFrameworkRedwoodjs UpdateProjectProjectsFramework = "redwoodjs" + UpdateProjectProjectsFrameworkHugo UpdateProjectProjectsFramework = "hugo" + UpdateProjectProjectsFrameworkJekyll UpdateProjectProjectsFramework = "jekyll" + UpdateProjectProjectsFrameworkBrunch UpdateProjectProjectsFramework = "brunch" + UpdateProjectProjectsFrameworkMiddleman UpdateProjectProjectsFramework = "middleman" + UpdateProjectProjectsFrameworkZola UpdateProjectProjectsFramework = "zola" + UpdateProjectProjectsFrameworkHydrogen UpdateProjectProjectsFramework = "hydrogen" + UpdateProjectProjectsFrameworkVite UpdateProjectProjectsFramework = "vite" + UpdateProjectProjectsFrameworkVitepress UpdateProjectProjectsFramework = "vitepress" + UpdateProjectProjectsFrameworkVuepress UpdateProjectProjectsFramework = "vuepress" + UpdateProjectProjectsFrameworkParcel UpdateProjectProjectsFramework = "parcel" + UpdateProjectProjectsFrameworkFasthtml UpdateProjectProjectsFramework = "fasthtml" + UpdateProjectProjectsFrameworkSanityV3 UpdateProjectProjectsFramework = "sanity-v3" + UpdateProjectProjectsFrameworkSanity UpdateProjectProjectsFramework = "sanity" + UpdateProjectProjectsFrameworkStorybook UpdateProjectProjectsFramework = "storybook" +) + +func (e UpdateProjectProjectsFramework) ToPointer() *UpdateProjectProjectsFramework { + return &e +} +func (e *UpdateProjectProjectsFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = UpdateProjectProjectsFramework(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsFramework: %v", v) + } +} + +type UpdateProjectIPBuckets struct { + Bucket string `json:"bucket"` + SupportUntil *float64 `json:"supportUntil,omitempty"` +} + +func (o *UpdateProjectIPBuckets) GetBucket() string { + if o == nil { + return "" + } + return o.Bucket +} + +func (o *UpdateProjectIPBuckets) GetSupportUntil() *float64 { + if o == nil { + return nil + } + return o.SupportUntil +} + +type UpdateProjectAliasAssignedType string + +const ( + UpdateProjectAliasAssignedTypeNumber UpdateProjectAliasAssignedType = "number" + UpdateProjectAliasAssignedTypeBoolean UpdateProjectAliasAssignedType = "boolean" +) + +type UpdateProjectAliasAssigned struct { + Number *float64 + Boolean *bool + + Type UpdateProjectAliasAssignedType +} + +func CreateUpdateProjectAliasAssignedNumber(number float64) UpdateProjectAliasAssigned { + typ := UpdateProjectAliasAssignedTypeNumber + + return UpdateProjectAliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateUpdateProjectAliasAssignedBoolean(boolean bool) UpdateProjectAliasAssigned { + typ := UpdateProjectAliasAssignedTypeBoolean + + return UpdateProjectAliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *UpdateProjectAliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = UpdateProjectAliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = UpdateProjectAliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectAliasAssigned", string(data)) +} + +func (u UpdateProjectAliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectAliasAssigned: all fields are null") +} + +type UpdateProjectAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *UpdateProjectAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *UpdateProjectAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTypeEndsWith UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType = "endsWith" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTypeStartsWith UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType = "startsWith" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTypeEquals UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType = "equals" +) + +func (e UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "endsWith": + fallthrough + case "startsWith": + fallthrough + case "equals": + *e = UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type UpdateProjectBranchMatcher struct { + Type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + Pattern string `json:"pattern"` +} + +func (o *UpdateProjectBranchMatcher) GetType() UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *UpdateProjectBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type UpdateProjectBuilds struct { + Use string `json:"use"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` +} + +func (o *UpdateProjectBuilds) GetUse() string { + if o == nil { + return "" + } + return o.Use +} + +func (o *UpdateProjectBuilds) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *UpdateProjectBuilds) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +type UpdateProjectChecksConclusion string + +const ( + UpdateProjectChecksConclusionSucceeded UpdateProjectChecksConclusion = "succeeded" + UpdateProjectChecksConclusionFailed UpdateProjectChecksConclusion = "failed" + UpdateProjectChecksConclusionSkipped UpdateProjectChecksConclusion = "skipped" + UpdateProjectChecksConclusionCanceled UpdateProjectChecksConclusion = "canceled" +) + +func (e UpdateProjectChecksConclusion) ToPointer() *UpdateProjectChecksConclusion { + return &e +} +func (e *UpdateProjectChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = UpdateProjectChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectChecksConclusion: %v", v) + } +} + +type UpdateProjectChecksState string + +const ( + UpdateProjectChecksStateRegistered UpdateProjectChecksState = "registered" + UpdateProjectChecksStateRunning UpdateProjectChecksState = "running" + UpdateProjectChecksStateCompleted UpdateProjectChecksState = "completed" +) + +func (e UpdateProjectChecksState) ToPointer() *UpdateProjectChecksState { + return &e +} +func (e *UpdateProjectChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = UpdateProjectChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectChecksState: %v", v) + } +} + +type UpdateProjectCreator struct { + Email string `json:"email"` + GithubLogin *string `json:"githubLogin,omitempty"` + GitlabLogin *string `json:"gitlabLogin,omitempty"` + UID string `json:"uid"` + Username string `json:"username"` +} + +func (o *UpdateProjectCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *UpdateProjectCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *UpdateProjectCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +func (o *UpdateProjectCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *UpdateProjectCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +type UpdateProjectOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *UpdateProjectOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *UpdateProjectOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *UpdateProjectOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *UpdateProjectOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *UpdateProjectOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *UpdateProjectOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *UpdateProjectOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *UpdateProjectOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateProjectOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type UpdateProjectPlan string + +const ( + UpdateProjectPlanPro UpdateProjectPlan = "pro" + UpdateProjectPlanEnterprise UpdateProjectPlan = "enterprise" + UpdateProjectPlanHobby UpdateProjectPlan = "hobby" +) + +func (e UpdateProjectPlan) ToPointer() *UpdateProjectPlan { + return &e +} +func (e *UpdateProjectPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = UpdateProjectPlan(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectPlan: %v", v) + } +} + +type UpdateProjectReadyState string + +const ( + UpdateProjectReadyStateBuilding UpdateProjectReadyState = "BUILDING" + UpdateProjectReadyStateError UpdateProjectReadyState = "ERROR" + UpdateProjectReadyStateInitializing UpdateProjectReadyState = "INITIALIZING" + UpdateProjectReadyStateQueued UpdateProjectReadyState = "QUEUED" + UpdateProjectReadyStateReady UpdateProjectReadyState = "READY" + UpdateProjectReadyStateCanceled UpdateProjectReadyState = "CANCELED" +) + +func (e UpdateProjectReadyState) ToPointer() *UpdateProjectReadyState { + return &e +} +func (e *UpdateProjectReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = UpdateProjectReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectReadyState: %v", v) + } +} + +type UpdateProjectReadySubstate string + +const ( + UpdateProjectReadySubstateStaged UpdateProjectReadySubstate = "STAGED" + UpdateProjectReadySubstatePromoted UpdateProjectReadySubstate = "PROMOTED" +) + +func (e UpdateProjectReadySubstate) ToPointer() *UpdateProjectReadySubstate { + return &e +} +func (e *UpdateProjectReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = UpdateProjectReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectReadySubstate: %v", v) + } +} + +type UpdateProjectProjectsType string + +const ( + UpdateProjectProjectsTypeLambdas UpdateProjectProjectsType = "LAMBDAS" +) + +func (e UpdateProjectProjectsType) ToPointer() *UpdateProjectProjectsType { + return &e +} +func (e *UpdateProjectProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = UpdateProjectProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsType: %v", v) + } +} + +type UpdateProjectLatestDeployments struct { + ID string `json:"id"` + Alias []string `json:"alias,omitempty"` + AliasAssigned *UpdateProjectAliasAssigned `json:"aliasAssigned,omitempty"` + AliasError *UpdateProjectAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BranchMatcher *UpdateProjectBranchMatcher `json:"branchMatcher,omitempty"` + BuildingAt *float64 `json:"buildingAt,omitempty"` + Builds []UpdateProjectBuilds `json:"builds,omitempty"` + ChecksConclusion *UpdateProjectChecksConclusion `json:"checksConclusion,omitempty"` + ChecksState *UpdateProjectChecksState `json:"checksState,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedAt float64 `json:"createdAt"` + CreatedIn string `json:"createdIn"` + Creator *UpdateProjectCreator `json:"creator"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + DeploymentHostname string `json:"deploymentHostname"` + Forced *bool `json:"forced,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OidcTokenClaims *UpdateProjectOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + Plan UpdateProjectPlan `json:"plan"` + // Whether or not preview comments are enabled for the deployment + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + Private bool `json:"private"` + ReadyAt *float64 `json:"readyAt,omitempty"` + ReadyState UpdateProjectReadyState `json:"readyState"` + ReadySubstate *UpdateProjectReadySubstate `json:"readySubstate,omitempty"` + RequestedAt *float64 `json:"requestedAt,omitempty"` + Target *string `json:"target,omitempty"` + TeamID *string `json:"teamId,omitempty"` + Type UpdateProjectProjectsType `json:"type"` + URL string `json:"url"` + UserID string `json:"userId"` + WithCache *bool `json:"withCache,omitempty"` +} + +func (o *UpdateProjectLatestDeployments) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectLatestDeployments) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *UpdateProjectLatestDeployments) GetAliasAssigned() *UpdateProjectAliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *UpdateProjectLatestDeployments) GetAliasError() *UpdateProjectAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *UpdateProjectLatestDeployments) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *UpdateProjectLatestDeployments) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *UpdateProjectLatestDeployments) GetBranchMatcher() *UpdateProjectBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *UpdateProjectLatestDeployments) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *UpdateProjectLatestDeployments) GetBuilds() []UpdateProjectBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *UpdateProjectLatestDeployments) GetChecksConclusion() *UpdateProjectChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *UpdateProjectLatestDeployments) GetChecksState() *UpdateProjectChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *UpdateProjectLatestDeployments) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *UpdateProjectLatestDeployments) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *UpdateProjectLatestDeployments) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *UpdateProjectLatestDeployments) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *UpdateProjectLatestDeployments) GetCreator() *UpdateProjectCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *UpdateProjectLatestDeployments) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *UpdateProjectLatestDeployments) GetDeploymentHostname() string { + if o == nil { + return "" + } + return o.DeploymentHostname +} + +func (o *UpdateProjectLatestDeployments) GetForced() *bool { + if o == nil { + return nil + } + return o.Forced +} + +func (o *UpdateProjectLatestDeployments) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectLatestDeployments) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *UpdateProjectLatestDeployments) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *UpdateProjectLatestDeployments) GetOidcTokenClaims() *UpdateProjectOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *UpdateProjectLatestDeployments) GetPlan() UpdateProjectPlan { + if o == nil { + return UpdateProjectPlan("") + } + return o.Plan +} + +func (o *UpdateProjectLatestDeployments) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *UpdateProjectLatestDeployments) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *UpdateProjectLatestDeployments) GetReadyAt() *float64 { + if o == nil { + return nil + } + return o.ReadyAt +} + +func (o *UpdateProjectLatestDeployments) GetReadyState() UpdateProjectReadyState { + if o == nil { + return UpdateProjectReadyState("") + } + return o.ReadyState +} + +func (o *UpdateProjectLatestDeployments) GetReadySubstate() *UpdateProjectReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *UpdateProjectLatestDeployments) GetRequestedAt() *float64 { + if o == nil { + return nil + } + return o.RequestedAt +} + +func (o *UpdateProjectLatestDeployments) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *UpdateProjectLatestDeployments) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateProjectLatestDeployments) GetType() UpdateProjectProjectsType { + if o == nil { + return UpdateProjectProjectsType("") + } + return o.Type +} + +func (o *UpdateProjectLatestDeployments) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *UpdateProjectLatestDeployments) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *UpdateProjectLatestDeployments) GetWithCache() *bool { + if o == nil { + return nil + } + return o.WithCache +} + +type UpdateProjectLinkProjectsResponseType string + +const ( + UpdateProjectLinkProjectsResponseTypeBitbucket UpdateProjectLinkProjectsResponseType = "bitbucket" +) + +func (e UpdateProjectLinkProjectsResponseType) ToPointer() *UpdateProjectLinkProjectsResponseType { + return &e +} +func (e *UpdateProjectLinkProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = UpdateProjectLinkProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectLinkProjectsResponseType: %v", v) + } +} + +type UpdateProjectLinkProjectsResponseDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *UpdateProjectLinkProjectsResponseDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectLinkProjectsResponseDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectLinkProjectsResponseDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectLinkProjectsResponseDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *UpdateProjectLinkProjectsResponseDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type UpdateProjectLink3 struct { + Name *string `json:"name,omitempty"` + Slug *string `json:"slug,omitempty"` + Owner *string `json:"owner,omitempty"` + Type *UpdateProjectLinkProjectsResponseType `json:"type,omitempty"` + UUID *string `json:"uuid,omitempty"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []UpdateProjectLinkProjectsResponseDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *UpdateProjectLink3) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *UpdateProjectLink3) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateProjectLink3) GetOwner() *string { + if o == nil { + return nil + } + return o.Owner +} + +func (o *UpdateProjectLink3) GetType() *UpdateProjectLinkProjectsResponseType { + if o == nil { + return nil + } + return o.Type +} + +func (o *UpdateProjectLink3) GetUUID() *string { + if o == nil { + return nil + } + return o.UUID +} + +func (o *UpdateProjectLink3) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +func (o *UpdateProjectLink3) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectLink3) GetDeployHooks() []UpdateProjectLinkProjectsResponseDeployHooks { + if o == nil { + return []UpdateProjectLinkProjectsResponseDeployHooks{} + } + return o.DeployHooks +} + +func (o *UpdateProjectLink3) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *UpdateProjectLink3) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *UpdateProjectLink3) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *UpdateProjectLink3) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type UpdateProjectLinkProjectsType string + +const ( + UpdateProjectLinkProjectsTypeGitlab UpdateProjectLinkProjectsType = "gitlab" +) + +func (e UpdateProjectLinkProjectsType) ToPointer() *UpdateProjectLinkProjectsType { + return &e +} +func (e *UpdateProjectLinkProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = UpdateProjectLinkProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectLinkProjectsType: %v", v) + } +} + +type UpdateProjectLinkProjectsDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *UpdateProjectLinkProjectsDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectLinkProjectsDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectLinkProjectsDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectLinkProjectsDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *UpdateProjectLinkProjectsDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type UpdateProjectLink2 struct { + ProjectID *string `json:"projectId,omitempty"` + ProjectName *string `json:"projectName,omitempty"` + ProjectNameWithNamespace *string `json:"projectNameWithNamespace,omitempty"` + ProjectNamespace *string `json:"projectNamespace,omitempty"` + // A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. This is the id of the top level group that a namespace belongs to. Gitlab supports group nesting (up to 20 levels). + ProjectOwnerID *float64 `json:"projectOwnerId,omitempty"` + ProjectURL *string `json:"projectUrl,omitempty"` + Type *UpdateProjectLinkProjectsType `json:"type,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []UpdateProjectLinkProjectsDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *UpdateProjectLink2) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *UpdateProjectLink2) GetProjectName() *string { + if o == nil { + return nil + } + return o.ProjectName +} + +func (o *UpdateProjectLink2) GetProjectNameWithNamespace() *string { + if o == nil { + return nil + } + return o.ProjectNameWithNamespace +} + +func (o *UpdateProjectLink2) GetProjectNamespace() *string { + if o == nil { + return nil + } + return o.ProjectNamespace +} + +func (o *UpdateProjectLink2) GetProjectOwnerID() *float64 { + if o == nil { + return nil + } + return o.ProjectOwnerID +} + +func (o *UpdateProjectLink2) GetProjectURL() *string { + if o == nil { + return nil + } + return o.ProjectURL +} + +func (o *UpdateProjectLink2) GetType() *UpdateProjectLinkProjectsType { + if o == nil { + return nil + } + return o.Type +} + +func (o *UpdateProjectLink2) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectLink2) GetDeployHooks() []UpdateProjectLinkProjectsDeployHooks { + if o == nil { + return []UpdateProjectLinkProjectsDeployHooks{} + } + return o.DeployHooks +} + +func (o *UpdateProjectLink2) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *UpdateProjectLink2) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *UpdateProjectLink2) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *UpdateProjectLink2) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type UpdateProjectLinkType string + +const ( + UpdateProjectLinkTypeGithub UpdateProjectLinkType = "github" +) + +func (e UpdateProjectLinkType) ToPointer() *UpdateProjectLinkType { + return &e +} +func (e *UpdateProjectLinkType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = UpdateProjectLinkType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectLinkType: %v", v) + } +} + +type UpdateProjectLinkDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *UpdateProjectLinkDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectLinkDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectLinkDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectLinkDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *UpdateProjectLinkDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type UpdateProjectLink1 struct { + Org *string `json:"org,omitempty"` + // A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. + RepoOwnerID *float64 `json:"repoOwnerId,omitempty"` + Repo *string `json:"repo,omitempty"` + RepoID *float64 `json:"repoId,omitempty"` + Type *UpdateProjectLinkType `json:"type,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []UpdateProjectLinkDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *UpdateProjectLink1) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} + +func (o *UpdateProjectLink1) GetRepoOwnerID() *float64 { + if o == nil { + return nil + } + return o.RepoOwnerID +} + +func (o *UpdateProjectLink1) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +func (o *UpdateProjectLink1) GetRepoID() *float64 { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *UpdateProjectLink1) GetType() *UpdateProjectLinkType { + if o == nil { + return nil + } + return o.Type +} + +func (o *UpdateProjectLink1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectLink1) GetDeployHooks() []UpdateProjectLinkDeployHooks { + if o == nil { + return []UpdateProjectLinkDeployHooks{} + } + return o.DeployHooks +} + +func (o *UpdateProjectLink1) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *UpdateProjectLink1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *UpdateProjectLink1) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *UpdateProjectLink1) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type UpdateProjectLinkUnionType string + +const ( + UpdateProjectLinkUnionTypeUpdateProjectLink1 UpdateProjectLinkUnionType = "updateProject_link_1" + UpdateProjectLinkUnionTypeUpdateProjectLink2 UpdateProjectLinkUnionType = "updateProject_link_2" + UpdateProjectLinkUnionTypeUpdateProjectLink3 UpdateProjectLinkUnionType = "updateProject_link_3" +) + +type UpdateProjectLink struct { + UpdateProjectLink1 *UpdateProjectLink1 + UpdateProjectLink2 *UpdateProjectLink2 + UpdateProjectLink3 *UpdateProjectLink3 + + Type UpdateProjectLinkUnionType +} + +func CreateUpdateProjectLinkUpdateProjectLink1(updateProjectLink1 UpdateProjectLink1) UpdateProjectLink { + typ := UpdateProjectLinkUnionTypeUpdateProjectLink1 + + return UpdateProjectLink{ + UpdateProjectLink1: &updateProjectLink1, + Type: typ, + } +} + +func CreateUpdateProjectLinkUpdateProjectLink2(updateProjectLink2 UpdateProjectLink2) UpdateProjectLink { + typ := UpdateProjectLinkUnionTypeUpdateProjectLink2 + + return UpdateProjectLink{ + UpdateProjectLink2: &updateProjectLink2, + Type: typ, + } +} + +func CreateUpdateProjectLinkUpdateProjectLink3(updateProjectLink3 UpdateProjectLink3) UpdateProjectLink { + typ := UpdateProjectLinkUnionTypeUpdateProjectLink3 + + return UpdateProjectLink{ + UpdateProjectLink3: &updateProjectLink3, + Type: typ, + } +} + +func (u *UpdateProjectLink) UnmarshalJSON(data []byte) error { + + var updateProjectLink1 UpdateProjectLink1 = UpdateProjectLink1{} + if err := utils.UnmarshalJSON(data, &updateProjectLink1, "", true, true); err == nil { + u.UpdateProjectLink1 = &updateProjectLink1 + u.Type = UpdateProjectLinkUnionTypeUpdateProjectLink1 + return nil + } + + var updateProjectLink3 UpdateProjectLink3 = UpdateProjectLink3{} + if err := utils.UnmarshalJSON(data, &updateProjectLink3, "", true, true); err == nil { + u.UpdateProjectLink3 = &updateProjectLink3 + u.Type = UpdateProjectLinkUnionTypeUpdateProjectLink3 + return nil + } + + var updateProjectLink2 UpdateProjectLink2 = UpdateProjectLink2{} + if err := utils.UnmarshalJSON(data, &updateProjectLink2, "", true, true); err == nil { + u.UpdateProjectLink2 = &updateProjectLink2 + u.Type = UpdateProjectLinkUnionTypeUpdateProjectLink2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectLink", string(data)) +} + +func (u UpdateProjectLink) MarshalJSON() ([]byte, error) { + if u.UpdateProjectLink1 != nil { + return utils.MarshalJSON(u.UpdateProjectLink1, "", true) + } + + if u.UpdateProjectLink2 != nil { + return utils.MarshalJSON(u.UpdateProjectLink2, "", true) + } + + if u.UpdateProjectLink3 != nil { + return utils.MarshalJSON(u.UpdateProjectLink3, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectLink: all fields are null") +} + +type UpdateProjectMicrofrontends struct { + // Timestamp when the microfrontends settings were last updated. + UpdatedAt float64 `json:"updatedAt"` + // The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` + // Whether microfrontends are enabled for this project. + Enabled bool `json:"enabled"` + // Whether this project is the default application for the microfrontends group. The default application is the one that is used as the top level shell for the microfrontends group and hosts the other microfrontends. + IsDefaultApp *bool `json:"isDefaultApp,omitempty"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` +} + +func (o *UpdateProjectMicrofrontends) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *UpdateProjectMicrofrontends) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +func (o *UpdateProjectMicrofrontends) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *UpdateProjectMicrofrontends) GetIsDefaultApp() *bool { + if o == nil { + return nil + } + return o.IsDefaultApp +} + +func (o *UpdateProjectMicrofrontends) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +type UpdateProjectProjectsNodeVersion string + +const ( + UpdateProjectProjectsNodeVersionTwentyTwoX UpdateProjectProjectsNodeVersion = "22.x" + UpdateProjectProjectsNodeVersionTwentyX UpdateProjectProjectsNodeVersion = "20.x" + UpdateProjectProjectsNodeVersionEighteenX UpdateProjectProjectsNodeVersion = "18.x" + UpdateProjectProjectsNodeVersionSixteenX UpdateProjectProjectsNodeVersion = "16.x" + UpdateProjectProjectsNodeVersionFourteenX UpdateProjectProjectsNodeVersion = "14.x" + UpdateProjectProjectsNodeVersionTwelveX UpdateProjectProjectsNodeVersion = "12.x" + UpdateProjectProjectsNodeVersionTenX UpdateProjectProjectsNodeVersion = "10.x" + UpdateProjectProjectsNodeVersionEight10X UpdateProjectProjectsNodeVersion = "8.10.x" +) + +func (e UpdateProjectProjectsNodeVersion) ToPointer() *UpdateProjectProjectsNodeVersion { + return &e +} +func (e *UpdateProjectProjectsNodeVersion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "22.x": + fallthrough + case "20.x": + fallthrough + case "18.x": + fallthrough + case "16.x": + fallthrough + case "14.x": + fallthrough + case "12.x": + fallthrough + case "10.x": + fallthrough + case "8.10.x": + *e = UpdateProjectProjectsNodeVersion(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsNodeVersion: %v", v) + } +} + +type UpdateProjectPaths struct { + Value string `json:"value"` +} + +func (o *UpdateProjectPaths) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type UpdateProjectOptionsAllowlist struct { + Paths []UpdateProjectPaths `json:"paths"` +} + +func (o *UpdateProjectOptionsAllowlist) GetPaths() []UpdateProjectPaths { + if o == nil { + return []UpdateProjectPaths{} + } + return o.Paths +} + +type UpdateProjectPasswordProtection struct { +} + +type UpdateProjectFunctionDefaultMemoryType string + +const ( + UpdateProjectFunctionDefaultMemoryTypeStandardLegacy UpdateProjectFunctionDefaultMemoryType = "standard_legacy" + UpdateProjectFunctionDefaultMemoryTypeStandard UpdateProjectFunctionDefaultMemoryType = "standard" + UpdateProjectFunctionDefaultMemoryTypePerformance UpdateProjectFunctionDefaultMemoryType = "performance" +) + +func (e UpdateProjectFunctionDefaultMemoryType) ToPointer() *UpdateProjectFunctionDefaultMemoryType { + return &e +} +func (e *UpdateProjectFunctionDefaultMemoryType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "standard_legacy": + fallthrough + case "standard": + fallthrough + case "performance": + *e = UpdateProjectFunctionDefaultMemoryType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectFunctionDefaultMemoryType: %v", v) + } +} + +type UpdateProjectResourceConfig struct { + FunctionDefaultRegion *string `json:"functionDefaultRegion,omitempty"` + FunctionDefaultTimeout *float64 `json:"functionDefaultTimeout,omitempty"` + FunctionDefaultMemoryType *UpdateProjectFunctionDefaultMemoryType `json:"functionDefaultMemoryType,omitempty"` + FunctionZeroConfigFailover *bool `json:"functionZeroConfigFailover,omitempty"` + AllowServerlessConcurrency *bool `json:"allowServerlessConcurrency,omitempty"` + ElasticConcurrencyEnabled *bool `json:"elasticConcurrencyEnabled,omitempty"` +} + +func (o *UpdateProjectResourceConfig) GetFunctionDefaultRegion() *string { + if o == nil { + return nil + } + return o.FunctionDefaultRegion +} + +func (o *UpdateProjectResourceConfig) GetFunctionDefaultTimeout() *float64 { + if o == nil { + return nil + } + return o.FunctionDefaultTimeout +} + +func (o *UpdateProjectResourceConfig) GetFunctionDefaultMemoryType() *UpdateProjectFunctionDefaultMemoryType { + if o == nil { + return nil + } + return o.FunctionDefaultMemoryType +} + +func (o *UpdateProjectResourceConfig) GetFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.FunctionZeroConfigFailover +} + +func (o *UpdateProjectResourceConfig) GetAllowServerlessConcurrency() *bool { + if o == nil { + return nil + } + return o.AllowServerlessConcurrency +} + +func (o *UpdateProjectResourceConfig) GetElasticConcurrencyEnabled() *bool { + if o == nil { + return nil + } + return o.ElasticConcurrencyEnabled +} + +type UpdateProjectProjectsResponseDeploymentType string + +const ( + UpdateProjectProjectsResponseDeploymentTypePreview UpdateProjectProjectsResponseDeploymentType = "preview" + UpdateProjectProjectsResponseDeploymentTypeAll UpdateProjectProjectsResponseDeploymentType = "all" + UpdateProjectProjectsResponseDeploymentTypeProdDeploymentUrlsAndAllPreviews UpdateProjectProjectsResponseDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e UpdateProjectProjectsResponseDeploymentType) ToPointer() *UpdateProjectProjectsResponseDeploymentType { + return &e +} +func (e *UpdateProjectProjectsResponseDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = UpdateProjectProjectsResponseDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsResponseDeploymentType: %v", v) + } +} + +type UpdateProjectSsoProtection struct { + DeploymentType UpdateProjectProjectsResponseDeploymentType `json:"deploymentType"` +} + +func (o *UpdateProjectSsoProtection) GetDeploymentType() UpdateProjectProjectsResponseDeploymentType { + if o == nil { + return UpdateProjectProjectsResponseDeploymentType("") + } + return o.DeploymentType +} + +type UpdateProjectProjectsAliasAssignedType string + +const ( + UpdateProjectProjectsAliasAssignedTypeNumber UpdateProjectProjectsAliasAssignedType = "number" + UpdateProjectProjectsAliasAssignedTypeBoolean UpdateProjectProjectsAliasAssignedType = "boolean" +) + +type UpdateProjectProjectsAliasAssigned struct { + Number *float64 + Boolean *bool + + Type UpdateProjectProjectsAliasAssignedType +} + +func CreateUpdateProjectProjectsAliasAssignedNumber(number float64) UpdateProjectProjectsAliasAssigned { + typ := UpdateProjectProjectsAliasAssignedTypeNumber + + return UpdateProjectProjectsAliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateUpdateProjectProjectsAliasAssignedBoolean(boolean bool) UpdateProjectProjectsAliasAssigned { + typ := UpdateProjectProjectsAliasAssignedTypeBoolean + + return UpdateProjectProjectsAliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *UpdateProjectProjectsAliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = UpdateProjectProjectsAliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = UpdateProjectProjectsAliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectProjectsAliasAssigned", string(data)) +} + +func (u UpdateProjectProjectsAliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectProjectsAliasAssigned: all fields are null") +} + +type UpdateProjectProjectsAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *UpdateProjectProjectsAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *UpdateProjectProjectsAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type UpdateProjectProjectsResponse200ApplicationJSONType string + +const ( + UpdateProjectProjectsResponse200ApplicationJSONTypeEndsWith UpdateProjectProjectsResponse200ApplicationJSONType = "endsWith" + UpdateProjectProjectsResponse200ApplicationJSONTypeStartsWith UpdateProjectProjectsResponse200ApplicationJSONType = "startsWith" + UpdateProjectProjectsResponse200ApplicationJSONTypeEquals UpdateProjectProjectsResponse200ApplicationJSONType = "equals" +) + +func (e UpdateProjectProjectsResponse200ApplicationJSONType) ToPointer() *UpdateProjectProjectsResponse200ApplicationJSONType { + return &e +} +func (e *UpdateProjectProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "endsWith": + fallthrough + case "startsWith": + fallthrough + case "equals": + *e = UpdateProjectProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type UpdateProjectProjectsBranchMatcher struct { + Type UpdateProjectProjectsResponse200ApplicationJSONType `json:"type"` + Pattern string `json:"pattern"` +} + +func (o *UpdateProjectProjectsBranchMatcher) GetType() UpdateProjectProjectsResponse200ApplicationJSONType { + if o == nil { + return UpdateProjectProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *UpdateProjectProjectsBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type UpdateProjectProjectsBuilds struct { + Use string `json:"use"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` +} + +func (o *UpdateProjectProjectsBuilds) GetUse() string { + if o == nil { + return "" + } + return o.Use +} + +func (o *UpdateProjectProjectsBuilds) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *UpdateProjectProjectsBuilds) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +type UpdateProjectProjectsChecksConclusion string + +const ( + UpdateProjectProjectsChecksConclusionSucceeded UpdateProjectProjectsChecksConclusion = "succeeded" + UpdateProjectProjectsChecksConclusionFailed UpdateProjectProjectsChecksConclusion = "failed" + UpdateProjectProjectsChecksConclusionSkipped UpdateProjectProjectsChecksConclusion = "skipped" + UpdateProjectProjectsChecksConclusionCanceled UpdateProjectProjectsChecksConclusion = "canceled" +) + +func (e UpdateProjectProjectsChecksConclusion) ToPointer() *UpdateProjectProjectsChecksConclusion { + return &e +} +func (e *UpdateProjectProjectsChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = UpdateProjectProjectsChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsChecksConclusion: %v", v) + } +} + +type UpdateProjectProjectsChecksState string + +const ( + UpdateProjectProjectsChecksStateRegistered UpdateProjectProjectsChecksState = "registered" + UpdateProjectProjectsChecksStateRunning UpdateProjectProjectsChecksState = "running" + UpdateProjectProjectsChecksStateCompleted UpdateProjectProjectsChecksState = "completed" +) + +func (e UpdateProjectProjectsChecksState) ToPointer() *UpdateProjectProjectsChecksState { + return &e +} +func (e *UpdateProjectProjectsChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = UpdateProjectProjectsChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsChecksState: %v", v) + } +} + +type UpdateProjectProjectsCreator struct { + Email string `json:"email"` + GithubLogin *string `json:"githubLogin,omitempty"` + GitlabLogin *string `json:"gitlabLogin,omitempty"` + UID string `json:"uid"` + Username string `json:"username"` +} + +func (o *UpdateProjectProjectsCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *UpdateProjectProjectsCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *UpdateProjectProjectsCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +func (o *UpdateProjectProjectsCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *UpdateProjectProjectsCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +type UpdateProjectProjectsOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateProjectProjectsOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type UpdateProjectProjectsPlan string + +const ( + UpdateProjectProjectsPlanPro UpdateProjectProjectsPlan = "pro" + UpdateProjectProjectsPlanEnterprise UpdateProjectProjectsPlan = "enterprise" + UpdateProjectProjectsPlanHobby UpdateProjectProjectsPlan = "hobby" +) + +func (e UpdateProjectProjectsPlan) ToPointer() *UpdateProjectProjectsPlan { + return &e +} +func (e *UpdateProjectProjectsPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = UpdateProjectProjectsPlan(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsPlan: %v", v) + } +} + +type UpdateProjectProjectsReadyState string + +const ( + UpdateProjectProjectsReadyStateBuilding UpdateProjectProjectsReadyState = "BUILDING" + UpdateProjectProjectsReadyStateError UpdateProjectProjectsReadyState = "ERROR" + UpdateProjectProjectsReadyStateInitializing UpdateProjectProjectsReadyState = "INITIALIZING" + UpdateProjectProjectsReadyStateQueued UpdateProjectProjectsReadyState = "QUEUED" + UpdateProjectProjectsReadyStateReady UpdateProjectProjectsReadyState = "READY" + UpdateProjectProjectsReadyStateCanceled UpdateProjectProjectsReadyState = "CANCELED" +) + +func (e UpdateProjectProjectsReadyState) ToPointer() *UpdateProjectProjectsReadyState { + return &e +} +func (e *UpdateProjectProjectsReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = UpdateProjectProjectsReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsReadyState: %v", v) + } +} + +type UpdateProjectProjectsReadySubstate string + +const ( + UpdateProjectProjectsReadySubstateStaged UpdateProjectProjectsReadySubstate = "STAGED" + UpdateProjectProjectsReadySubstatePromoted UpdateProjectProjectsReadySubstate = "PROMOTED" +) + +func (e UpdateProjectProjectsReadySubstate) ToPointer() *UpdateProjectProjectsReadySubstate { + return &e +} +func (e *UpdateProjectProjectsReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = UpdateProjectProjectsReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsReadySubstate: %v", v) + } +} + +type UpdateProjectProjectsResponseType string + +const ( + UpdateProjectProjectsResponseTypeLambdas UpdateProjectProjectsResponseType = "LAMBDAS" +) + +func (e UpdateProjectProjectsResponseType) ToPointer() *UpdateProjectProjectsResponseType { + return &e +} +func (e *UpdateProjectProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = UpdateProjectProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsResponseType: %v", v) + } +} + +type UpdateProjectTargets struct { + ID string `json:"id"` + Alias []string `json:"alias,omitempty"` + AliasAssigned *UpdateProjectProjectsAliasAssigned `json:"aliasAssigned,omitempty"` + AliasError *UpdateProjectProjectsAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BranchMatcher *UpdateProjectProjectsBranchMatcher `json:"branchMatcher,omitempty"` + BuildingAt *float64 `json:"buildingAt,omitempty"` + Builds []UpdateProjectProjectsBuilds `json:"builds,omitempty"` + ChecksConclusion *UpdateProjectProjectsChecksConclusion `json:"checksConclusion,omitempty"` + ChecksState *UpdateProjectProjectsChecksState `json:"checksState,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedAt float64 `json:"createdAt"` + CreatedIn string `json:"createdIn"` + Creator *UpdateProjectProjectsCreator `json:"creator"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + DeploymentHostname string `json:"deploymentHostname"` + Forced *bool `json:"forced,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OidcTokenClaims *UpdateProjectProjectsOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + Plan UpdateProjectProjectsPlan `json:"plan"` + // Whether or not preview comments are enabled for the deployment + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + Private bool `json:"private"` + ReadyAt *float64 `json:"readyAt,omitempty"` + ReadyState UpdateProjectProjectsReadyState `json:"readyState"` + ReadySubstate *UpdateProjectProjectsReadySubstate `json:"readySubstate,omitempty"` + RequestedAt *float64 `json:"requestedAt,omitempty"` + Target *string `json:"target,omitempty"` + TeamID *string `json:"teamId,omitempty"` + Type UpdateProjectProjectsResponseType `json:"type"` + URL string `json:"url"` + UserID string `json:"userId"` + WithCache *bool `json:"withCache,omitempty"` +} + +func (o *UpdateProjectTargets) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectTargets) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *UpdateProjectTargets) GetAliasAssigned() *UpdateProjectProjectsAliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *UpdateProjectTargets) GetAliasError() *UpdateProjectProjectsAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *UpdateProjectTargets) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *UpdateProjectTargets) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *UpdateProjectTargets) GetBranchMatcher() *UpdateProjectProjectsBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *UpdateProjectTargets) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *UpdateProjectTargets) GetBuilds() []UpdateProjectProjectsBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *UpdateProjectTargets) GetChecksConclusion() *UpdateProjectProjectsChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *UpdateProjectTargets) GetChecksState() *UpdateProjectProjectsChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *UpdateProjectTargets) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *UpdateProjectTargets) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *UpdateProjectTargets) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *UpdateProjectTargets) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *UpdateProjectTargets) GetCreator() *UpdateProjectProjectsCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *UpdateProjectTargets) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *UpdateProjectTargets) GetDeploymentHostname() string { + if o == nil { + return "" + } + return o.DeploymentHostname +} + +func (o *UpdateProjectTargets) GetForced() *bool { + if o == nil { + return nil + } + return o.Forced +} + +func (o *UpdateProjectTargets) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectTargets) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *UpdateProjectTargets) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *UpdateProjectTargets) GetOidcTokenClaims() *UpdateProjectProjectsOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *UpdateProjectTargets) GetPlan() UpdateProjectProjectsPlan { + if o == nil { + return UpdateProjectProjectsPlan("") + } + return o.Plan +} + +func (o *UpdateProjectTargets) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *UpdateProjectTargets) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *UpdateProjectTargets) GetReadyAt() *float64 { + if o == nil { + return nil + } + return o.ReadyAt +} + +func (o *UpdateProjectTargets) GetReadyState() UpdateProjectProjectsReadyState { + if o == nil { + return UpdateProjectProjectsReadyState("") + } + return o.ReadyState +} + +func (o *UpdateProjectTargets) GetReadySubstate() *UpdateProjectProjectsReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *UpdateProjectTargets) GetRequestedAt() *float64 { + if o == nil { + return nil + } + return o.RequestedAt +} + +func (o *UpdateProjectTargets) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *UpdateProjectTargets) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateProjectTargets) GetType() UpdateProjectProjectsResponseType { + if o == nil { + return UpdateProjectProjectsResponseType("") + } + return o.Type +} + +func (o *UpdateProjectTargets) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *UpdateProjectTargets) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *UpdateProjectTargets) GetWithCache() *bool { + if o == nil { + return nil + } + return o.WithCache +} + +type UpdateProjectPermissions struct { + AccessGroup []components.ACLAction `json:"accessGroup,omitempty"` + AliasGlobal []components.ACLAction `json:"aliasGlobal,omitempty"` + AnalyticsSampling []components.ACLAction `json:"analyticsSampling,omitempty"` + AnalyticsUsage []components.ACLAction `json:"analyticsUsage,omitempty"` + AuditLog []components.ACLAction `json:"auditLog,omitempty"` + BillingAddress []components.ACLAction `json:"billingAddress,omitempty"` + BillingInformation []components.ACLAction `json:"billingInformation,omitempty"` + BillingInvoice []components.ACLAction `json:"billingInvoice,omitempty"` + BillingInvoiceEmailRecipient []components.ACLAction `json:"billingInvoiceEmailRecipient,omitempty"` + BillingInvoiceLanguage []components.ACLAction `json:"billingInvoiceLanguage,omitempty"` + BillingPlan []components.ACLAction `json:"billingPlan,omitempty"` + BillingPurchaseOrder []components.ACLAction `json:"billingPurchaseOrder,omitempty"` + BillingTaxID []components.ACLAction `json:"billingTaxId,omitempty"` + Blob []components.ACLAction `json:"blob,omitempty"` + Budget []components.ACLAction `json:"budget,omitempty"` + CacheArtifact []components.ACLAction `json:"cacheArtifact,omitempty"` + CacheArtifactUsageEvent []components.ACLAction `json:"cacheArtifactUsageEvent,omitempty"` + CodeChecks []components.ACLAction `json:"codeChecks,omitempty"` + ConcurrentBuilds []components.ACLAction `json:"concurrentBuilds,omitempty"` + Connect []components.ACLAction `json:"connect,omitempty"` + ConnectConfiguration []components.ACLAction `json:"connectConfiguration,omitempty"` + Domain []components.ACLAction `json:"domain,omitempty"` + DomainAcceptDelegation []components.ACLAction `json:"domainAcceptDelegation,omitempty"` + DomainAuthCodes []components.ACLAction `json:"domainAuthCodes,omitempty"` + DomainCertificate []components.ACLAction `json:"domainCertificate,omitempty"` + DomainCheckConfig []components.ACLAction `json:"domainCheckConfig,omitempty"` + DomainMove []components.ACLAction `json:"domainMove,omitempty"` + DomainPurchase []components.ACLAction `json:"domainPurchase,omitempty"` + DomainRecord []components.ACLAction `json:"domainRecord,omitempty"` + DomainTransferIn []components.ACLAction `json:"domainTransferIn,omitempty"` + Event []components.ACLAction `json:"event,omitempty"` + OwnEvent []components.ACLAction `json:"ownEvent,omitempty"` + SensitiveEnvironmentVariablePolicy []components.ACLAction `json:"sensitiveEnvironmentVariablePolicy,omitempty"` + FileUpload []components.ACLAction `json:"fileUpload,omitempty"` + GitRepository []components.ACLAction `json:"gitRepository,omitempty"` + IPBlocking []components.ACLAction `json:"ipBlocking,omitempty"` + Integration []components.ACLAction `json:"integration,omitempty"` + IntegrationAccount []components.ACLAction `json:"integrationAccount,omitempty"` + IntegrationConfiguration []components.ACLAction `json:"integrationConfiguration,omitempty"` + IntegrationConfigurationTransfer []components.ACLAction `json:"integrationConfigurationTransfer,omitempty"` + IntegrationConfigurationProjects []components.ACLAction `json:"integrationConfigurationProjects,omitempty"` + IntegrationVercelConfigurationOverride []components.ACLAction `json:"integrationVercelConfigurationOverride,omitempty"` + IntegrationConfigurationRole []components.ACLAction `json:"integrationConfigurationRole,omitempty"` + IntegrationResource []components.ACLAction `json:"integrationResource,omitempty"` + IntegrationEvent []components.ACLAction `json:"integrationEvent,omitempty"` + IntegrationResourceSecrets []components.ACLAction `json:"integrationResourceSecrets,omitempty"` + IntegrationDeploymentAction []components.ACLAction `json:"integrationDeploymentAction,omitempty"` + MarketplaceInstallationMember []components.ACLAction `json:"marketplaceInstallationMember,omitempty"` + MarketplaceBillingData []components.ACLAction `json:"marketplaceBillingData,omitempty"` + MarketplaceInvoice []components.ACLAction `json:"marketplaceInvoice,omitempty"` + JobGlobal []components.ACLAction `json:"jobGlobal,omitempty"` + LogDrain []components.ACLAction `json:"logDrain,omitempty"` + Monitoring []components.ACLAction `json:"Monitoring,omitempty"` + MonitoringSettings []components.ACLAction `json:"monitoringSettings,omitempty"` + MonitoringQuery []components.ACLAction `json:"monitoringQuery,omitempty"` + MonitoringChart []components.ACLAction `json:"monitoringChart,omitempty"` + MonitoringAlert []components.ACLAction `json:"monitoringAlert,omitempty"` + NotificationDeploymentFailed []components.ACLAction `json:"notificationDeploymentFailed,omitempty"` + NotificationDomainConfiguration []components.ACLAction `json:"notificationDomainConfiguration,omitempty"` + NotificationDomainExpire []components.ACLAction `json:"notificationDomainExpire,omitempty"` + NotificationDomainMoved []components.ACLAction `json:"notificationDomainMoved,omitempty"` + NotificationDomainPurchase []components.ACLAction `json:"notificationDomainPurchase,omitempty"` + NotificationDomainRenewal []components.ACLAction `json:"notificationDomainRenewal,omitempty"` + NotificationDomainTransfer []components.ACLAction `json:"notificationDomainTransfer,omitempty"` + NotificationDomainUnverified []components.ACLAction `json:"notificationDomainUnverified,omitempty"` + NotificationMonitoringAlert []components.ACLAction `json:"NotificationMonitoringAlert,omitempty"` + NotificationPaymentFailed []components.ACLAction `json:"notificationPaymentFailed,omitempty"` + NotificationUsageAlert []components.ACLAction `json:"notificationUsageAlert,omitempty"` + NotificationCustomerBudget []components.ACLAction `json:"notificationCustomerBudget,omitempty"` + NotificationStatementOfReasons []components.ACLAction `json:"notificationStatementOfReasons,omitempty"` + Oauth2Connection []components.ACLAction `json:"oauth2Connection,omitempty"` + ObservabilityConfiguration []components.ACLAction `json:"observabilityConfiguration,omitempty"` + OpenTelemetryEndpoint []components.ACLAction `json:"openTelemetryEndpoint,omitempty"` + PaymentMethod []components.ACLAction `json:"paymentMethod,omitempty"` + Permissions []components.ACLAction `json:"permissions,omitempty"` + Postgres []components.ACLAction `json:"postgres,omitempty"` + PreviewDeploymentSuffix []components.ACLAction `json:"previewDeploymentSuffix,omitempty"` + ProTrialOnboarding []components.ACLAction `json:"proTrialOnboarding,omitempty"` + SharedEnvVars []components.ACLAction `json:"sharedEnvVars,omitempty"` + SharedEnvVarsProduction []components.ACLAction `json:"sharedEnvVarsProduction,omitempty"` + Space []components.ACLAction `json:"space,omitempty"` + SpaceRun []components.ACLAction `json:"spaceRun,omitempty"` + PasswordProtectionInvoiceItem []components.ACLAction `json:"passwordProtectionInvoiceItem,omitempty"` + RateLimit []components.ACLAction `json:"rateLimit,omitempty"` + Redis []components.ACLAction `json:"redis,omitempty"` + Repository []components.ACLAction `json:"repository,omitempty"` + RemoteCaching []components.ACLAction `json:"remoteCaching,omitempty"` + SamlConfig []components.ACLAction `json:"samlConfig,omitempty"` + Secret []components.ACLAction `json:"secret,omitempty"` + RedisStoreTokenSet []components.ACLAction `json:"redisStoreTokenSet,omitempty"` + BlobStoreTokenSet []components.ACLAction `json:"blobStoreTokenSet,omitempty"` + PostgresStoreTokenSet []components.ACLAction `json:"postgresStoreTokenSet,omitempty"` + IntegrationStoreTokenSet []components.ACLAction `json:"integrationStoreTokenSet,omitempty"` + IntegrationResourceReplCommand []components.ACLAction `json:"integrationResourceReplCommand,omitempty"` + StoreTransfer []components.ACLAction `json:"storeTransfer,omitempty"` + SupportCase []components.ACLAction `json:"supportCase,omitempty"` + SupportCaseComment []components.ACLAction `json:"supportCaseComment,omitempty"` + DataCacheBillingSettings []components.ACLAction `json:"dataCacheBillingSettings,omitempty"` + Team []components.ACLAction `json:"team,omitempty"` + TeamAccessRequest []components.ACLAction `json:"teamAccessRequest,omitempty"` + TeamFellowMembership []components.ACLAction `json:"teamFellowMembership,omitempty"` + TeamGitExclusivity []components.ACLAction `json:"teamGitExclusivity,omitempty"` + TeamInvite []components.ACLAction `json:"teamInvite,omitempty"` + TeamInviteCode []components.ACLAction `json:"teamInviteCode,omitempty"` + TeamJoin []components.ACLAction `json:"teamJoin,omitempty"` + TeamMicrofrontends []components.ACLAction `json:"teamMicrofrontends,omitempty"` + TeamOwnMembership []components.ACLAction `json:"teamOwnMembership,omitempty"` + TeamOwnMembershipDisconnectSAML []components.ACLAction `json:"teamOwnMembershipDisconnectSAML,omitempty"` + Token []components.ACLAction `json:"token,omitempty"` + Usage []components.ACLAction `json:"usage,omitempty"` + UsageCycle []components.ACLAction `json:"usageCycle,omitempty"` + User []components.ACLAction `json:"user,omitempty"` + UserConnection []components.ACLAction `json:"userConnection,omitempty"` + VpcPeeringConnection []components.ACLAction `json:"vpcPeeringConnection,omitempty"` + WebAnalyticsPlan []components.ACLAction `json:"webAnalyticsPlan,omitempty"` + WebAuthn []components.ACLAction `json:"webAuthn,omitempty"` + EdgeConfig []components.ACLAction `json:"edgeConfig,omitempty"` + EdgeConfigItem []components.ACLAction `json:"edgeConfigItem,omitempty"` + EdgeConfigSchema []components.ACLAction `json:"edgeConfigSchema,omitempty"` + EdgeConfigToken []components.ACLAction `json:"edgeConfigToken,omitempty"` + Webhook []components.ACLAction `json:"webhook,omitempty"` + WebhookEvent []components.ACLAction `json:"webhook-event,omitempty"` + EndpointVerification []components.ACLAction `json:"endpointVerification,omitempty"` + ProjectTransferIn []components.ACLAction `json:"projectTransferIn,omitempty"` + Oauth2Application []components.ACLAction `json:"oauth2Application,omitempty"` + AliasProject []components.ACLAction `json:"aliasProject,omitempty"` + AliasProtectionBypass []components.ACLAction `json:"aliasProtectionBypass,omitempty"` + ProductionAliasProtectionBypass []components.ACLAction `json:"productionAliasProtectionBypass,omitempty"` + ConnectConfigurationLink []components.ACLAction `json:"connectConfigurationLink,omitempty"` + DataCacheNamespace []components.ACLAction `json:"dataCacheNamespace,omitempty"` + Deployment []components.ACLAction `json:"deployment,omitempty"` + DeploymentCheck []components.ACLAction `json:"deploymentCheck,omitempty"` + DeploymentCheckPreview []components.ACLAction `json:"deploymentCheckPreview,omitempty"` + DeploymentCheckReRunFromProductionBranch []components.ACLAction `json:"deploymentCheckReRunFromProductionBranch,omitempty"` + DeploymentProductionGit []components.ACLAction `json:"deploymentProductionGit,omitempty"` + DeploymentV0 []components.ACLAction `json:"deploymentV0,omitempty"` + DeploymentPreview []components.ACLAction `json:"deploymentPreview,omitempty"` + DeploymentPrivate []components.ACLAction `json:"deploymentPrivate,omitempty"` + DeploymentPromote []components.ACLAction `json:"deploymentPromote,omitempty"` + DeploymentRollback []components.ACLAction `json:"deploymentRollback,omitempty"` + Environments []components.ACLAction `json:"environments,omitempty"` + Logs []components.ACLAction `json:"logs,omitempty"` + LogsPreset []components.ACLAction `json:"logsPreset,omitempty"` + PasswordProtection []components.ACLAction `json:"passwordProtection,omitempty"` + OptionsAllowlist []components.ACLAction `json:"optionsAllowlist,omitempty"` + Job []components.ACLAction `json:"job,omitempty"` + ObservabilityData []components.ACLAction `json:"observabilityData,omitempty"` + Project []components.ACLAction `json:"project,omitempty"` + ProjectFromV0 []components.ACLAction `json:"projectFromV0,omitempty"` + ProjectAccessGroup []components.ACLAction `json:"projectAccessGroup,omitempty"` + ProjectAnalyticsSampling []components.ACLAction `json:"projectAnalyticsSampling,omitempty"` + ProjectDeploymentHook []components.ACLAction `json:"projectDeploymentHook,omitempty"` + ProjectDomain []components.ACLAction `json:"projectDomain,omitempty"` + ProjectDomainMove []components.ACLAction `json:"projectDomainMove,omitempty"` + ProjectDomainCheckConfig []components.ACLAction `json:"projectDomainCheckConfig,omitempty"` + ProjectEnvVars []components.ACLAction `json:"projectEnvVars,omitempty"` + ProjectEnvVarsProduction []components.ACLAction `json:"projectEnvVarsProduction,omitempty"` + ProjectEnvVarsUnownedByIntegration []components.ACLAction `json:"projectEnvVarsUnownedByIntegration,omitempty"` + ProjectFlags []components.ACLAction `json:"projectFlags,omitempty"` + ProjectID []components.ACLAction `json:"projectId,omitempty"` + ProjectIntegrationConfiguration []components.ACLAction `json:"projectIntegrationConfiguration,omitempty"` + ProjectLink []components.ACLAction `json:"projectLink,omitempty"` + ProjectMember []components.ACLAction `json:"projectMember,omitempty"` + ProjectMonitoring []components.ACLAction `json:"projectMonitoring,omitempty"` + ProjectPermissions []components.ACLAction `json:"projectPermissions,omitempty"` + ProjectProductionBranch []components.ACLAction `json:"projectProductionBranch,omitempty"` + ProjectTransfer []components.ACLAction `json:"projectTransfer,omitempty"` + ProjectTransferOut []components.ACLAction `json:"projectTransferOut,omitempty"` + ProjectProtectionBypass []components.ACLAction `json:"projectProtectionBypass,omitempty"` + ProjectUsage []components.ACLAction `json:"projectUsage,omitempty"` + ProjectAnalyticsUsage []components.ACLAction `json:"projectAnalyticsUsage,omitempty"` + ProjectSupportCase []components.ACLAction `json:"projectSupportCase,omitempty"` + ProjectSupportCaseComment []components.ACLAction `json:"projectSupportCaseComment,omitempty"` + ProjectDeploymentExpiration []components.ACLAction `json:"projectDeploymentExpiration,omitempty"` + ProjectTier []components.ACLAction `json:"projectTier,omitempty"` + SeawallConfig []components.ACLAction `json:"seawallConfig,omitempty"` + SkewProtection []components.ACLAction `json:"skewProtection,omitempty"` + Analytics []components.ACLAction `json:"analytics,omitempty"` + TrustedIps []components.ACLAction `json:"trustedIps,omitempty"` + WebAnalytics []components.ACLAction `json:"webAnalytics,omitempty"` + SharedEnvVarConnection []components.ACLAction `json:"sharedEnvVarConnection,omitempty"` + Sonar []components.ACLAction `json:"sonar,omitempty"` +} + +func (o *UpdateProjectPermissions) GetAccessGroup() []components.ACLAction { + if o == nil { + return nil + } + return o.AccessGroup +} + +func (o *UpdateProjectPermissions) GetAliasGlobal() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasGlobal +} + +func (o *UpdateProjectPermissions) GetAnalyticsSampling() []components.ACLAction { + if o == nil { + return nil + } + return o.AnalyticsSampling +} + +func (o *UpdateProjectPermissions) GetAnalyticsUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.AnalyticsUsage +} + +func (o *UpdateProjectPermissions) GetAuditLog() []components.ACLAction { + if o == nil { + return nil + } + return o.AuditLog +} + +func (o *UpdateProjectPermissions) GetBillingAddress() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingAddress +} + +func (o *UpdateProjectPermissions) GetBillingInformation() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInformation +} + +func (o *UpdateProjectPermissions) GetBillingInvoice() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoice +} + +func (o *UpdateProjectPermissions) GetBillingInvoiceEmailRecipient() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoiceEmailRecipient +} + +func (o *UpdateProjectPermissions) GetBillingInvoiceLanguage() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoiceLanguage +} + +func (o *UpdateProjectPermissions) GetBillingPlan() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingPlan +} + +func (o *UpdateProjectPermissions) GetBillingPurchaseOrder() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingPurchaseOrder +} + +func (o *UpdateProjectPermissions) GetBillingTaxID() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingTaxID +} + +func (o *UpdateProjectPermissions) GetBlob() []components.ACLAction { + if o == nil { + return nil + } + return o.Blob +} + +func (o *UpdateProjectPermissions) GetBudget() []components.ACLAction { + if o == nil { + return nil + } + return o.Budget +} + +func (o *UpdateProjectPermissions) GetCacheArtifact() []components.ACLAction { + if o == nil { + return nil + } + return o.CacheArtifact +} + +func (o *UpdateProjectPermissions) GetCacheArtifactUsageEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.CacheArtifactUsageEvent +} + +func (o *UpdateProjectPermissions) GetCodeChecks() []components.ACLAction { + if o == nil { + return nil + } + return o.CodeChecks +} + +func (o *UpdateProjectPermissions) GetConcurrentBuilds() []components.ACLAction { + if o == nil { + return nil + } + return o.ConcurrentBuilds +} + +func (o *UpdateProjectPermissions) GetConnect() []components.ACLAction { + if o == nil { + return nil + } + return o.Connect +} + +func (o *UpdateProjectPermissions) GetConnectConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ConnectConfiguration +} + +func (o *UpdateProjectPermissions) GetDomain() []components.ACLAction { + if o == nil { + return nil + } + return o.Domain +} + +func (o *UpdateProjectPermissions) GetDomainAcceptDelegation() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainAcceptDelegation +} + +func (o *UpdateProjectPermissions) GetDomainAuthCodes() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainAuthCodes +} + +func (o *UpdateProjectPermissions) GetDomainCertificate() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainCertificate +} + +func (o *UpdateProjectPermissions) GetDomainCheckConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainCheckConfig +} + +func (o *UpdateProjectPermissions) GetDomainMove() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainMove +} + +func (o *UpdateProjectPermissions) GetDomainPurchase() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainPurchase +} + +func (o *UpdateProjectPermissions) GetDomainRecord() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainRecord +} + +func (o *UpdateProjectPermissions) GetDomainTransferIn() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainTransferIn +} + +func (o *UpdateProjectPermissions) GetEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.Event +} + +func (o *UpdateProjectPermissions) GetOwnEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.OwnEvent +} + +func (o *UpdateProjectPermissions) GetSensitiveEnvironmentVariablePolicy() []components.ACLAction { + if o == nil { + return nil + } + return o.SensitiveEnvironmentVariablePolicy +} + +func (o *UpdateProjectPermissions) GetFileUpload() []components.ACLAction { + if o == nil { + return nil + } + return o.FileUpload +} + +func (o *UpdateProjectPermissions) GetGitRepository() []components.ACLAction { + if o == nil { + return nil + } + return o.GitRepository +} + +func (o *UpdateProjectPermissions) GetIPBlocking() []components.ACLAction { + if o == nil { + return nil + } + return o.IPBlocking +} + +func (o *UpdateProjectPermissions) GetIntegration() []components.ACLAction { + if o == nil { + return nil + } + return o.Integration +} + +func (o *UpdateProjectPermissions) GetIntegrationAccount() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationAccount +} + +func (o *UpdateProjectPermissions) GetIntegrationConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfiguration +} + +func (o *UpdateProjectPermissions) GetIntegrationConfigurationTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationTransfer +} + +func (o *UpdateProjectPermissions) GetIntegrationConfigurationProjects() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationProjects +} + +func (o *UpdateProjectPermissions) GetIntegrationVercelConfigurationOverride() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationVercelConfigurationOverride +} + +func (o *UpdateProjectPermissions) GetIntegrationConfigurationRole() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationRole +} + +func (o *UpdateProjectPermissions) GetIntegrationResource() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResource +} + +func (o *UpdateProjectPermissions) GetIntegrationEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationEvent +} + +func (o *UpdateProjectPermissions) GetIntegrationResourceSecrets() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResourceSecrets +} + +func (o *UpdateProjectPermissions) GetIntegrationDeploymentAction() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationDeploymentAction +} + +func (o *UpdateProjectPermissions) GetMarketplaceInstallationMember() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceInstallationMember +} + +func (o *UpdateProjectPermissions) GetMarketplaceBillingData() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceBillingData +} + +func (o *UpdateProjectPermissions) GetMarketplaceInvoice() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceInvoice +} + +func (o *UpdateProjectPermissions) GetJobGlobal() []components.ACLAction { + if o == nil { + return nil + } + return o.JobGlobal +} + +func (o *UpdateProjectPermissions) GetLogDrain() []components.ACLAction { + if o == nil { + return nil + } + return o.LogDrain +} + +func (o *UpdateProjectPermissions) GetMonitoring() []components.ACLAction { + if o == nil { + return nil + } + return o.Monitoring +} + +func (o *UpdateProjectPermissions) GetMonitoringSettings() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringSettings +} + +func (o *UpdateProjectPermissions) GetMonitoringQuery() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringQuery +} + +func (o *UpdateProjectPermissions) GetMonitoringChart() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringChart +} + +func (o *UpdateProjectPermissions) GetMonitoringAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringAlert +} + +func (o *UpdateProjectPermissions) GetNotificationDeploymentFailed() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDeploymentFailed +} + +func (o *UpdateProjectPermissions) GetNotificationDomainConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainConfiguration +} + +func (o *UpdateProjectPermissions) GetNotificationDomainExpire() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainExpire +} + +func (o *UpdateProjectPermissions) GetNotificationDomainMoved() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainMoved +} + +func (o *UpdateProjectPermissions) GetNotificationDomainPurchase() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainPurchase +} + +func (o *UpdateProjectPermissions) GetNotificationDomainRenewal() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainRenewal +} + +func (o *UpdateProjectPermissions) GetNotificationDomainTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainTransfer +} + +func (o *UpdateProjectPermissions) GetNotificationDomainUnverified() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainUnverified +} + +func (o *UpdateProjectPermissions) GetNotificationMonitoringAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationMonitoringAlert +} + +func (o *UpdateProjectPermissions) GetNotificationPaymentFailed() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationPaymentFailed +} + +func (o *UpdateProjectPermissions) GetNotificationUsageAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationUsageAlert +} + +func (o *UpdateProjectPermissions) GetNotificationCustomerBudget() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationCustomerBudget +} + +func (o *UpdateProjectPermissions) GetNotificationStatementOfReasons() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationStatementOfReasons +} + +func (o *UpdateProjectPermissions) GetOauth2Connection() []components.ACLAction { + if o == nil { + return nil + } + return o.Oauth2Connection +} + +func (o *UpdateProjectPermissions) GetObservabilityConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ObservabilityConfiguration +} + +func (o *UpdateProjectPermissions) GetOpenTelemetryEndpoint() []components.ACLAction { + if o == nil { + return nil + } + return o.OpenTelemetryEndpoint +} + +func (o *UpdateProjectPermissions) GetPaymentMethod() []components.ACLAction { + if o == nil { + return nil + } + return o.PaymentMethod +} + +func (o *UpdateProjectPermissions) GetPermissions() []components.ACLAction { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *UpdateProjectPermissions) GetPostgres() []components.ACLAction { + if o == nil { + return nil + } + return o.Postgres +} + +func (o *UpdateProjectPermissions) GetPreviewDeploymentSuffix() []components.ACLAction { + if o == nil { + return nil + } + return o.PreviewDeploymentSuffix +} + +func (o *UpdateProjectPermissions) GetProTrialOnboarding() []components.ACLAction { + if o == nil { + return nil + } + return o.ProTrialOnboarding +} + +func (o *UpdateProjectPermissions) GetSharedEnvVars() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVars +} + +func (o *UpdateProjectPermissions) GetSharedEnvVarsProduction() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVarsProduction +} + +func (o *UpdateProjectPermissions) GetSpace() []components.ACLAction { + if o == nil { + return nil + } + return o.Space +} + +func (o *UpdateProjectPermissions) GetSpaceRun() []components.ACLAction { + if o == nil { + return nil + } + return o.SpaceRun +} + +func (o *UpdateProjectPermissions) GetPasswordProtectionInvoiceItem() []components.ACLAction { + if o == nil { + return nil + } + return o.PasswordProtectionInvoiceItem +} + +func (o *UpdateProjectPermissions) GetRateLimit() []components.ACLAction { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *UpdateProjectPermissions) GetRedis() []components.ACLAction { + if o == nil { + return nil + } + return o.Redis +} + +func (o *UpdateProjectPermissions) GetRepository() []components.ACLAction { + if o == nil { + return nil + } + return o.Repository +} + +func (o *UpdateProjectPermissions) GetRemoteCaching() []components.ACLAction { + if o == nil { + return nil + } + return o.RemoteCaching +} + +func (o *UpdateProjectPermissions) GetSamlConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.SamlConfig +} + +func (o *UpdateProjectPermissions) GetSecret() []components.ACLAction { + if o == nil { + return nil + } + return o.Secret +} + +func (o *UpdateProjectPermissions) GetRedisStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.RedisStoreTokenSet +} + +func (o *UpdateProjectPermissions) GetBlobStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.BlobStoreTokenSet +} + +func (o *UpdateProjectPermissions) GetPostgresStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.PostgresStoreTokenSet +} + +func (o *UpdateProjectPermissions) GetIntegrationStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationStoreTokenSet +} + +func (o *UpdateProjectPermissions) GetIntegrationResourceReplCommand() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResourceReplCommand +} + +func (o *UpdateProjectPermissions) GetStoreTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.StoreTransfer +} + +func (o *UpdateProjectPermissions) GetSupportCase() []components.ACLAction { + if o == nil { + return nil + } + return o.SupportCase +} + +func (o *UpdateProjectPermissions) GetSupportCaseComment() []components.ACLAction { + if o == nil { + return nil + } + return o.SupportCaseComment +} + +func (o *UpdateProjectPermissions) GetDataCacheBillingSettings() []components.ACLAction { + if o == nil { + return nil + } + return o.DataCacheBillingSettings +} + +func (o *UpdateProjectPermissions) GetTeam() []components.ACLAction { + if o == nil { + return nil + } + return o.Team +} + +func (o *UpdateProjectPermissions) GetTeamAccessRequest() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamAccessRequest +} + +func (o *UpdateProjectPermissions) GetTeamFellowMembership() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamFellowMembership +} + +func (o *UpdateProjectPermissions) GetTeamGitExclusivity() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamGitExclusivity +} + +func (o *UpdateProjectPermissions) GetTeamInvite() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamInvite +} + +func (o *UpdateProjectPermissions) GetTeamInviteCode() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamInviteCode +} + +func (o *UpdateProjectPermissions) GetTeamJoin() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamJoin +} + +func (o *UpdateProjectPermissions) GetTeamMicrofrontends() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamMicrofrontends +} + +func (o *UpdateProjectPermissions) GetTeamOwnMembership() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamOwnMembership +} + +func (o *UpdateProjectPermissions) GetTeamOwnMembershipDisconnectSAML() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamOwnMembershipDisconnectSAML +} + +func (o *UpdateProjectPermissions) GetToken() []components.ACLAction { + if o == nil { + return nil + } + return o.Token +} + +func (o *UpdateProjectPermissions) GetUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.Usage +} + +func (o *UpdateProjectPermissions) GetUsageCycle() []components.ACLAction { + if o == nil { + return nil + } + return o.UsageCycle +} + +func (o *UpdateProjectPermissions) GetUser() []components.ACLAction { + if o == nil { + return nil + } + return o.User +} + +func (o *UpdateProjectPermissions) GetUserConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.UserConnection +} + +func (o *UpdateProjectPermissions) GetVpcPeeringConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.VpcPeeringConnection +} + +func (o *UpdateProjectPermissions) GetWebAnalyticsPlan() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAnalyticsPlan +} + +func (o *UpdateProjectPermissions) GetWebAuthn() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAuthn +} + +func (o *UpdateProjectPermissions) GetEdgeConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfig +} + +func (o *UpdateProjectPermissions) GetEdgeConfigItem() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigItem +} + +func (o *UpdateProjectPermissions) GetEdgeConfigSchema() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigSchema +} + +func (o *UpdateProjectPermissions) GetEdgeConfigToken() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigToken +} + +func (o *UpdateProjectPermissions) GetWebhook() []components.ACLAction { + if o == nil { + return nil + } + return o.Webhook +} + +func (o *UpdateProjectPermissions) GetWebhookEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.WebhookEvent +} + +func (o *UpdateProjectPermissions) GetEndpointVerification() []components.ACLAction { + if o == nil { + return nil + } + return o.EndpointVerification +} + +func (o *UpdateProjectPermissions) GetProjectTransferIn() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransferIn +} + +func (o *UpdateProjectPermissions) GetOauth2Application() []components.ACLAction { + if o == nil { + return nil + } + return o.Oauth2Application +} + +func (o *UpdateProjectPermissions) GetAliasProject() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasProject +} + +func (o *UpdateProjectPermissions) GetAliasProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasProtectionBypass +} + +func (o *UpdateProjectPermissions) GetProductionAliasProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.ProductionAliasProtectionBypass +} + +func (o *UpdateProjectPermissions) GetConnectConfigurationLink() []components.ACLAction { + if o == nil { + return nil + } + return o.ConnectConfigurationLink +} + +func (o *UpdateProjectPermissions) GetDataCacheNamespace() []components.ACLAction { + if o == nil { + return nil + } + return o.DataCacheNamespace +} + +func (o *UpdateProjectPermissions) GetDeployment() []components.ACLAction { + if o == nil { + return nil + } + return o.Deployment +} + +func (o *UpdateProjectPermissions) GetDeploymentCheck() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheck +} + +func (o *UpdateProjectPermissions) GetDeploymentCheckPreview() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheckPreview +} + +func (o *UpdateProjectPermissions) GetDeploymentCheckReRunFromProductionBranch() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheckReRunFromProductionBranch +} + +func (o *UpdateProjectPermissions) GetDeploymentProductionGit() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentProductionGit +} + +func (o *UpdateProjectPermissions) GetDeploymentV0() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentV0 +} + +func (o *UpdateProjectPermissions) GetDeploymentPreview() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPreview +} + +func (o *UpdateProjectPermissions) GetDeploymentPrivate() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPrivate +} + +func (o *UpdateProjectPermissions) GetDeploymentPromote() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPromote +} + +func (o *UpdateProjectPermissions) GetDeploymentRollback() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentRollback +} + +func (o *UpdateProjectPermissions) GetEnvironments() []components.ACLAction { + if o == nil { + return nil + } + return o.Environments +} + +func (o *UpdateProjectPermissions) GetLogs() []components.ACLAction { + if o == nil { + return nil + } + return o.Logs +} + +func (o *UpdateProjectPermissions) GetLogsPreset() []components.ACLAction { + if o == nil { + return nil + } + return o.LogsPreset +} + +func (o *UpdateProjectPermissions) GetPasswordProtection() []components.ACLAction { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *UpdateProjectPermissions) GetOptionsAllowlist() []components.ACLAction { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +func (o *UpdateProjectPermissions) GetJob() []components.ACLAction { + if o == nil { + return nil + } + return o.Job +} + +func (o *UpdateProjectPermissions) GetObservabilityData() []components.ACLAction { + if o == nil { + return nil + } + return o.ObservabilityData +} + +func (o *UpdateProjectPermissions) GetProject() []components.ACLAction { + if o == nil { + return nil + } + return o.Project +} + +func (o *UpdateProjectPermissions) GetProjectFromV0() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectFromV0 +} + +func (o *UpdateProjectPermissions) GetProjectAccessGroup() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAccessGroup +} + +func (o *UpdateProjectPermissions) GetProjectAnalyticsSampling() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAnalyticsSampling +} + +func (o *UpdateProjectPermissions) GetProjectDeploymentHook() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDeploymentHook +} + +func (o *UpdateProjectPermissions) GetProjectDomain() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomain +} + +func (o *UpdateProjectPermissions) GetProjectDomainMove() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomainMove +} + +func (o *UpdateProjectPermissions) GetProjectDomainCheckConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomainCheckConfig +} + +func (o *UpdateProjectPermissions) GetProjectEnvVars() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVars +} + +func (o *UpdateProjectPermissions) GetProjectEnvVarsProduction() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVarsProduction +} + +func (o *UpdateProjectPermissions) GetProjectEnvVarsUnownedByIntegration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVarsUnownedByIntegration +} + +func (o *UpdateProjectPermissions) GetProjectFlags() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectFlags +} + +func (o *UpdateProjectPermissions) GetProjectID() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *UpdateProjectPermissions) GetProjectIntegrationConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectIntegrationConfiguration +} + +func (o *UpdateProjectPermissions) GetProjectLink() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectLink +} + +func (o *UpdateProjectPermissions) GetProjectMember() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectMember +} + +func (o *UpdateProjectPermissions) GetProjectMonitoring() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectMonitoring +} + +func (o *UpdateProjectPermissions) GetProjectPermissions() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectPermissions +} + +func (o *UpdateProjectPermissions) GetProjectProductionBranch() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectProductionBranch +} + +func (o *UpdateProjectPermissions) GetProjectTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransfer +} + +func (o *UpdateProjectPermissions) GetProjectTransferOut() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransferOut +} + +func (o *UpdateProjectPermissions) GetProjectProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectProtectionBypass +} + +func (o *UpdateProjectPermissions) GetProjectUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectUsage +} + +func (o *UpdateProjectPermissions) GetProjectAnalyticsUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAnalyticsUsage +} + +func (o *UpdateProjectPermissions) GetProjectSupportCase() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectSupportCase +} + +func (o *UpdateProjectPermissions) GetProjectSupportCaseComment() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectSupportCaseComment +} + +func (o *UpdateProjectPermissions) GetProjectDeploymentExpiration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDeploymentExpiration +} + +func (o *UpdateProjectPermissions) GetProjectTier() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTier +} + +func (o *UpdateProjectPermissions) GetSeawallConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.SeawallConfig +} + +func (o *UpdateProjectPermissions) GetSkewProtection() []components.ACLAction { + if o == nil { + return nil + } + return o.SkewProtection +} + +func (o *UpdateProjectPermissions) GetAnalytics() []components.ACLAction { + if o == nil { + return nil + } + return o.Analytics +} + +func (o *UpdateProjectPermissions) GetTrustedIps() []components.ACLAction { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *UpdateProjectPermissions) GetWebAnalytics() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *UpdateProjectPermissions) GetSharedEnvVarConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVarConnection +} + +func (o *UpdateProjectPermissions) GetSonar() []components.ACLAction { + if o == nil { + return nil + } + return o.Sonar +} + +type UpdateProjectLastRollbackTarget struct { +} + +type UpdateProjectJobStatus string + +const ( + UpdateProjectJobStatusSucceeded UpdateProjectJobStatus = "succeeded" + UpdateProjectJobStatusFailed UpdateProjectJobStatus = "failed" + UpdateProjectJobStatusSkipped UpdateProjectJobStatus = "skipped" + UpdateProjectJobStatusPending UpdateProjectJobStatus = "pending" + UpdateProjectJobStatusInProgress UpdateProjectJobStatus = "in-progress" +) + +func (e UpdateProjectJobStatus) ToPointer() *UpdateProjectJobStatus { + return &e +} +func (e *UpdateProjectJobStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "pending": + fallthrough + case "in-progress": + *e = UpdateProjectJobStatus(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectJobStatus: %v", v) + } +} + +type UpdateProjectProjectsResponse200Type string + +const ( + UpdateProjectProjectsResponse200TypePromote UpdateProjectProjectsResponse200Type = "promote" + UpdateProjectProjectsResponse200TypeRollback UpdateProjectProjectsResponse200Type = "rollback" +) + +func (e UpdateProjectProjectsResponse200Type) ToPointer() *UpdateProjectProjectsResponse200Type { + return &e +} +func (e *UpdateProjectProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "promote": + fallthrough + case "rollback": + *e = UpdateProjectProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsResponse200Type: %v", v) + } +} + +type UpdateProjectLastAliasRequest struct { + FromDeploymentID string `json:"fromDeploymentId"` + ToDeploymentID string `json:"toDeploymentId"` + JobStatus UpdateProjectJobStatus `json:"jobStatus"` + RequestedAt float64 `json:"requestedAt"` + Type UpdateProjectProjectsResponse200Type `json:"type"` +} + +func (o *UpdateProjectLastAliasRequest) GetFromDeploymentID() string { + if o == nil { + return "" + } + return o.FromDeploymentID +} + +func (o *UpdateProjectLastAliasRequest) GetToDeploymentID() string { + if o == nil { + return "" + } + return o.ToDeploymentID +} + +func (o *UpdateProjectLastAliasRequest) GetJobStatus() UpdateProjectJobStatus { + if o == nil { + return UpdateProjectJobStatus("") + } + return o.JobStatus +} + +func (o *UpdateProjectLastAliasRequest) GetRequestedAt() float64 { + if o == nil { + return 0.0 + } + return o.RequestedAt +} + +func (o *UpdateProjectLastAliasRequest) GetType() UpdateProjectProjectsResponse200Type { + if o == nil { + return UpdateProjectProjectsResponse200Type("") + } + return o.Type +} + +type UpdateProjectScope string + +const ( + UpdateProjectScopeAutomationBypass UpdateProjectScope = "automation-bypass" +) + +func (e UpdateProjectScope) ToPointer() *UpdateProjectScope { + return &e +} +func (e *UpdateProjectScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "automation-bypass": + *e = UpdateProjectScope(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectScope: %v", v) + } +} + +type UpdateProjectProtectionBypass struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope UpdateProjectScope `json:"scope"` +} + +func (o *UpdateProjectProtectionBypass) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *UpdateProjectProtectionBypass) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *UpdateProjectProtectionBypass) GetScope() UpdateProjectScope { + if o == nil { + return UpdateProjectScope("") + } + return o.Scope +} + +type UpdateProjectTrustedIpsProjectsDeploymentType string + +const ( + UpdateProjectTrustedIpsProjectsDeploymentTypeProduction UpdateProjectTrustedIpsProjectsDeploymentType = "production" + UpdateProjectTrustedIpsProjectsDeploymentTypePreview UpdateProjectTrustedIpsProjectsDeploymentType = "preview" + UpdateProjectTrustedIpsProjectsDeploymentTypeAll UpdateProjectTrustedIpsProjectsDeploymentType = "all" + UpdateProjectTrustedIpsProjectsDeploymentTypeProdDeploymentUrlsAndAllPreviews UpdateProjectTrustedIpsProjectsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e UpdateProjectTrustedIpsProjectsDeploymentType) ToPointer() *UpdateProjectTrustedIpsProjectsDeploymentType { + return &e +} +func (e *UpdateProjectTrustedIpsProjectsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = UpdateProjectTrustedIpsProjectsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectTrustedIpsProjectsDeploymentType: %v", v) + } +} + +type UpdateProjectTrustedIps2 struct { + DeploymentType UpdateProjectTrustedIpsProjectsDeploymentType `json:"deploymentType"` +} + +func (o *UpdateProjectTrustedIps2) GetDeploymentType() UpdateProjectTrustedIpsProjectsDeploymentType { + if o == nil { + return UpdateProjectTrustedIpsProjectsDeploymentType("") + } + return o.DeploymentType +} + +type UpdateProjectTrustedIpsDeploymentType string + +const ( + UpdateProjectTrustedIpsDeploymentTypeProduction UpdateProjectTrustedIpsDeploymentType = "production" + UpdateProjectTrustedIpsDeploymentTypePreview UpdateProjectTrustedIpsDeploymentType = "preview" + UpdateProjectTrustedIpsDeploymentTypeAll UpdateProjectTrustedIpsDeploymentType = "all" + UpdateProjectTrustedIpsDeploymentTypeProdDeploymentUrlsAndAllPreviews UpdateProjectTrustedIpsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e UpdateProjectTrustedIpsDeploymentType) ToPointer() *UpdateProjectTrustedIpsDeploymentType { + return &e +} +func (e *UpdateProjectTrustedIpsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = UpdateProjectTrustedIpsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectTrustedIpsDeploymentType: %v", v) + } +} + +type UpdateProjectTrustedIpsAddresses struct { + Value string `json:"value"` + Note *string `json:"note,omitempty"` +} + +func (o *UpdateProjectTrustedIpsAddresses) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *UpdateProjectTrustedIpsAddresses) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +type UpdateProjectTrustedIpsProtectionMode string + +const ( + UpdateProjectTrustedIpsProtectionModeAdditional UpdateProjectTrustedIpsProtectionMode = "additional" + UpdateProjectTrustedIpsProtectionModeExclusive UpdateProjectTrustedIpsProtectionMode = "exclusive" +) + +func (e UpdateProjectTrustedIpsProtectionMode) ToPointer() *UpdateProjectTrustedIpsProtectionMode { + return &e +} +func (e *UpdateProjectTrustedIpsProtectionMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "additional": + fallthrough + case "exclusive": + *e = UpdateProjectTrustedIpsProtectionMode(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectTrustedIpsProtectionMode: %v", v) + } +} + +type UpdateProjectTrustedIps1 struct { + DeploymentType UpdateProjectTrustedIpsDeploymentType `json:"deploymentType"` + Addresses []UpdateProjectTrustedIpsAddresses `json:"addresses"` + ProtectionMode UpdateProjectTrustedIpsProtectionMode `json:"protectionMode"` +} + +func (o *UpdateProjectTrustedIps1) GetDeploymentType() UpdateProjectTrustedIpsDeploymentType { + if o == nil { + return UpdateProjectTrustedIpsDeploymentType("") + } + return o.DeploymentType +} + +func (o *UpdateProjectTrustedIps1) GetAddresses() []UpdateProjectTrustedIpsAddresses { + if o == nil { + return []UpdateProjectTrustedIpsAddresses{} + } + return o.Addresses +} + +func (o *UpdateProjectTrustedIps1) GetProtectionMode() UpdateProjectTrustedIpsProtectionMode { + if o == nil { + return UpdateProjectTrustedIpsProtectionMode("") + } + return o.ProtectionMode +} + +type UpdateProjectTrustedIpsType string + +const ( + UpdateProjectTrustedIpsTypeUpdateProjectTrustedIps1 UpdateProjectTrustedIpsType = "updateProject_trustedIps_1" + UpdateProjectTrustedIpsTypeUpdateProjectTrustedIps2 UpdateProjectTrustedIpsType = "updateProject_trustedIps_2" +) + +type UpdateProjectTrustedIps struct { + UpdateProjectTrustedIps1 *UpdateProjectTrustedIps1 + UpdateProjectTrustedIps2 *UpdateProjectTrustedIps2 + + Type UpdateProjectTrustedIpsType +} + +func CreateUpdateProjectTrustedIpsUpdateProjectTrustedIps1(updateProjectTrustedIps1 UpdateProjectTrustedIps1) UpdateProjectTrustedIps { + typ := UpdateProjectTrustedIpsTypeUpdateProjectTrustedIps1 + + return UpdateProjectTrustedIps{ + UpdateProjectTrustedIps1: &updateProjectTrustedIps1, + Type: typ, + } +} + +func CreateUpdateProjectTrustedIpsUpdateProjectTrustedIps2(updateProjectTrustedIps2 UpdateProjectTrustedIps2) UpdateProjectTrustedIps { + typ := UpdateProjectTrustedIpsTypeUpdateProjectTrustedIps2 + + return UpdateProjectTrustedIps{ + UpdateProjectTrustedIps2: &updateProjectTrustedIps2, + Type: typ, + } +} + +func (u *UpdateProjectTrustedIps) UnmarshalJSON(data []byte) error { + + var updateProjectTrustedIps2 UpdateProjectTrustedIps2 = UpdateProjectTrustedIps2{} + if err := utils.UnmarshalJSON(data, &updateProjectTrustedIps2, "", true, true); err == nil { + u.UpdateProjectTrustedIps2 = &updateProjectTrustedIps2 + u.Type = UpdateProjectTrustedIpsTypeUpdateProjectTrustedIps2 + return nil + } + + var updateProjectTrustedIps1 UpdateProjectTrustedIps1 = UpdateProjectTrustedIps1{} + if err := utils.UnmarshalJSON(data, &updateProjectTrustedIps1, "", true, true); err == nil { + u.UpdateProjectTrustedIps1 = &updateProjectTrustedIps1 + u.Type = UpdateProjectTrustedIpsTypeUpdateProjectTrustedIps1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectTrustedIps", string(data)) +} + +func (u UpdateProjectTrustedIps) MarshalJSON() ([]byte, error) { + if u.UpdateProjectTrustedIps1 != nil { + return utils.MarshalJSON(u.UpdateProjectTrustedIps1, "", true) + } + + if u.UpdateProjectTrustedIps2 != nil { + return utils.MarshalJSON(u.UpdateProjectTrustedIps2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectTrustedIps: all fields are null") +} + +type UpdateProjectGitComments struct { + // Whether the Vercel bot should comment on PRs + OnPullRequest bool `json:"onPullRequest"` + // Whether the Vercel bot should comment on commits + OnCommit bool `json:"onCommit"` +} + +func (o *UpdateProjectGitComments) GetOnPullRequest() bool { + if o == nil { + return false + } + return o.OnPullRequest +} + +func (o *UpdateProjectGitComments) GetOnCommit() bool { + if o == nil { + return false + } + return o.OnCommit +} + +type UpdateProjectWebAnalytics struct { + ID string `json:"id"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` +} + +func (o *UpdateProjectWebAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectWebAnalytics) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *UpdateProjectWebAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *UpdateProjectWebAnalytics) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *UpdateProjectWebAnalytics) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +type UpdateProjectSrc2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *UpdateProjectSrc2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *UpdateProjectSrc2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *UpdateProjectSrc2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *UpdateProjectSrc2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *UpdateProjectSrc2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *UpdateProjectSrc2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *UpdateProjectSrc2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *UpdateProjectSrc2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *UpdateProjectSrc2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *UpdateProjectSrc2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *UpdateProjectSrc2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type UpdateProjectSrcType string + +const ( + UpdateProjectSrcTypeStr UpdateProjectSrcType = "str" + UpdateProjectSrcTypeUpdateProjectSrc2 UpdateProjectSrcType = "updateProject_src_2" +) + +type UpdateProjectSrc struct { + Str *string + UpdateProjectSrc2 *UpdateProjectSrc2 + + Type UpdateProjectSrcType +} + +func CreateUpdateProjectSrcStr(str string) UpdateProjectSrc { + typ := UpdateProjectSrcTypeStr + + return UpdateProjectSrc{ + Str: &str, + Type: typ, + } +} + +func CreateUpdateProjectSrcUpdateProjectSrc2(updateProjectSrc2 UpdateProjectSrc2) UpdateProjectSrc { + typ := UpdateProjectSrcTypeUpdateProjectSrc2 + + return UpdateProjectSrc{ + UpdateProjectSrc2: &updateProjectSrc2, + Type: typ, + } +} + +func (u *UpdateProjectSrc) UnmarshalJSON(data []byte) error { + + var updateProjectSrc2 UpdateProjectSrc2 = UpdateProjectSrc2{} + if err := utils.UnmarshalJSON(data, &updateProjectSrc2, "", true, true); err == nil { + u.UpdateProjectSrc2 = &updateProjectSrc2 + u.Type = UpdateProjectSrcTypeUpdateProjectSrc2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = UpdateProjectSrcTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectSrc", string(data)) +} + +func (u UpdateProjectSrc) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.UpdateProjectSrc2 != nil { + return utils.MarshalJSON(u.UpdateProjectSrc2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectSrc: all fields are null") +} + +type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType string + +const ( + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypePath UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "path" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeHost UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "host" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeMethod UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "method" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeHeader UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "header" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeCookie UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "cookie" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeQuery UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "query" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeIPAddress UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "ip_address" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeProtocol UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "protocol" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeScheme UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "scheme" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeEnvironment UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "environment" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeRegion UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "region" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityTypeInitialRequestPath UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType = "initial_request_path" +) + +func (e UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType) ToPointer() *UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType { + return &e +} +func (e *UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "path": + fallthrough + case "host": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "region": + fallthrough + case "initial_request_path": + *e = UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType: %v", v) + } +} + +type UpdateProjectValue2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *UpdateProjectValue2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *UpdateProjectValue2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *UpdateProjectValue2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *UpdateProjectValue2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *UpdateProjectValue2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *UpdateProjectValue2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *UpdateProjectValue2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *UpdateProjectValue2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *UpdateProjectValue2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *UpdateProjectValue2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *UpdateProjectValue2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type UpdateProjectValueType string + +const ( + UpdateProjectValueTypeStr UpdateProjectValueType = "str" + UpdateProjectValueTypeUpdateProjectValue2 UpdateProjectValueType = "updateProject_value_2" +) + +type UpdateProjectValue struct { + Str *string + UpdateProjectValue2 *UpdateProjectValue2 + + Type UpdateProjectValueType +} + +func CreateUpdateProjectValueStr(str string) UpdateProjectValue { + typ := UpdateProjectValueTypeStr + + return UpdateProjectValue{ + Str: &str, + Type: typ, + } +} + +func CreateUpdateProjectValueUpdateProjectValue2(updateProjectValue2 UpdateProjectValue2) UpdateProjectValue { + typ := UpdateProjectValueTypeUpdateProjectValue2 + + return UpdateProjectValue{ + UpdateProjectValue2: &updateProjectValue2, + Type: typ, + } +} + +func (u *UpdateProjectValue) UnmarshalJSON(data []byte) error { + + var updateProjectValue2 UpdateProjectValue2 = UpdateProjectValue2{} + if err := utils.UnmarshalJSON(data, &updateProjectValue2, "", true, true); err == nil { + u.UpdateProjectValue2 = &updateProjectValue2 + u.Type = UpdateProjectValueTypeUpdateProjectValue2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = UpdateProjectValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectValue", string(data)) +} + +func (u UpdateProjectValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.UpdateProjectValue2 != nil { + return utils.MarshalJSON(u.UpdateProjectValue2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectValue: all fields are null") +} + +type UpdateProjectHas struct { + Type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType `json:"type"` + Key *string `json:"key,omitempty"` + Value *UpdateProjectValue `json:"value,omitempty"` +} + +func (o *UpdateProjectHas) GetType() UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType { + if o == nil { + return UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityType("") + } + return o.Type +} + +func (o *UpdateProjectHas) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *UpdateProjectHas) GetValue() *UpdateProjectValue { + if o == nil { + return nil + } + return o.Value +} + +type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType string + +const ( + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypePath UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "path" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeHost UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "host" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeMethod UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "method" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeHeader UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "header" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeCookie UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "cookie" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeQuery UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "query" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeIPAddress UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "ip_address" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeProtocol UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "protocol" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeScheme UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "scheme" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeEnvironment UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "environment" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeRegion UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "region" + UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeInitialRequestPath UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "initial_request_path" +) + +func (e UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType) ToPointer() *UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType { + return &e +} +func (e *UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "path": + fallthrough + case "host": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "region": + fallthrough + case "initial_request_path": + *e = UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType: %v", v) + } +} + +type UpdateProjectValueProjects2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *UpdateProjectValueProjects2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *UpdateProjectValueProjects2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *UpdateProjectValueProjects2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *UpdateProjectValueProjects2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *UpdateProjectValueProjects2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *UpdateProjectValueProjects2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *UpdateProjectValueProjects2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *UpdateProjectValueProjects2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *UpdateProjectValueProjects2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *UpdateProjectValueProjects2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *UpdateProjectValueProjects2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type UpdateProjectProjectsValueType string + +const ( + UpdateProjectProjectsValueTypeStr UpdateProjectProjectsValueType = "str" + UpdateProjectProjectsValueTypeUpdateProjectValueProjects2 UpdateProjectProjectsValueType = "updateProject_value_projects_2" +) + +type UpdateProjectProjectsValue struct { + Str *string + UpdateProjectValueProjects2 *UpdateProjectValueProjects2 + + Type UpdateProjectProjectsValueType +} + +func CreateUpdateProjectProjectsValueStr(str string) UpdateProjectProjectsValue { + typ := UpdateProjectProjectsValueTypeStr + + return UpdateProjectProjectsValue{ + Str: &str, + Type: typ, + } +} + +func CreateUpdateProjectProjectsValueUpdateProjectValueProjects2(updateProjectValueProjects2 UpdateProjectValueProjects2) UpdateProjectProjectsValue { + typ := UpdateProjectProjectsValueTypeUpdateProjectValueProjects2 + + return UpdateProjectProjectsValue{ + UpdateProjectValueProjects2: &updateProjectValueProjects2, + Type: typ, + } +} + +func (u *UpdateProjectProjectsValue) UnmarshalJSON(data []byte) error { + + var updateProjectValueProjects2 UpdateProjectValueProjects2 = UpdateProjectValueProjects2{} + if err := utils.UnmarshalJSON(data, &updateProjectValueProjects2, "", true, true); err == nil { + u.UpdateProjectValueProjects2 = &updateProjectValueProjects2 + u.Type = UpdateProjectProjectsValueTypeUpdateProjectValueProjects2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = UpdateProjectProjectsValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectProjectsValue", string(data)) +} + +func (u UpdateProjectProjectsValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.UpdateProjectValueProjects2 != nil { + return utils.MarshalJSON(u.UpdateProjectValueProjects2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectProjectsValue: all fields are null") +} + +type UpdateProjectMissing struct { + Type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType `json:"type"` + Key *string `json:"key,omitempty"` + Value *UpdateProjectProjectsValue `json:"value,omitempty"` +} + +func (o *UpdateProjectMissing) GetType() UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType { + if o == nil { + return UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType("") + } + return o.Type +} + +func (o *UpdateProjectMissing) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *UpdateProjectMissing) GetValue() *UpdateProjectProjectsValue { + if o == nil { + return nil + } + return o.Value +} + +type UpdateProjectHandle string + +const ( + UpdateProjectHandleInit UpdateProjectHandle = "init" + UpdateProjectHandleFinalize UpdateProjectHandle = "finalize" +) + +func (e UpdateProjectHandle) ToPointer() *UpdateProjectHandle { + return &e +} +func (e *UpdateProjectHandle) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "init": + fallthrough + case "finalize": + *e = UpdateProjectHandle(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectHandle: %v", v) + } +} + +type UpdateProjectAction string + +const ( + UpdateProjectActionDeny UpdateProjectAction = "deny" + UpdateProjectActionChallenge UpdateProjectAction = "challenge" + UpdateProjectActionLog UpdateProjectAction = "log" + UpdateProjectActionBypass UpdateProjectAction = "bypass" + UpdateProjectActionRateLimit UpdateProjectAction = "rate_limit" + UpdateProjectActionRedirect UpdateProjectAction = "redirect" +) + +func (e UpdateProjectAction) ToPointer() *UpdateProjectAction { + return &e +} +func (e *UpdateProjectAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "challenge": + fallthrough + case "log": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = UpdateProjectAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectAction: %v", v) + } +} + +type UpdateProjectAlgo string + +const ( + UpdateProjectAlgoFixedWindow UpdateProjectAlgo = "fixed_window" + UpdateProjectAlgoTokenBucket UpdateProjectAlgo = "token_bucket" +) + +func (e UpdateProjectAlgo) ToPointer() *UpdateProjectAlgo { + return &e +} +func (e *UpdateProjectAlgo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = UpdateProjectAlgo(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectAlgo: %v", v) + } +} + +type UpdateProjectErl struct { + Algo UpdateProjectAlgo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` +} + +func (o *UpdateProjectErl) GetAlgo() UpdateProjectAlgo { + if o == nil { + return UpdateProjectAlgo("") + } + return o.Algo +} + +func (o *UpdateProjectErl) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *UpdateProjectErl) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *UpdateProjectErl) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +type UpdateProjectMitigate struct { + Action UpdateProjectAction `json:"action"` + RuleID string `json:"rule_id"` + TTL *float64 `json:"ttl,omitempty"` + Erl *UpdateProjectErl `json:"erl,omitempty"` +} + +func (o *UpdateProjectMitigate) GetAction() UpdateProjectAction { + if o == nil { + return UpdateProjectAction("") + } + return o.Action +} + +func (o *UpdateProjectMitigate) GetRuleID() string { + if o == nil { + return "" + } + return o.RuleID +} + +func (o *UpdateProjectMitigate) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *UpdateProjectMitigate) GetErl() *UpdateProjectErl { + if o == nil { + return nil + } + return o.Erl +} + +type UpdateProjectFirewallRoutes struct { + Src *UpdateProjectSrc `json:"src,omitempty"` + Has []UpdateProjectHas `json:"has,omitempty"` + Missing []UpdateProjectMissing `json:"missing,omitempty"` + Dest *string `json:"dest,omitempty"` + Status *float64 `json:"status,omitempty"` + Handle *UpdateProjectHandle `json:"handle,omitempty"` + Mitigate *UpdateProjectMitigate `json:"mitigate,omitempty"` +} + +func (o *UpdateProjectFirewallRoutes) GetSrc() *UpdateProjectSrc { + if o == nil { + return nil + } + return o.Src +} + +func (o *UpdateProjectFirewallRoutes) GetHas() []UpdateProjectHas { + if o == nil { + return nil + } + return o.Has +} + +func (o *UpdateProjectFirewallRoutes) GetMissing() []UpdateProjectMissing { + if o == nil { + return nil + } + return o.Missing +} + +func (o *UpdateProjectFirewallRoutes) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *UpdateProjectFirewallRoutes) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +func (o *UpdateProjectFirewallRoutes) GetHandle() *UpdateProjectHandle { + if o == nil { + return nil + } + return o.Handle +} + +func (o *UpdateProjectFirewallRoutes) GetMitigate() *UpdateProjectMitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type UpdateProjectSecurity struct { + AttackModeEnabled *bool `json:"attackModeEnabled,omitempty"` + AttackModeUpdatedAt *float64 `json:"attackModeUpdatedAt,omitempty"` + FirewallEnabled *bool `json:"firewallEnabled,omitempty"` + FirewallUpdatedAt *float64 `json:"firewallUpdatedAt,omitempty"` + AttackModeActiveUntil *float64 `json:"attackModeActiveUntil,omitempty"` + FirewallConfigVersion *float64 `json:"firewallConfigVersion,omitempty"` + FirewallRoutes []UpdateProjectFirewallRoutes `json:"firewallRoutes,omitempty"` + FirewallSeawallEnabled *bool `json:"firewallSeawallEnabled,omitempty"` + Ja3Enabled *bool `json:"ja3Enabled,omitempty"` + Ja4Enabled *bool `json:"ja4Enabled,omitempty"` + FirewallBypassIps []string `json:"firewallBypassIps,omitempty"` +} + +func (o *UpdateProjectSecurity) GetAttackModeEnabled() *bool { + if o == nil { + return nil + } + return o.AttackModeEnabled +} + +func (o *UpdateProjectSecurity) GetAttackModeUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.AttackModeUpdatedAt +} + +func (o *UpdateProjectSecurity) GetFirewallEnabled() *bool { + if o == nil { + return nil + } + return o.FirewallEnabled +} + +func (o *UpdateProjectSecurity) GetFirewallUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.FirewallUpdatedAt +} + +func (o *UpdateProjectSecurity) GetAttackModeActiveUntil() *float64 { + if o == nil { + return nil + } + return o.AttackModeActiveUntil +} + +func (o *UpdateProjectSecurity) GetFirewallConfigVersion() *float64 { + if o == nil { + return nil + } + return o.FirewallConfigVersion +} + +func (o *UpdateProjectSecurity) GetFirewallRoutes() []UpdateProjectFirewallRoutes { + if o == nil { + return nil + } + return o.FirewallRoutes +} + +func (o *UpdateProjectSecurity) GetFirewallSeawallEnabled() *bool { + if o == nil { + return nil + } + return o.FirewallSeawallEnabled +} + +func (o *UpdateProjectSecurity) GetJa3Enabled() *bool { + if o == nil { + return nil + } + return o.Ja3Enabled +} + +func (o *UpdateProjectSecurity) GetJa4Enabled() *bool { + if o == nil { + return nil + } + return o.Ja4Enabled +} + +func (o *UpdateProjectSecurity) GetFirewallBypassIps() []string { + if o == nil { + return nil + } + return o.FirewallBypassIps +} + +// UpdateProjectProjectsIssuerMode - - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com` +type UpdateProjectProjectsIssuerMode string + +const ( + UpdateProjectProjectsIssuerModeTeam UpdateProjectProjectsIssuerMode = "team" + UpdateProjectProjectsIssuerModeGlobal UpdateProjectProjectsIssuerMode = "global" +) + +func (e UpdateProjectProjectsIssuerMode) ToPointer() *UpdateProjectProjectsIssuerMode { + return &e +} +func (e *UpdateProjectProjectsIssuerMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "global": + *e = UpdateProjectProjectsIssuerMode(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProjectsIssuerMode: %v", v) + } +} + +type UpdateProjectProjectsOidcTokenConfig struct { + Enabled bool `json:"enabled"` + // - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com` + IssuerMode *UpdateProjectProjectsIssuerMode `json:"issuerMode,omitempty"` +} + +func (o *UpdateProjectProjectsOidcTokenConfig) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *UpdateProjectProjectsOidcTokenConfig) GetIssuerMode() *UpdateProjectProjectsIssuerMode { + if o == nil { + return nil + } + return o.IssuerMode +} + +type UpdateProjectTier string + +const ( + UpdateProjectTierStandard UpdateProjectTier = "standard" + UpdateProjectTierAdvanced UpdateProjectTier = "advanced" + UpdateProjectTierCritical UpdateProjectTier = "critical" +) + +func (e UpdateProjectTier) ToPointer() *UpdateProjectTier { + return &e +} +func (e *UpdateProjectTier) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "standard": + fallthrough + case "advanced": + fallthrough + case "critical": + *e = UpdateProjectTier(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectTier: %v", v) + } +} + +// UpdateProjectResponseBody - The project was successfully updated +type UpdateProjectResponseBody struct { + AccountID string `json:"accountId"` + Analytics *UpdateProjectAnalytics `json:"analytics,omitempty"` + SpeedInsights *UpdateProjectSpeedInsights `json:"speedInsights,omitempty"` + AutoExposeSystemEnvs *bool `json:"autoExposeSystemEnvs,omitempty"` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + AutoAssignCustomDomainsUpdatedBy *string `json:"autoAssignCustomDomainsUpdatedBy,omitempty"` + BuildCommand *string `json:"buildCommand,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + CustomerSupportCodeVisibility *bool `json:"customerSupportCodeVisibility,omitempty"` + Crons *UpdateProjectCrons `json:"crons,omitempty"` + DataCache *UpdateProjectDataCache `json:"dataCache,omitempty"` + DeploymentExpiration *UpdateProjectDeploymentExpiration `json:"deploymentExpiration,omitempty"` + DevCommand *string `json:"devCommand,omitempty"` + DirectoryListing bool `json:"directoryListing"` + InstallCommand *string `json:"installCommand,omitempty"` + Env []UpdateProjectEnv `json:"env,omitempty"` + CustomEnvironments []UpdateProjectCustomEnvironments `json:"customEnvironments,omitempty"` + Framework *UpdateProjectProjectsFramework `json:"framework,omitempty"` + GitForkProtection *bool `json:"gitForkProtection,omitempty"` + GitLFS *bool `json:"gitLFS,omitempty"` + ID string `json:"id"` + IPBuckets []UpdateProjectIPBuckets `json:"ipBuckets,omitempty"` + LatestDeployments []UpdateProjectLatestDeployments `json:"latestDeployments,omitempty"` + Link *UpdateProjectLink `json:"link,omitempty"` + Microfrontends *UpdateProjectMicrofrontends `json:"microfrontends,omitempty"` + Name string `json:"name"` + NodeVersion UpdateProjectProjectsNodeVersion `json:"nodeVersion"` + OptionsAllowlist *UpdateProjectOptionsAllowlist `json:"optionsAllowlist,omitempty"` + OutputDirectory *string `json:"outputDirectory,omitempty"` + PassiveConnectConfigurationID *string `json:"passiveConnectConfigurationId,omitempty"` + PasswordProtection *UpdateProjectPasswordProtection `json:"passwordProtection,omitempty"` + ProductionDeploymentsFastLane *bool `json:"productionDeploymentsFastLane,omitempty"` + PublicSource *bool `json:"publicSource,omitempty"` + ResourceConfig *UpdateProjectResourceConfig `json:"resourceConfig,omitempty"` + RootDirectory *string `json:"rootDirectory,omitempty"` + ServerlessFunctionRegion *string `json:"serverlessFunctionRegion,omitempty"` + ServerlessFunctionZeroConfigFailover *bool `json:"serverlessFunctionZeroConfigFailover,omitempty"` + SkewProtectionBoundaryAt *float64 `json:"skewProtectionBoundaryAt,omitempty"` + SkewProtectionMaxAge *float64 `json:"skewProtectionMaxAge,omitempty"` + SkipGitConnectDuringLink *bool `json:"skipGitConnectDuringLink,omitempty"` + SourceFilesOutsideRootDirectory *bool `json:"sourceFilesOutsideRootDirectory,omitempty"` + EnableAffectedProjectsDeployments *bool `json:"enableAffectedProjectsDeployments,omitempty"` + SsoProtection *UpdateProjectSsoProtection `json:"ssoProtection,omitempty"` + Targets map[string]UpdateProjectTargets `json:"targets,omitempty"` + TransferCompletedAt *float64 `json:"transferCompletedAt,omitempty"` + TransferStartedAt *float64 `json:"transferStartedAt,omitempty"` + TransferToAccountID *string `json:"transferToAccountId,omitempty"` + TransferredFromAccountID *string `json:"transferredFromAccountId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Live *bool `json:"live,omitempty"` + EnablePreviewFeedback *bool `json:"enablePreviewFeedback,omitempty"` + EnableProductionFeedback *bool `json:"enableProductionFeedback,omitempty"` + Permissions *UpdateProjectPermissions `json:"permissions,omitempty"` + LastRollbackTarget *UpdateProjectLastRollbackTarget `json:"lastRollbackTarget,omitempty"` + LastAliasRequest *UpdateProjectLastAliasRequest `json:"lastAliasRequest,omitempty"` + HasFloatingAliases *bool `json:"hasFloatingAliases,omitempty"` + ProtectionBypass map[string]UpdateProjectProtectionBypass `json:"protectionBypass,omitempty"` + HasActiveBranches *bool `json:"hasActiveBranches,omitempty"` + TrustedIps *UpdateProjectTrustedIps `json:"trustedIps,omitempty"` + GitComments *UpdateProjectGitComments `json:"gitComments,omitempty"` + Paused *bool `json:"paused,omitempty"` + ConcurrencyBucketName *string `json:"concurrencyBucketName,omitempty"` + WebAnalytics *UpdateProjectWebAnalytics `json:"webAnalytics,omitempty"` + Security *UpdateProjectSecurity `json:"security,omitempty"` + OidcTokenConfig *UpdateProjectProjectsOidcTokenConfig `json:"oidcTokenConfig,omitempty"` + Tier *UpdateProjectTier `json:"tier,omitempty"` +} + +func (o *UpdateProjectResponseBody) GetAccountID() string { + if o == nil { + return "" + } + return o.AccountID +} + +func (o *UpdateProjectResponseBody) GetAnalytics() *UpdateProjectAnalytics { + if o == nil { + return nil + } + return o.Analytics +} + +func (o *UpdateProjectResponseBody) GetSpeedInsights() *UpdateProjectSpeedInsights { + if o == nil { + return nil + } + return o.SpeedInsights +} + +func (o *UpdateProjectResponseBody) GetAutoExposeSystemEnvs() *bool { + if o == nil { + return nil + } + return o.AutoExposeSystemEnvs +} + +func (o *UpdateProjectResponseBody) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *UpdateProjectResponseBody) GetAutoAssignCustomDomainsUpdatedBy() *string { + if o == nil { + return nil + } + return o.AutoAssignCustomDomainsUpdatedBy +} + +func (o *UpdateProjectResponseBody) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *UpdateProjectResponseBody) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *UpdateProjectResponseBody) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *UpdateProjectResponseBody) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *UpdateProjectResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectResponseBody) GetCustomerSupportCodeVisibility() *bool { + if o == nil { + return nil + } + return o.CustomerSupportCodeVisibility +} + +func (o *UpdateProjectResponseBody) GetCrons() *UpdateProjectCrons { + if o == nil { + return nil + } + return o.Crons +} + +func (o *UpdateProjectResponseBody) GetDataCache() *UpdateProjectDataCache { + if o == nil { + return nil + } + return o.DataCache +} + +func (o *UpdateProjectResponseBody) GetDeploymentExpiration() *UpdateProjectDeploymentExpiration { + if o == nil { + return nil + } + return o.DeploymentExpiration +} + +func (o *UpdateProjectResponseBody) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *UpdateProjectResponseBody) GetDirectoryListing() bool { + if o == nil { + return false + } + return o.DirectoryListing +} + +func (o *UpdateProjectResponseBody) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *UpdateProjectResponseBody) GetEnv() []UpdateProjectEnv { + if o == nil { + return nil + } + return o.Env +} + +func (o *UpdateProjectResponseBody) GetCustomEnvironments() []UpdateProjectCustomEnvironments { + if o == nil { + return nil + } + return o.CustomEnvironments +} + +func (o *UpdateProjectResponseBody) GetFramework() *UpdateProjectProjectsFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *UpdateProjectResponseBody) GetGitForkProtection() *bool { + if o == nil { + return nil + } + return o.GitForkProtection +} + +func (o *UpdateProjectResponseBody) GetGitLFS() *bool { + if o == nil { + return nil + } + return o.GitLFS +} + +func (o *UpdateProjectResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectResponseBody) GetIPBuckets() []UpdateProjectIPBuckets { + if o == nil { + return nil + } + return o.IPBuckets +} + +func (o *UpdateProjectResponseBody) GetLatestDeployments() []UpdateProjectLatestDeployments { + if o == nil { + return nil + } + return o.LatestDeployments +} + +func (o *UpdateProjectResponseBody) GetLink() *UpdateProjectLink { + if o == nil { + return nil + } + return o.Link +} + +func (o *UpdateProjectResponseBody) GetMicrofrontends() *UpdateProjectMicrofrontends { + if o == nil { + return nil + } + return o.Microfrontends +} + +func (o *UpdateProjectResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectResponseBody) GetNodeVersion() UpdateProjectProjectsNodeVersion { + if o == nil { + return UpdateProjectProjectsNodeVersion("") + } + return o.NodeVersion +} + +func (o *UpdateProjectResponseBody) GetOptionsAllowlist() *UpdateProjectOptionsAllowlist { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +func (o *UpdateProjectResponseBody) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *UpdateProjectResponseBody) GetPassiveConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.PassiveConnectConfigurationID +} + +func (o *UpdateProjectResponseBody) GetPasswordProtection() *UpdateProjectPasswordProtection { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *UpdateProjectResponseBody) GetProductionDeploymentsFastLane() *bool { + if o == nil { + return nil + } + return o.ProductionDeploymentsFastLane +} + +func (o *UpdateProjectResponseBody) GetPublicSource() *bool { + if o == nil { + return nil + } + return o.PublicSource +} + +func (o *UpdateProjectResponseBody) GetResourceConfig() *UpdateProjectResourceConfig { + if o == nil { + return nil + } + return o.ResourceConfig +} + +func (o *UpdateProjectResponseBody) GetRootDirectory() *string { + if o == nil { + return nil + } + return o.RootDirectory +} + +func (o *UpdateProjectResponseBody) GetServerlessFunctionRegion() *string { + if o == nil { + return nil + } + return o.ServerlessFunctionRegion +} + +func (o *UpdateProjectResponseBody) GetServerlessFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.ServerlessFunctionZeroConfigFailover +} + +func (o *UpdateProjectResponseBody) GetSkewProtectionBoundaryAt() *float64 { + if o == nil { + return nil + } + return o.SkewProtectionBoundaryAt +} + +func (o *UpdateProjectResponseBody) GetSkewProtectionMaxAge() *float64 { + if o == nil { + return nil + } + return o.SkewProtectionMaxAge +} + +func (o *UpdateProjectResponseBody) GetSkipGitConnectDuringLink() *bool { + if o == nil { + return nil + } + return o.SkipGitConnectDuringLink +} + +func (o *UpdateProjectResponseBody) GetSourceFilesOutsideRootDirectory() *bool { + if o == nil { + return nil + } + return o.SourceFilesOutsideRootDirectory +} + +func (o *UpdateProjectResponseBody) GetEnableAffectedProjectsDeployments() *bool { + if o == nil { + return nil + } + return o.EnableAffectedProjectsDeployments +} + +func (o *UpdateProjectResponseBody) GetSsoProtection() *UpdateProjectSsoProtection { + if o == nil { + return nil + } + return o.SsoProtection +} + +func (o *UpdateProjectResponseBody) GetTargets() map[string]UpdateProjectTargets { + if o == nil { + return nil + } + return o.Targets +} + +func (o *UpdateProjectResponseBody) GetTransferCompletedAt() *float64 { + if o == nil { + return nil + } + return o.TransferCompletedAt +} + +func (o *UpdateProjectResponseBody) GetTransferStartedAt() *float64 { + if o == nil { + return nil + } + return o.TransferStartedAt +} + +func (o *UpdateProjectResponseBody) GetTransferToAccountID() *string { + if o == nil { + return nil + } + return o.TransferToAccountID +} + +func (o *UpdateProjectResponseBody) GetTransferredFromAccountID() *string { + if o == nil { + return nil + } + return o.TransferredFromAccountID +} + +func (o *UpdateProjectResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *UpdateProjectResponseBody) GetLive() *bool { + if o == nil { + return nil + } + return o.Live +} + +func (o *UpdateProjectResponseBody) GetEnablePreviewFeedback() *bool { + if o == nil { + return nil + } + return o.EnablePreviewFeedback +} + +func (o *UpdateProjectResponseBody) GetEnableProductionFeedback() *bool { + if o == nil { + return nil + } + return o.EnableProductionFeedback +} + +func (o *UpdateProjectResponseBody) GetPermissions() *UpdateProjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *UpdateProjectResponseBody) GetLastRollbackTarget() *UpdateProjectLastRollbackTarget { + if o == nil { + return nil + } + return o.LastRollbackTarget +} + +func (o *UpdateProjectResponseBody) GetLastAliasRequest() *UpdateProjectLastAliasRequest { + if o == nil { + return nil + } + return o.LastAliasRequest +} + +func (o *UpdateProjectResponseBody) GetHasFloatingAliases() *bool { + if o == nil { + return nil + } + return o.HasFloatingAliases +} + +func (o *UpdateProjectResponseBody) GetProtectionBypass() map[string]UpdateProjectProtectionBypass { + if o == nil { + return nil + } + return o.ProtectionBypass +} + +func (o *UpdateProjectResponseBody) GetHasActiveBranches() *bool { + if o == nil { + return nil + } + return o.HasActiveBranches +} + +func (o *UpdateProjectResponseBody) GetTrustedIps() *UpdateProjectTrustedIps { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *UpdateProjectResponseBody) GetGitComments() *UpdateProjectGitComments { + if o == nil { + return nil + } + return o.GitComments +} + +func (o *UpdateProjectResponseBody) GetPaused() *bool { + if o == nil { + return nil + } + return o.Paused +} + +func (o *UpdateProjectResponseBody) GetConcurrencyBucketName() *string { + if o == nil { + return nil + } + return o.ConcurrencyBucketName +} + +func (o *UpdateProjectResponseBody) GetWebAnalytics() *UpdateProjectWebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *UpdateProjectResponseBody) GetSecurity() *UpdateProjectSecurity { + if o == nil { + return nil + } + return o.Security +} + +func (o *UpdateProjectResponseBody) GetOidcTokenConfig() *UpdateProjectProjectsOidcTokenConfig { + if o == nil { + return nil + } + return o.OidcTokenConfig +} + +func (o *UpdateProjectResponseBody) GetTier() *UpdateProjectTier { + if o == nil { + return nil + } + return o.Tier +} + +type UpdateProjectResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The project was successfully updated + Object *UpdateProjectResponseBody +} + +func (o *UpdateProjectResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateProjectResponse) GetObject() *UpdateProjectResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectdatacache.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectdatacache.go new file mode 100644 index 00000000..882ebb87 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectdatacache.go @@ -0,0 +1,7648 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type UpdateProjectDataCacheRequestBody struct { + // Enable or disable data cache for the project - default: false + Disabled *bool `json:"disabled,omitempty"` +} + +func (o *UpdateProjectDataCacheRequestBody) GetDisabled() *bool { + if o == nil { + return nil + } + return o.Disabled +} + +type UpdateProjectDataCacheRequest struct { + // The unique project identifier + ProjectID string `pathParam:"style=simple,explode=false,name=projectId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateProjectDataCacheRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateProjectDataCacheRequest) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateProjectDataCacheRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateProjectDataCacheRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateProjectDataCacheRequest) GetRequestBody() UpdateProjectDataCacheRequestBody { + if o == nil { + return UpdateProjectDataCacheRequestBody{} + } + return o.RequestBody +} + +type Analytics struct { + ID string `json:"id"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + DisabledAt float64 `json:"disabledAt"` + EnabledAt float64 `json:"enabledAt"` + PaidAt *float64 `json:"paidAt,omitempty"` + SampleRatePercent *float64 `json:"sampleRatePercent,omitempty"` + SpendLimitInDollars *float64 `json:"spendLimitInDollars,omitempty"` +} + +func (o *Analytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Analytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *Analytics) GetDisabledAt() float64 { + if o == nil { + return 0.0 + } + return o.DisabledAt +} + +func (o *Analytics) GetEnabledAt() float64 { + if o == nil { + return 0.0 + } + return o.EnabledAt +} + +func (o *Analytics) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +func (o *Analytics) GetSampleRatePercent() *float64 { + if o == nil { + return nil + } + return o.SampleRatePercent +} + +func (o *Analytics) GetSpendLimitInDollars() *float64 { + if o == nil { + return nil + } + return o.SpendLimitInDollars +} + +type SpeedInsights struct { + ID string `json:"id"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` + PaidAt *float64 `json:"paidAt,omitempty"` +} + +func (o *SpeedInsights) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *SpeedInsights) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *SpeedInsights) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *SpeedInsights) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *SpeedInsights) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +func (o *SpeedInsights) GetPaidAt() *float64 { + if o == nil { + return nil + } + return o.PaidAt +} + +type Definitions struct { + // The hostname that should be used. + Host string `json:"host"` + // The path that should be called for the cronjob. + Path string `json:"path"` + // The cron expression. + Schedule string `json:"schedule"` +} + +func (o *Definitions) GetHost() string { + if o == nil { + return "" + } + return o.Host +} + +func (o *Definitions) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *Definitions) GetSchedule() string { + if o == nil { + return "" + } + return o.Schedule +} + +type Crons struct { + // The time the feature was enabled for this project. Note: It enables automatically with the first Deployment that outputs cronjobs. + EnabledAt float64 `json:"enabledAt"` + // The time the feature was disabled for this project. + DisabledAt *float64 `json:"disabledAt"` + UpdatedAt float64 `json:"updatedAt"` + // The ID of the Deployment from which the definitions originated. + DeploymentID *string `json:"deploymentId"` + Definitions []Definitions `json:"definitions"` +} + +func (o *Crons) GetEnabledAt() float64 { + if o == nil { + return 0.0 + } + return o.EnabledAt +} + +func (o *Crons) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *Crons) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *Crons) GetDeploymentID() *string { + if o == nil { + return nil + } + return o.DeploymentID +} + +func (o *Crons) GetDefinitions() []Definitions { + if o == nil { + return []Definitions{} + } + return o.Definitions +} + +type DataCache struct { + UserDisabled bool `json:"userDisabled"` + StorageSizeBytes *float64 `json:"storageSizeBytes,omitempty"` + Unlimited *bool `json:"unlimited,omitempty"` +} + +func (o *DataCache) GetUserDisabled() bool { + if o == nil { + return false + } + return o.UserDisabled +} + +func (o *DataCache) GetStorageSizeBytes() *float64 { + if o == nil { + return nil + } + return o.StorageSizeBytes +} + +func (o *DataCache) GetUnlimited() *bool { + if o == nil { + return nil + } + return o.Unlimited +} + +type DeploymentExpiration struct { + ExpirationDays *float64 `json:"expirationDays,omitempty"` + ExpirationDaysProduction *float64 `json:"expirationDaysProduction,omitempty"` + ExpirationDaysCanceled *float64 `json:"expirationDaysCanceled,omitempty"` + ExpirationDaysErrored *float64 `json:"expirationDaysErrored,omitempty"` + DeploymentsToKeep *float64 `json:"deploymentsToKeep,omitempty"` +} + +func (o *DeploymentExpiration) GetExpirationDays() *float64 { + if o == nil { + return nil + } + return o.ExpirationDays +} + +func (o *DeploymentExpiration) GetExpirationDaysProduction() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysProduction +} + +func (o *DeploymentExpiration) GetExpirationDaysCanceled() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysCanceled +} + +func (o *DeploymentExpiration) GetExpirationDaysErrored() *float64 { + if o == nil { + return nil + } + return o.ExpirationDaysErrored +} + +func (o *DeploymentExpiration) GetDeploymentsToKeep() *float64 { + if o == nil { + return nil + } + return o.DeploymentsToKeep +} + +type UpdateProjectDataCacheTarget2 string + +const ( + UpdateProjectDataCacheTarget2Production UpdateProjectDataCacheTarget2 = "production" + UpdateProjectDataCacheTarget2Preview UpdateProjectDataCacheTarget2 = "preview" + UpdateProjectDataCacheTarget2Development UpdateProjectDataCacheTarget2 = "development" +) + +func (e UpdateProjectDataCacheTarget2) ToPointer() *UpdateProjectDataCacheTarget2 { + return &e +} +func (e *UpdateProjectDataCacheTarget2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = UpdateProjectDataCacheTarget2(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheTarget2: %v", v) + } +} + +type UpdateProjectDataCacheTarget1 string + +const ( + UpdateProjectDataCacheTarget1Production UpdateProjectDataCacheTarget1 = "production" + UpdateProjectDataCacheTarget1Preview UpdateProjectDataCacheTarget1 = "preview" + UpdateProjectDataCacheTarget1Development UpdateProjectDataCacheTarget1 = "development" +) + +func (e UpdateProjectDataCacheTarget1) ToPointer() *UpdateProjectDataCacheTarget1 { + return &e +} +func (e *UpdateProjectDataCacheTarget1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "development": + *e = UpdateProjectDataCacheTarget1(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheTarget1: %v", v) + } +} + +type UpdateProjectDataCacheTargetType string + +const ( + UpdateProjectDataCacheTargetTypeArrayOfUpdateProjectDataCacheTarget1 UpdateProjectDataCacheTargetType = "arrayOfUpdateProjectDataCacheTarget1" + UpdateProjectDataCacheTargetTypeUpdateProjectDataCacheTarget2 UpdateProjectDataCacheTargetType = "updateProjectDataCache_target_2" +) + +type UpdateProjectDataCacheTarget struct { + ArrayOfUpdateProjectDataCacheTarget1 []UpdateProjectDataCacheTarget1 + UpdateProjectDataCacheTarget2 *UpdateProjectDataCacheTarget2 + + Type UpdateProjectDataCacheTargetType +} + +func CreateUpdateProjectDataCacheTargetArrayOfUpdateProjectDataCacheTarget1(arrayOfUpdateProjectDataCacheTarget1 []UpdateProjectDataCacheTarget1) UpdateProjectDataCacheTarget { + typ := UpdateProjectDataCacheTargetTypeArrayOfUpdateProjectDataCacheTarget1 + + return UpdateProjectDataCacheTarget{ + ArrayOfUpdateProjectDataCacheTarget1: arrayOfUpdateProjectDataCacheTarget1, + Type: typ, + } +} + +func CreateUpdateProjectDataCacheTargetUpdateProjectDataCacheTarget2(updateProjectDataCacheTarget2 UpdateProjectDataCacheTarget2) UpdateProjectDataCacheTarget { + typ := UpdateProjectDataCacheTargetTypeUpdateProjectDataCacheTarget2 + + return UpdateProjectDataCacheTarget{ + UpdateProjectDataCacheTarget2: &updateProjectDataCacheTarget2, + Type: typ, + } +} + +func (u *UpdateProjectDataCacheTarget) UnmarshalJSON(data []byte) error { + + var arrayOfUpdateProjectDataCacheTarget1 []UpdateProjectDataCacheTarget1 = []UpdateProjectDataCacheTarget1{} + if err := utils.UnmarshalJSON(data, &arrayOfUpdateProjectDataCacheTarget1, "", true, true); err == nil { + u.ArrayOfUpdateProjectDataCacheTarget1 = arrayOfUpdateProjectDataCacheTarget1 + u.Type = UpdateProjectDataCacheTargetTypeArrayOfUpdateProjectDataCacheTarget1 + return nil + } + + var updateProjectDataCacheTarget2 UpdateProjectDataCacheTarget2 = UpdateProjectDataCacheTarget2("") + if err := utils.UnmarshalJSON(data, &updateProjectDataCacheTarget2, "", true, true); err == nil { + u.UpdateProjectDataCacheTarget2 = &updateProjectDataCacheTarget2 + u.Type = UpdateProjectDataCacheTargetTypeUpdateProjectDataCacheTarget2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectDataCacheTarget", string(data)) +} + +func (u UpdateProjectDataCacheTarget) MarshalJSON() ([]byte, error) { + if u.ArrayOfUpdateProjectDataCacheTarget1 != nil { + return utils.MarshalJSON(u.ArrayOfUpdateProjectDataCacheTarget1, "", true) + } + + if u.UpdateProjectDataCacheTarget2 != nil { + return utils.MarshalJSON(u.UpdateProjectDataCacheTarget2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectDataCacheTarget: all fields are null") +} + +type UpdateProjectDataCacheProjectsResponse200Type string + +const ( + UpdateProjectDataCacheProjectsResponse200TypeSecret UpdateProjectDataCacheProjectsResponse200Type = "secret" + UpdateProjectDataCacheProjectsResponse200TypeSystem UpdateProjectDataCacheProjectsResponse200Type = "system" + UpdateProjectDataCacheProjectsResponse200TypeEncrypted UpdateProjectDataCacheProjectsResponse200Type = "encrypted" + UpdateProjectDataCacheProjectsResponse200TypePlain UpdateProjectDataCacheProjectsResponse200Type = "plain" + UpdateProjectDataCacheProjectsResponse200TypeSensitive UpdateProjectDataCacheProjectsResponse200Type = "sensitive" +) + +func (e UpdateProjectDataCacheProjectsResponse200Type) ToPointer() *UpdateProjectDataCacheProjectsResponse200Type { + return &e +} +func (e *UpdateProjectDataCacheProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "secret": + fallthrough + case "system": + fallthrough + case "encrypted": + fallthrough + case "plain": + fallthrough + case "sensitive": + *e = UpdateProjectDataCacheProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsResponse200Type: %v", v) + } +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15TypeFlagsConnectionString UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type = "flags-connection-string" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-connection-string": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type: %v", v) + } +} + +type Fifteen struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type `json:"type"` + ProjectID string `json:"projectId"` +} + +func (o *Fifteen) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv15Type("") + } + return o.Type +} + +func (o *Fifteen) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14TypeIntegrationStoreSecret UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type = "integration-store-secret" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "integration-store-secret": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type: %v", v) + } +} + +type Fourteen struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type `json:"type"` + StoreID string `json:"storeId"` + IntegrationID string `json:"integrationId"` + IntegrationProductID string `json:"integrationProductId"` + IntegrationConfigurationID string `json:"integrationConfigurationId"` +} + +func (o *Fourteen) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv14Type("") + } + return o.Type +} + +func (o *Fourteen) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +func (o *Fourteen) GetIntegrationID() string { + if o == nil { + return "" + } + return o.IntegrationID +} + +func (o *Fourteen) GetIntegrationProductID() string { + if o == nil { + return "" + } + return o.IntegrationProductID +} + +func (o *Fourteen) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13TypePostgresURLNoSsl UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type = "postgres-url-no-ssl" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-no-ssl": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type: %v", v) + } +} + +type Thirteen struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *Thirteen) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv13Type("") + } + return o.Type +} + +func (o *Thirteen) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12TypePostgresDatabase UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type = "postgres-database" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-database": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type: %v", v) + } +} + +type Twelve struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *Twelve) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv12Type("") + } + return o.Type +} + +func (o *Twelve) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11TypePostgresPassword UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type = "postgres-password" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-password": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type: %v", v) + } +} + +type UpdateProjectDataCacheContentHint11 struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *UpdateProjectDataCacheContentHint11) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv11Type("") + } + return o.Type +} + +func (o *UpdateProjectDataCacheContentHint11) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10TypePostgresHost UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type = "postgres-host" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-host": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type: %v", v) + } +} + +type ContentHint10 struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint10) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv10Type("") + } + return o.Type +} + +func (o *ContentHint10) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9TypePostgresUser UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type = "postgres-user" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-user": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type: %v", v) + } +} + +type ContentHint9 struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint9) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnv9Type("") + } + return o.Type +} + +func (o *ContentHint9) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvTypePostgresPrismaURL UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType = "postgres-prisma-url" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-prisma-url": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType: %v", v) + } +} + +type ContentHint8 struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint8) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyEnvType("") + } + return o.Type +} + +func (o *ContentHint8) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyTypePostgresURLNonPooling UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType = "postgres-url-non-pooling" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url-non-pooling": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +type ContentHint7 struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint7) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *ContentHint7) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONTypePostgresURL UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType = "postgres-url" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "postgres-url": + *e = UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type ContentHint6 struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint6) GetType() UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *ContentHint6) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponse200Type string + +const ( + UpdateProjectDataCacheContentHintProjectsResponse200TypeBlobReadWriteToken UpdateProjectDataCacheContentHintProjectsResponse200Type = "blob-read-write-token" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponse200Type) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponse200Type { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponse200Type) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blob-read-write-token": + *e = UpdateProjectDataCacheContentHintProjectsResponse200Type(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponse200Type: %v", v) + } +} + +type ContentHint5 struct { + Type UpdateProjectDataCacheContentHintProjectsResponse200Type `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint5) GetType() UpdateProjectDataCacheContentHintProjectsResponse200Type { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponse200Type("") + } + return o.Type +} + +func (o *ContentHint5) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsResponseType string + +const ( + UpdateProjectDataCacheContentHintProjectsResponseTypeRedisRestAPIReadOnlyToken UpdateProjectDataCacheContentHintProjectsResponseType = "redis-rest-api-read-only-token" +) + +func (e UpdateProjectDataCacheContentHintProjectsResponseType) ToPointer() *UpdateProjectDataCacheContentHintProjectsResponseType { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-read-only-token": + *e = UpdateProjectDataCacheContentHintProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsResponseType: %v", v) + } +} + +type ContentHint4 struct { + Type UpdateProjectDataCacheContentHintProjectsResponseType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint4) GetType() UpdateProjectDataCacheContentHintProjectsResponseType { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsResponseType("") + } + return o.Type +} + +func (o *ContentHint4) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintProjectsType string + +const ( + UpdateProjectDataCacheContentHintProjectsTypeRedisRestAPIToken UpdateProjectDataCacheContentHintProjectsType = "redis-rest-api-token" +) + +func (e UpdateProjectDataCacheContentHintProjectsType) ToPointer() *UpdateProjectDataCacheContentHintProjectsType { + return &e +} +func (e *UpdateProjectDataCacheContentHintProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-token": + *e = UpdateProjectDataCacheContentHintProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintProjectsType: %v", v) + } +} + +type ContentHint3 struct { + Type UpdateProjectDataCacheContentHintProjectsType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint3) GetType() UpdateProjectDataCacheContentHintProjectsType { + if o == nil { + return UpdateProjectDataCacheContentHintProjectsType("") + } + return o.Type +} + +func (o *ContentHint3) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type UpdateProjectDataCacheContentHintType string + +const ( + UpdateProjectDataCacheContentHintTypeRedisRestAPIURL UpdateProjectDataCacheContentHintType = "redis-rest-api-url" +) + +func (e UpdateProjectDataCacheContentHintType) ToPointer() *UpdateProjectDataCacheContentHintType { + return &e +} +func (e *UpdateProjectDataCacheContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-rest-api-url": + *e = UpdateProjectDataCacheContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheContentHintType: %v", v) + } +} + +type ContentHint2 struct { + Type UpdateProjectDataCacheContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint2) GetType() UpdateProjectDataCacheContentHintType { + if o == nil { + return UpdateProjectDataCacheContentHintType("") + } + return o.Type +} + +func (o *ContentHint2) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type ContentHintType string + +const ( + ContentHintTypeRedisURL ContentHintType = "redis-url" +) + +func (e ContentHintType) ToPointer() *ContentHintType { + return &e +} +func (e *ContentHintType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "redis-url": + *e = ContentHintType(v) + return nil + default: + return fmt.Errorf("invalid value for ContentHintType: %v", v) + } +} + +type ContentHint1 struct { + Type ContentHintType `json:"type"` + StoreID string `json:"storeId"` +} + +func (o *ContentHint1) GetType() ContentHintType { + if o == nil { + return ContentHintType("") + } + return o.Type +} + +func (o *ContentHint1) GetStoreID() string { + if o == nil { + return "" + } + return o.StoreID +} + +type ContentHintUnionType string + +const ( + ContentHintUnionTypeContentHint1 ContentHintUnionType = "contentHint_1" + ContentHintUnionTypeContentHint2 ContentHintUnionType = "contentHint_2" + ContentHintUnionTypeContentHint3 ContentHintUnionType = "contentHint_3" + ContentHintUnionTypeContentHint4 ContentHintUnionType = "contentHint_4" + ContentHintUnionTypeContentHint5 ContentHintUnionType = "contentHint_5" + ContentHintUnionTypeContentHint6 ContentHintUnionType = "contentHint_6" + ContentHintUnionTypeContentHint7 ContentHintUnionType = "contentHint_7" + ContentHintUnionTypeContentHint8 ContentHintUnionType = "contentHint_8" + ContentHintUnionTypeContentHint9 ContentHintUnionType = "contentHint_9" + ContentHintUnionTypeContentHint10 ContentHintUnionType = "contentHint_10" + ContentHintUnionTypeUpdateProjectDataCacheContentHint11 ContentHintUnionType = "updateProjectDataCache_contentHint_11" + ContentHintUnionTypeTwelve ContentHintUnionType = "12" + ContentHintUnionTypeThirteen ContentHintUnionType = "13" + ContentHintUnionTypeFourteen ContentHintUnionType = "14" + ContentHintUnionTypeFifteen ContentHintUnionType = "15" +) + +type ContentHint struct { + ContentHint1 *ContentHint1 + ContentHint2 *ContentHint2 + ContentHint3 *ContentHint3 + ContentHint4 *ContentHint4 + ContentHint5 *ContentHint5 + ContentHint6 *ContentHint6 + ContentHint7 *ContentHint7 + ContentHint8 *ContentHint8 + ContentHint9 *ContentHint9 + ContentHint10 *ContentHint10 + UpdateProjectDataCacheContentHint11 *UpdateProjectDataCacheContentHint11 + Twelve *Twelve + Thirteen *Thirteen + Fourteen *Fourteen + Fifteen *Fifteen + + Type ContentHintUnionType +} + +func CreateContentHintContentHint1(contentHint1 ContentHint1) ContentHint { + typ := ContentHintUnionTypeContentHint1 + + return ContentHint{ + ContentHint1: &contentHint1, + Type: typ, + } +} + +func CreateContentHintContentHint2(contentHint2 ContentHint2) ContentHint { + typ := ContentHintUnionTypeContentHint2 + + return ContentHint{ + ContentHint2: &contentHint2, + Type: typ, + } +} + +func CreateContentHintContentHint3(contentHint3 ContentHint3) ContentHint { + typ := ContentHintUnionTypeContentHint3 + + return ContentHint{ + ContentHint3: &contentHint3, + Type: typ, + } +} + +func CreateContentHintContentHint4(contentHint4 ContentHint4) ContentHint { + typ := ContentHintUnionTypeContentHint4 + + return ContentHint{ + ContentHint4: &contentHint4, + Type: typ, + } +} + +func CreateContentHintContentHint5(contentHint5 ContentHint5) ContentHint { + typ := ContentHintUnionTypeContentHint5 + + return ContentHint{ + ContentHint5: &contentHint5, + Type: typ, + } +} + +func CreateContentHintContentHint6(contentHint6 ContentHint6) ContentHint { + typ := ContentHintUnionTypeContentHint6 + + return ContentHint{ + ContentHint6: &contentHint6, + Type: typ, + } +} + +func CreateContentHintContentHint7(contentHint7 ContentHint7) ContentHint { + typ := ContentHintUnionTypeContentHint7 + + return ContentHint{ + ContentHint7: &contentHint7, + Type: typ, + } +} + +func CreateContentHintContentHint8(contentHint8 ContentHint8) ContentHint { + typ := ContentHintUnionTypeContentHint8 + + return ContentHint{ + ContentHint8: &contentHint8, + Type: typ, + } +} + +func CreateContentHintContentHint9(contentHint9 ContentHint9) ContentHint { + typ := ContentHintUnionTypeContentHint9 + + return ContentHint{ + ContentHint9: &contentHint9, + Type: typ, + } +} + +func CreateContentHintContentHint10(contentHint10 ContentHint10) ContentHint { + typ := ContentHintUnionTypeContentHint10 + + return ContentHint{ + ContentHint10: &contentHint10, + Type: typ, + } +} + +func CreateContentHintUpdateProjectDataCacheContentHint11(updateProjectDataCacheContentHint11 UpdateProjectDataCacheContentHint11) ContentHint { + typ := ContentHintUnionTypeUpdateProjectDataCacheContentHint11 + + return ContentHint{ + UpdateProjectDataCacheContentHint11: &updateProjectDataCacheContentHint11, + Type: typ, + } +} + +func CreateContentHintTwelve(twelve Twelve) ContentHint { + typ := ContentHintUnionTypeTwelve + + return ContentHint{ + Twelve: &twelve, + Type: typ, + } +} + +func CreateContentHintThirteen(thirteen Thirteen) ContentHint { + typ := ContentHintUnionTypeThirteen + + return ContentHint{ + Thirteen: &thirteen, + Type: typ, + } +} + +func CreateContentHintFourteen(fourteen Fourteen) ContentHint { + typ := ContentHintUnionTypeFourteen + + return ContentHint{ + Fourteen: &fourteen, + Type: typ, + } +} + +func CreateContentHintFifteen(fifteen Fifteen) ContentHint { + typ := ContentHintUnionTypeFifteen + + return ContentHint{ + Fifteen: &fifteen, + Type: typ, + } +} + +func (u *ContentHint) UnmarshalJSON(data []byte) error { + + var contentHint7 ContentHint7 = ContentHint7{} + if err := utils.UnmarshalJSON(data, &contentHint7, "", true, true); err == nil { + u.ContentHint7 = &contentHint7 + u.Type = ContentHintUnionTypeContentHint7 + return nil + } + + var contentHint9 ContentHint9 = ContentHint9{} + if err := utils.UnmarshalJSON(data, &contentHint9, "", true, true); err == nil { + u.ContentHint9 = &contentHint9 + u.Type = ContentHintUnionTypeContentHint9 + return nil + } + + var contentHint3 ContentHint3 = ContentHint3{} + if err := utils.UnmarshalJSON(data, &contentHint3, "", true, true); err == nil { + u.ContentHint3 = &contentHint3 + u.Type = ContentHintUnionTypeContentHint3 + return nil + } + + var contentHint4 ContentHint4 = ContentHint4{} + if err := utils.UnmarshalJSON(data, &contentHint4, "", true, true); err == nil { + u.ContentHint4 = &contentHint4 + u.Type = ContentHintUnionTypeContentHint4 + return nil + } + + var contentHint5 ContentHint5 = ContentHint5{} + if err := utils.UnmarshalJSON(data, &contentHint5, "", true, true); err == nil { + u.ContentHint5 = &contentHint5 + u.Type = ContentHintUnionTypeContentHint5 + return nil + } + + var contentHint6 ContentHint6 = ContentHint6{} + if err := utils.UnmarshalJSON(data, &contentHint6, "", true, true); err == nil { + u.ContentHint6 = &contentHint6 + u.Type = ContentHintUnionTypeContentHint6 + return nil + } + + var contentHint2 ContentHint2 = ContentHint2{} + if err := utils.UnmarshalJSON(data, &contentHint2, "", true, true); err == nil { + u.ContentHint2 = &contentHint2 + u.Type = ContentHintUnionTypeContentHint2 + return nil + } + + var contentHint8 ContentHint8 = ContentHint8{} + if err := utils.UnmarshalJSON(data, &contentHint8, "", true, true); err == nil { + u.ContentHint8 = &contentHint8 + u.Type = ContentHintUnionTypeContentHint8 + return nil + } + + var contentHint1 ContentHint1 = ContentHint1{} + if err := utils.UnmarshalJSON(data, &contentHint1, "", true, true); err == nil { + u.ContentHint1 = &contentHint1 + u.Type = ContentHintUnionTypeContentHint1 + return nil + } + + var contentHint10 ContentHint10 = ContentHint10{} + if err := utils.UnmarshalJSON(data, &contentHint10, "", true, true); err == nil { + u.ContentHint10 = &contentHint10 + u.Type = ContentHintUnionTypeContentHint10 + return nil + } + + var updateProjectDataCacheContentHint11 UpdateProjectDataCacheContentHint11 = UpdateProjectDataCacheContentHint11{} + if err := utils.UnmarshalJSON(data, &updateProjectDataCacheContentHint11, "", true, true); err == nil { + u.UpdateProjectDataCacheContentHint11 = &updateProjectDataCacheContentHint11 + u.Type = ContentHintUnionTypeUpdateProjectDataCacheContentHint11 + return nil + } + + var twelve Twelve = Twelve{} + if err := utils.UnmarshalJSON(data, &twelve, "", true, true); err == nil { + u.Twelve = &twelve + u.Type = ContentHintUnionTypeTwelve + return nil + } + + var thirteen Thirteen = Thirteen{} + if err := utils.UnmarshalJSON(data, &thirteen, "", true, true); err == nil { + u.Thirteen = &thirteen + u.Type = ContentHintUnionTypeThirteen + return nil + } + + var fifteen Fifteen = Fifteen{} + if err := utils.UnmarshalJSON(data, &fifteen, "", true, true); err == nil { + u.Fifteen = &fifteen + u.Type = ContentHintUnionTypeFifteen + return nil + } + + var fourteen Fourteen = Fourteen{} + if err := utils.UnmarshalJSON(data, &fourteen, "", true, true); err == nil { + u.Fourteen = &fourteen + u.Type = ContentHintUnionTypeFourteen + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ContentHint", string(data)) +} + +func (u ContentHint) MarshalJSON() ([]byte, error) { + if u.ContentHint1 != nil { + return utils.MarshalJSON(u.ContentHint1, "", true) + } + + if u.ContentHint2 != nil { + return utils.MarshalJSON(u.ContentHint2, "", true) + } + + if u.ContentHint3 != nil { + return utils.MarshalJSON(u.ContentHint3, "", true) + } + + if u.ContentHint4 != nil { + return utils.MarshalJSON(u.ContentHint4, "", true) + } + + if u.ContentHint5 != nil { + return utils.MarshalJSON(u.ContentHint5, "", true) + } + + if u.ContentHint6 != nil { + return utils.MarshalJSON(u.ContentHint6, "", true) + } + + if u.ContentHint7 != nil { + return utils.MarshalJSON(u.ContentHint7, "", true) + } + + if u.ContentHint8 != nil { + return utils.MarshalJSON(u.ContentHint8, "", true) + } + + if u.ContentHint9 != nil { + return utils.MarshalJSON(u.ContentHint9, "", true) + } + + if u.ContentHint10 != nil { + return utils.MarshalJSON(u.ContentHint10, "", true) + } + + if u.UpdateProjectDataCacheContentHint11 != nil { + return utils.MarshalJSON(u.UpdateProjectDataCacheContentHint11, "", true) + } + + if u.Twelve != nil { + return utils.MarshalJSON(u.Twelve, "", true) + } + + if u.Thirteen != nil { + return utils.MarshalJSON(u.Thirteen, "", true) + } + + if u.Fourteen != nil { + return utils.MarshalJSON(u.Fourteen, "", true) + } + + if u.Fifteen != nil { + return utils.MarshalJSON(u.Fifteen, "", true) + } + + return nil, errors.New("could not marshal union type ContentHint: all fields are null") +} + +type UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType string + +const ( + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTypeFlagsSecret UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType = "flags-secret" +) + +func (e UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType) ToPointer() *UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType { + return &e +} +func (e *UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "flags-secret": + *e = UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType: %v", v) + } +} + +// InternalContentHint - Similar to `contentHints`, but should not be exposed to the user. +type InternalContentHint struct { + Type UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType `json:"type"` + // Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda. + EncryptedValue string `json:"encryptedValue"` +} + +func (o *InternalContentHint) GetType() UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType { + if o == nil { + return UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyType("") + } + return o.Type +} + +func (o *InternalContentHint) GetEncryptedValue() string { + if o == nil { + return "" + } + return o.EncryptedValue +} + +type Env struct { + Target *UpdateProjectDataCacheTarget `json:"target,omitempty"` + Type UpdateProjectDataCacheProjectsResponse200Type `json:"type"` + // This is used to identiy variables that have been migrated from type secret to sensitive. + SunsetSecretID *string `json:"sunsetSecretId,omitempty"` + ID *string `json:"id,omitempty"` + Key string `json:"key"` + Value string `json:"value"` + ConfigurationID *string `json:"configurationId,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + UpdatedBy *string `json:"updatedBy,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + EdgeConfigID *string `json:"edgeConfigId,omitempty"` + EdgeConfigTokenID *string `json:"edgeConfigTokenId,omitempty"` + ContentHint *ContentHint `json:"contentHint,omitempty"` + // Similar to `contentHints`, but should not be exposed to the user. + InternalContentHint *InternalContentHint `json:"internalContentHint,omitempty"` + // Whether `value` and `vsmValue` are decrypted. + Decrypted *bool `json:"decrypted,omitempty"` + Comment *string `json:"comment,omitempty"` + CustomEnvironmentIds []string `json:"customEnvironmentIds,omitempty"` + VsmValue *string `json:"vsmValue,omitempty"` +} + +func (o *Env) GetTarget() *UpdateProjectDataCacheTarget { + if o == nil { + return nil + } + return o.Target +} + +func (o *Env) GetType() UpdateProjectDataCacheProjectsResponse200Type { + if o == nil { + return UpdateProjectDataCacheProjectsResponse200Type("") + } + return o.Type +} + +func (o *Env) GetSunsetSecretID() *string { + if o == nil { + return nil + } + return o.SunsetSecretID +} + +func (o *Env) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Env) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *Env) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Env) GetConfigurationID() *string { + if o == nil { + return nil + } + return o.ConfigurationID +} + +func (o *Env) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Env) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Env) GetCreatedBy() *string { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *Env) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Env) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *Env) GetEdgeConfigID() *string { + if o == nil { + return nil + } + return o.EdgeConfigID +} + +func (o *Env) GetEdgeConfigTokenID() *string { + if o == nil { + return nil + } + return o.EdgeConfigTokenID +} + +func (o *Env) GetContentHint() *ContentHint { + if o == nil { + return nil + } + return o.ContentHint +} + +func (o *Env) GetInternalContentHint() *InternalContentHint { + if o == nil { + return nil + } + return o.InternalContentHint +} + +func (o *Env) GetDecrypted() *bool { + if o == nil { + return nil + } + return o.Decrypted +} + +func (o *Env) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +func (o *Env) GetCustomEnvironmentIds() []string { + if o == nil { + return nil + } + return o.CustomEnvironmentIds +} + +func (o *Env) GetVsmValue() *string { + if o == nil { + return nil + } + return o.VsmValue +} + +type CustomEnvironments struct { +} + +type UpdateProjectDataCacheFramework string + +const ( + UpdateProjectDataCacheFrameworkBlitzjs UpdateProjectDataCacheFramework = "blitzjs" + UpdateProjectDataCacheFrameworkNextjs UpdateProjectDataCacheFramework = "nextjs" + UpdateProjectDataCacheFrameworkGatsby UpdateProjectDataCacheFramework = "gatsby" + UpdateProjectDataCacheFrameworkRemix UpdateProjectDataCacheFramework = "remix" + UpdateProjectDataCacheFrameworkAstro UpdateProjectDataCacheFramework = "astro" + UpdateProjectDataCacheFrameworkHexo UpdateProjectDataCacheFramework = "hexo" + UpdateProjectDataCacheFrameworkEleventy UpdateProjectDataCacheFramework = "eleventy" + UpdateProjectDataCacheFrameworkDocusaurus2 UpdateProjectDataCacheFramework = "docusaurus-2" + UpdateProjectDataCacheFrameworkDocusaurus UpdateProjectDataCacheFramework = "docusaurus" + UpdateProjectDataCacheFrameworkPreact UpdateProjectDataCacheFramework = "preact" + UpdateProjectDataCacheFrameworkSolidstart1 UpdateProjectDataCacheFramework = "solidstart-1" + UpdateProjectDataCacheFrameworkSolidstart UpdateProjectDataCacheFramework = "solidstart" + UpdateProjectDataCacheFrameworkDojo UpdateProjectDataCacheFramework = "dojo" + UpdateProjectDataCacheFrameworkEmber UpdateProjectDataCacheFramework = "ember" + UpdateProjectDataCacheFrameworkVue UpdateProjectDataCacheFramework = "vue" + UpdateProjectDataCacheFrameworkScully UpdateProjectDataCacheFramework = "scully" + UpdateProjectDataCacheFrameworkIonicAngular UpdateProjectDataCacheFramework = "ionic-angular" + UpdateProjectDataCacheFrameworkAngular UpdateProjectDataCacheFramework = "angular" + UpdateProjectDataCacheFrameworkPolymer UpdateProjectDataCacheFramework = "polymer" + UpdateProjectDataCacheFrameworkSvelte UpdateProjectDataCacheFramework = "svelte" + UpdateProjectDataCacheFrameworkSveltekit UpdateProjectDataCacheFramework = "sveltekit" + UpdateProjectDataCacheFrameworkSveltekit1 UpdateProjectDataCacheFramework = "sveltekit-1" + UpdateProjectDataCacheFrameworkIonicReact UpdateProjectDataCacheFramework = "ionic-react" + UpdateProjectDataCacheFrameworkCreateReactApp UpdateProjectDataCacheFramework = "create-react-app" + UpdateProjectDataCacheFrameworkGridsome UpdateProjectDataCacheFramework = "gridsome" + UpdateProjectDataCacheFrameworkUmijs UpdateProjectDataCacheFramework = "umijs" + UpdateProjectDataCacheFrameworkSapper UpdateProjectDataCacheFramework = "sapper" + UpdateProjectDataCacheFrameworkSaber UpdateProjectDataCacheFramework = "saber" + UpdateProjectDataCacheFrameworkStencil UpdateProjectDataCacheFramework = "stencil" + UpdateProjectDataCacheFrameworkNuxtjs UpdateProjectDataCacheFramework = "nuxtjs" + UpdateProjectDataCacheFrameworkRedwoodjs UpdateProjectDataCacheFramework = "redwoodjs" + UpdateProjectDataCacheFrameworkHugo UpdateProjectDataCacheFramework = "hugo" + UpdateProjectDataCacheFrameworkJekyll UpdateProjectDataCacheFramework = "jekyll" + UpdateProjectDataCacheFrameworkBrunch UpdateProjectDataCacheFramework = "brunch" + UpdateProjectDataCacheFrameworkMiddleman UpdateProjectDataCacheFramework = "middleman" + UpdateProjectDataCacheFrameworkZola UpdateProjectDataCacheFramework = "zola" + UpdateProjectDataCacheFrameworkHydrogen UpdateProjectDataCacheFramework = "hydrogen" + UpdateProjectDataCacheFrameworkVite UpdateProjectDataCacheFramework = "vite" + UpdateProjectDataCacheFrameworkVitepress UpdateProjectDataCacheFramework = "vitepress" + UpdateProjectDataCacheFrameworkVuepress UpdateProjectDataCacheFramework = "vuepress" + UpdateProjectDataCacheFrameworkParcel UpdateProjectDataCacheFramework = "parcel" + UpdateProjectDataCacheFrameworkFasthtml UpdateProjectDataCacheFramework = "fasthtml" + UpdateProjectDataCacheFrameworkSanityV3 UpdateProjectDataCacheFramework = "sanity-v3" + UpdateProjectDataCacheFrameworkSanity UpdateProjectDataCacheFramework = "sanity" + UpdateProjectDataCacheFrameworkStorybook UpdateProjectDataCacheFramework = "storybook" +) + +func (e UpdateProjectDataCacheFramework) ToPointer() *UpdateProjectDataCacheFramework { + return &e +} +func (e *UpdateProjectDataCacheFramework) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "blitzjs": + fallthrough + case "nextjs": + fallthrough + case "gatsby": + fallthrough + case "remix": + fallthrough + case "astro": + fallthrough + case "hexo": + fallthrough + case "eleventy": + fallthrough + case "docusaurus-2": + fallthrough + case "docusaurus": + fallthrough + case "preact": + fallthrough + case "solidstart-1": + fallthrough + case "solidstart": + fallthrough + case "dojo": + fallthrough + case "ember": + fallthrough + case "vue": + fallthrough + case "scully": + fallthrough + case "ionic-angular": + fallthrough + case "angular": + fallthrough + case "polymer": + fallthrough + case "svelte": + fallthrough + case "sveltekit": + fallthrough + case "sveltekit-1": + fallthrough + case "ionic-react": + fallthrough + case "create-react-app": + fallthrough + case "gridsome": + fallthrough + case "umijs": + fallthrough + case "sapper": + fallthrough + case "saber": + fallthrough + case "stencil": + fallthrough + case "nuxtjs": + fallthrough + case "redwoodjs": + fallthrough + case "hugo": + fallthrough + case "jekyll": + fallthrough + case "brunch": + fallthrough + case "middleman": + fallthrough + case "zola": + fallthrough + case "hydrogen": + fallthrough + case "vite": + fallthrough + case "vitepress": + fallthrough + case "vuepress": + fallthrough + case "parcel": + fallthrough + case "fasthtml": + fallthrough + case "sanity-v3": + fallthrough + case "sanity": + fallthrough + case "storybook": + *e = UpdateProjectDataCacheFramework(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheFramework: %v", v) + } +} + +type IPBuckets struct { + Bucket string `json:"bucket"` + SupportUntil *float64 `json:"supportUntil,omitempty"` +} + +func (o *IPBuckets) GetBucket() string { + if o == nil { + return "" + } + return o.Bucket +} + +func (o *IPBuckets) GetSupportUntil() *float64 { + if o == nil { + return nil + } + return o.SupportUntil +} + +type AliasAssignedType string + +const ( + AliasAssignedTypeNumber AliasAssignedType = "number" + AliasAssignedTypeBoolean AliasAssignedType = "boolean" +) + +type AliasAssigned struct { + Number *float64 + Boolean *bool + + Type AliasAssignedType +} + +func CreateAliasAssignedNumber(number float64) AliasAssigned { + typ := AliasAssignedTypeNumber + + return AliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateAliasAssignedBoolean(boolean bool) AliasAssigned { + typ := AliasAssignedTypeBoolean + + return AliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *AliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = AliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = AliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AliasAssigned", string(data)) +} + +func (u AliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type AliasAssigned: all fields are null") +} + +type UpdateProjectDataCacheProjectsAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *UpdateProjectDataCacheProjectsAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *UpdateProjectDataCacheProjectsAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type UpdateProjectDataCacheProjectsResponse200ApplicationJSONType string + +const ( + UpdateProjectDataCacheProjectsResponse200ApplicationJSONTypeEndsWith UpdateProjectDataCacheProjectsResponse200ApplicationJSONType = "endsWith" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONTypeStartsWith UpdateProjectDataCacheProjectsResponse200ApplicationJSONType = "startsWith" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONTypeEquals UpdateProjectDataCacheProjectsResponse200ApplicationJSONType = "equals" +) + +func (e UpdateProjectDataCacheProjectsResponse200ApplicationJSONType) ToPointer() *UpdateProjectDataCacheProjectsResponse200ApplicationJSONType { + return &e +} +func (e *UpdateProjectDataCacheProjectsResponse200ApplicationJSONType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "endsWith": + fallthrough + case "startsWith": + fallthrough + case "equals": + *e = UpdateProjectDataCacheProjectsResponse200ApplicationJSONType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsResponse200ApplicationJSONType: %v", v) + } +} + +type UpdateProjectDataCacheProjectsBranchMatcher struct { + Type UpdateProjectDataCacheProjectsResponse200ApplicationJSONType `json:"type"` + Pattern string `json:"pattern"` +} + +func (o *UpdateProjectDataCacheProjectsBranchMatcher) GetType() UpdateProjectDataCacheProjectsResponse200ApplicationJSONType { + if o == nil { + return UpdateProjectDataCacheProjectsResponse200ApplicationJSONType("") + } + return o.Type +} + +func (o *UpdateProjectDataCacheProjectsBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type UpdateProjectDataCacheProjectsBuilds struct { + Use string `json:"use"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` +} + +func (o *UpdateProjectDataCacheProjectsBuilds) GetUse() string { + if o == nil { + return "" + } + return o.Use +} + +func (o *UpdateProjectDataCacheProjectsBuilds) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *UpdateProjectDataCacheProjectsBuilds) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +type UpdateProjectDataCacheProjectsChecksConclusion string + +const ( + UpdateProjectDataCacheProjectsChecksConclusionSucceeded UpdateProjectDataCacheProjectsChecksConclusion = "succeeded" + UpdateProjectDataCacheProjectsChecksConclusionFailed UpdateProjectDataCacheProjectsChecksConclusion = "failed" + UpdateProjectDataCacheProjectsChecksConclusionSkipped UpdateProjectDataCacheProjectsChecksConclusion = "skipped" + UpdateProjectDataCacheProjectsChecksConclusionCanceled UpdateProjectDataCacheProjectsChecksConclusion = "canceled" +) + +func (e UpdateProjectDataCacheProjectsChecksConclusion) ToPointer() *UpdateProjectDataCacheProjectsChecksConclusion { + return &e +} +func (e *UpdateProjectDataCacheProjectsChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = UpdateProjectDataCacheProjectsChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsChecksConclusion: %v", v) + } +} + +type UpdateProjectDataCacheProjectsChecksState string + +const ( + UpdateProjectDataCacheProjectsChecksStateRegistered UpdateProjectDataCacheProjectsChecksState = "registered" + UpdateProjectDataCacheProjectsChecksStateRunning UpdateProjectDataCacheProjectsChecksState = "running" + UpdateProjectDataCacheProjectsChecksStateCompleted UpdateProjectDataCacheProjectsChecksState = "completed" +) + +func (e UpdateProjectDataCacheProjectsChecksState) ToPointer() *UpdateProjectDataCacheProjectsChecksState { + return &e +} +func (e *UpdateProjectDataCacheProjectsChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = UpdateProjectDataCacheProjectsChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsChecksState: %v", v) + } +} + +type UpdateProjectDataCacheProjectsCreator struct { + Email string `json:"email"` + GithubLogin *string `json:"githubLogin,omitempty"` + GitlabLogin *string `json:"gitlabLogin,omitempty"` + UID string `json:"uid"` + Username string `json:"username"` +} + +func (o *UpdateProjectDataCacheProjectsCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *UpdateProjectDataCacheProjectsCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *UpdateProjectDataCacheProjectsCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +func (o *UpdateProjectDataCacheProjectsCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *UpdateProjectDataCacheProjectsCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +type UpdateProjectDataCacheProjectsOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateProjectDataCacheProjectsOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type UpdateProjectDataCacheProjectsPlan string + +const ( + UpdateProjectDataCacheProjectsPlanPro UpdateProjectDataCacheProjectsPlan = "pro" + UpdateProjectDataCacheProjectsPlanEnterprise UpdateProjectDataCacheProjectsPlan = "enterprise" + UpdateProjectDataCacheProjectsPlanHobby UpdateProjectDataCacheProjectsPlan = "hobby" +) + +func (e UpdateProjectDataCacheProjectsPlan) ToPointer() *UpdateProjectDataCacheProjectsPlan { + return &e +} +func (e *UpdateProjectDataCacheProjectsPlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = UpdateProjectDataCacheProjectsPlan(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsPlan: %v", v) + } +} + +type UpdateProjectDataCacheProjectsReadyState string + +const ( + UpdateProjectDataCacheProjectsReadyStateBuilding UpdateProjectDataCacheProjectsReadyState = "BUILDING" + UpdateProjectDataCacheProjectsReadyStateError UpdateProjectDataCacheProjectsReadyState = "ERROR" + UpdateProjectDataCacheProjectsReadyStateInitializing UpdateProjectDataCacheProjectsReadyState = "INITIALIZING" + UpdateProjectDataCacheProjectsReadyStateQueued UpdateProjectDataCacheProjectsReadyState = "QUEUED" + UpdateProjectDataCacheProjectsReadyStateReady UpdateProjectDataCacheProjectsReadyState = "READY" + UpdateProjectDataCacheProjectsReadyStateCanceled UpdateProjectDataCacheProjectsReadyState = "CANCELED" +) + +func (e UpdateProjectDataCacheProjectsReadyState) ToPointer() *UpdateProjectDataCacheProjectsReadyState { + return &e +} +func (e *UpdateProjectDataCacheProjectsReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = UpdateProjectDataCacheProjectsReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsReadyState: %v", v) + } +} + +type UpdateProjectDataCacheProjectsReadySubstate string + +const ( + UpdateProjectDataCacheProjectsReadySubstateStaged UpdateProjectDataCacheProjectsReadySubstate = "STAGED" + UpdateProjectDataCacheProjectsReadySubstatePromoted UpdateProjectDataCacheProjectsReadySubstate = "PROMOTED" +) + +func (e UpdateProjectDataCacheProjectsReadySubstate) ToPointer() *UpdateProjectDataCacheProjectsReadySubstate { + return &e +} +func (e *UpdateProjectDataCacheProjectsReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = UpdateProjectDataCacheProjectsReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsReadySubstate: %v", v) + } +} + +type UpdateProjectDataCacheType string + +const ( + UpdateProjectDataCacheTypeLambdas UpdateProjectDataCacheType = "LAMBDAS" +) + +func (e UpdateProjectDataCacheType) ToPointer() *UpdateProjectDataCacheType { + return &e +} +func (e *UpdateProjectDataCacheType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = UpdateProjectDataCacheType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheType: %v", v) + } +} + +type LatestDeployments struct { + ID string `json:"id"` + Alias []string `json:"alias,omitempty"` + AliasAssigned *AliasAssigned `json:"aliasAssigned,omitempty"` + AliasError *UpdateProjectDataCacheProjectsAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BranchMatcher *UpdateProjectDataCacheProjectsBranchMatcher `json:"branchMatcher,omitempty"` + BuildingAt *float64 `json:"buildingAt,omitempty"` + Builds []UpdateProjectDataCacheProjectsBuilds `json:"builds,omitempty"` + ChecksConclusion *UpdateProjectDataCacheProjectsChecksConclusion `json:"checksConclusion,omitempty"` + ChecksState *UpdateProjectDataCacheProjectsChecksState `json:"checksState,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedAt float64 `json:"createdAt"` + CreatedIn string `json:"createdIn"` + Creator *UpdateProjectDataCacheProjectsCreator `json:"creator"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + DeploymentHostname string `json:"deploymentHostname"` + Forced *bool `json:"forced,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OidcTokenClaims *UpdateProjectDataCacheProjectsOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + Plan UpdateProjectDataCacheProjectsPlan `json:"plan"` + // Whether or not preview comments are enabled for the deployment + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + Private bool `json:"private"` + ReadyAt *float64 `json:"readyAt,omitempty"` + ReadyState UpdateProjectDataCacheProjectsReadyState `json:"readyState"` + ReadySubstate *UpdateProjectDataCacheProjectsReadySubstate `json:"readySubstate,omitempty"` + RequestedAt *float64 `json:"requestedAt,omitempty"` + Target *string `json:"target,omitempty"` + TeamID *string `json:"teamId,omitempty"` + Type UpdateProjectDataCacheType `json:"type"` + URL string `json:"url"` + UserID string `json:"userId"` + WithCache *bool `json:"withCache,omitempty"` +} + +func (o *LatestDeployments) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *LatestDeployments) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *LatestDeployments) GetAliasAssigned() *AliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *LatestDeployments) GetAliasError() *UpdateProjectDataCacheProjectsAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *LatestDeployments) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *LatestDeployments) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *LatestDeployments) GetBranchMatcher() *UpdateProjectDataCacheProjectsBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *LatestDeployments) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *LatestDeployments) GetBuilds() []UpdateProjectDataCacheProjectsBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *LatestDeployments) GetChecksConclusion() *UpdateProjectDataCacheProjectsChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *LatestDeployments) GetChecksState() *UpdateProjectDataCacheProjectsChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *LatestDeployments) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *LatestDeployments) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *LatestDeployments) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *LatestDeployments) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *LatestDeployments) GetCreator() *UpdateProjectDataCacheProjectsCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *LatestDeployments) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *LatestDeployments) GetDeploymentHostname() string { + if o == nil { + return "" + } + return o.DeploymentHostname +} + +func (o *LatestDeployments) GetForced() *bool { + if o == nil { + return nil + } + return o.Forced +} + +func (o *LatestDeployments) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *LatestDeployments) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *LatestDeployments) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *LatestDeployments) GetOidcTokenClaims() *UpdateProjectDataCacheProjectsOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *LatestDeployments) GetPlan() UpdateProjectDataCacheProjectsPlan { + if o == nil { + return UpdateProjectDataCacheProjectsPlan("") + } + return o.Plan +} + +func (o *LatestDeployments) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *LatestDeployments) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *LatestDeployments) GetReadyAt() *float64 { + if o == nil { + return nil + } + return o.ReadyAt +} + +func (o *LatestDeployments) GetReadyState() UpdateProjectDataCacheProjectsReadyState { + if o == nil { + return UpdateProjectDataCacheProjectsReadyState("") + } + return o.ReadyState +} + +func (o *LatestDeployments) GetReadySubstate() *UpdateProjectDataCacheProjectsReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *LatestDeployments) GetRequestedAt() *float64 { + if o == nil { + return nil + } + return o.RequestedAt +} + +func (o *LatestDeployments) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *LatestDeployments) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *LatestDeployments) GetType() UpdateProjectDataCacheType { + if o == nil { + return UpdateProjectDataCacheType("") + } + return o.Type +} + +func (o *LatestDeployments) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *LatestDeployments) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *LatestDeployments) GetWithCache() *bool { + if o == nil { + return nil + } + return o.WithCache +} + +type UpdateProjectDataCacheLinkProjectsType string + +const ( + UpdateProjectDataCacheLinkProjectsTypeBitbucket UpdateProjectDataCacheLinkProjectsType = "bitbucket" +) + +func (e UpdateProjectDataCacheLinkProjectsType) ToPointer() *UpdateProjectDataCacheLinkProjectsType { + return &e +} +func (e *UpdateProjectDataCacheLinkProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "bitbucket": + *e = UpdateProjectDataCacheLinkProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheLinkProjectsType: %v", v) + } +} + +type UpdateProjectDataCacheLinkDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *UpdateProjectDataCacheLinkDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectDataCacheLinkDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectDataCacheLinkDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectDataCacheLinkDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *UpdateProjectDataCacheLinkDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type Link3 struct { + Name *string `json:"name,omitempty"` + Slug *string `json:"slug,omitempty"` + Owner *string `json:"owner,omitempty"` + Type *UpdateProjectDataCacheLinkProjectsType `json:"type,omitempty"` + UUID *string `json:"uuid,omitempty"` + WorkspaceUUID *string `json:"workspaceUuid,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []UpdateProjectDataCacheLinkDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *Link3) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *Link3) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *Link3) GetOwner() *string { + if o == nil { + return nil + } + return o.Owner +} + +func (o *Link3) GetType() *UpdateProjectDataCacheLinkProjectsType { + if o == nil { + return nil + } + return o.Type +} + +func (o *Link3) GetUUID() *string { + if o == nil { + return nil + } + return o.UUID +} + +func (o *Link3) GetWorkspaceUUID() *string { + if o == nil { + return nil + } + return o.WorkspaceUUID +} + +func (o *Link3) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Link3) GetDeployHooks() []UpdateProjectDataCacheLinkDeployHooks { + if o == nil { + return []UpdateProjectDataCacheLinkDeployHooks{} + } + return o.DeployHooks +} + +func (o *Link3) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *Link3) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Link3) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *Link3) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type UpdateProjectDataCacheLinkType string + +const ( + UpdateProjectDataCacheLinkTypeGitlab UpdateProjectDataCacheLinkType = "gitlab" +) + +func (e UpdateProjectDataCacheLinkType) ToPointer() *UpdateProjectDataCacheLinkType { + return &e +} +func (e *UpdateProjectDataCacheLinkType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "gitlab": + *e = UpdateProjectDataCacheLinkType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheLinkType: %v", v) + } +} + +type LinkDeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *LinkDeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *LinkDeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *LinkDeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *LinkDeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *LinkDeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type Link2 struct { + ProjectID *string `json:"projectId,omitempty"` + ProjectName *string `json:"projectName,omitempty"` + ProjectNameWithNamespace *string `json:"projectNameWithNamespace,omitempty"` + ProjectNamespace *string `json:"projectNamespace,omitempty"` + // A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. This is the id of the top level group that a namespace belongs to. Gitlab supports group nesting (up to 20 levels). + ProjectOwnerID *float64 `json:"projectOwnerId,omitempty"` + ProjectURL *string `json:"projectUrl,omitempty"` + Type *UpdateProjectDataCacheLinkType `json:"type,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []LinkDeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *Link2) GetProjectID() *string { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *Link2) GetProjectName() *string { + if o == nil { + return nil + } + return o.ProjectName +} + +func (o *Link2) GetProjectNameWithNamespace() *string { + if o == nil { + return nil + } + return o.ProjectNameWithNamespace +} + +func (o *Link2) GetProjectNamespace() *string { + if o == nil { + return nil + } + return o.ProjectNamespace +} + +func (o *Link2) GetProjectOwnerID() *float64 { + if o == nil { + return nil + } + return o.ProjectOwnerID +} + +func (o *Link2) GetProjectURL() *string { + if o == nil { + return nil + } + return o.ProjectURL +} + +func (o *Link2) GetType() *UpdateProjectDataCacheLinkType { + if o == nil { + return nil + } + return o.Type +} + +func (o *Link2) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Link2) GetDeployHooks() []LinkDeployHooks { + if o == nil { + return []LinkDeployHooks{} + } + return o.DeployHooks +} + +func (o *Link2) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *Link2) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Link2) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *Link2) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type LinkType string + +const ( + LinkTypeGithub LinkType = "github" +) + +func (e LinkType) ToPointer() *LinkType { + return &e +} +func (e *LinkType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "github": + *e = LinkType(v) + return nil + default: + return fmt.Errorf("invalid value for LinkType: %v", v) + } +} + +type DeployHooks struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Ref string `json:"ref"` + URL string `json:"url"` +} + +func (o *DeployHooks) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *DeployHooks) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *DeployHooks) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *DeployHooks) GetRef() string { + if o == nil { + return "" + } + return o.Ref +} + +func (o *DeployHooks) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +type Link1 struct { + Org *string `json:"org,omitempty"` + // A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. + RepoOwnerID *float64 `json:"repoOwnerId,omitempty"` + Repo *string `json:"repo,omitempty"` + RepoID *float64 `json:"repoId,omitempty"` + Type *LinkType `json:"type,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + DeployHooks []DeployHooks `json:"deployHooks"` + GitCredentialID *string `json:"gitCredentialId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Sourceless *bool `json:"sourceless,omitempty"` + ProductionBranch *string `json:"productionBranch,omitempty"` +} + +func (o *Link1) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} + +func (o *Link1) GetRepoOwnerID() *float64 { + if o == nil { + return nil + } + return o.RepoOwnerID +} + +func (o *Link1) GetRepo() *string { + if o == nil { + return nil + } + return o.Repo +} + +func (o *Link1) GetRepoID() *float64 { + if o == nil { + return nil + } + return o.RepoID +} + +func (o *Link1) GetType() *LinkType { + if o == nil { + return nil + } + return o.Type +} + +func (o *Link1) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Link1) GetDeployHooks() []DeployHooks { + if o == nil { + return []DeployHooks{} + } + return o.DeployHooks +} + +func (o *Link1) GetGitCredentialID() *string { + if o == nil { + return nil + } + return o.GitCredentialID +} + +func (o *Link1) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *Link1) GetSourceless() *bool { + if o == nil { + return nil + } + return o.Sourceless +} + +func (o *Link1) GetProductionBranch() *string { + if o == nil { + return nil + } + return o.ProductionBranch +} + +type LinkUnionType string + +const ( + LinkUnionTypeLink1 LinkUnionType = "link_1" + LinkUnionTypeLink2 LinkUnionType = "link_2" + LinkUnionTypeLink3 LinkUnionType = "link_3" +) + +type Link struct { + Link1 *Link1 + Link2 *Link2 + Link3 *Link3 + + Type LinkUnionType +} + +func CreateLinkLink1(link1 Link1) Link { + typ := LinkUnionTypeLink1 + + return Link{ + Link1: &link1, + Type: typ, + } +} + +func CreateLinkLink2(link2 Link2) Link { + typ := LinkUnionTypeLink2 + + return Link{ + Link2: &link2, + Type: typ, + } +} + +func CreateLinkLink3(link3 Link3) Link { + typ := LinkUnionTypeLink3 + + return Link{ + Link3: &link3, + Type: typ, + } +} + +func (u *Link) UnmarshalJSON(data []byte) error { + + var link1 Link1 = Link1{} + if err := utils.UnmarshalJSON(data, &link1, "", true, true); err == nil { + u.Link1 = &link1 + u.Type = LinkUnionTypeLink1 + return nil + } + + var link3 Link3 = Link3{} + if err := utils.UnmarshalJSON(data, &link3, "", true, true); err == nil { + u.Link3 = &link3 + u.Type = LinkUnionTypeLink3 + return nil + } + + var link2 Link2 = Link2{} + if err := utils.UnmarshalJSON(data, &link2, "", true, true); err == nil { + u.Link2 = &link2 + u.Type = LinkUnionTypeLink2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Link", string(data)) +} + +func (u Link) MarshalJSON() ([]byte, error) { + if u.Link1 != nil { + return utils.MarshalJSON(u.Link1, "", true) + } + + if u.Link2 != nil { + return utils.MarshalJSON(u.Link2, "", true) + } + + if u.Link3 != nil { + return utils.MarshalJSON(u.Link3, "", true) + } + + return nil, errors.New("could not marshal union type Link: all fields are null") +} + +type Microfrontends struct { + // Timestamp when the microfrontends settings were last updated. + UpdatedAt float64 `json:"updatedAt"` + // The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together. + GroupIds []string `json:"groupIds"` + // Whether microfrontends are enabled for this project. + Enabled bool `json:"enabled"` + // Whether this project is the default application for the microfrontends group. The default application is the one that is used as the top level shell for the microfrontends group and hosts the other microfrontends. + IsDefaultApp *bool `json:"isDefaultApp,omitempty"` + // A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. + DefaultRoute *string `json:"defaultRoute,omitempty"` +} + +func (o *Microfrontends) GetUpdatedAt() float64 { + if o == nil { + return 0.0 + } + return o.UpdatedAt +} + +func (o *Microfrontends) GetGroupIds() []string { + if o == nil { + return []string{} + } + return o.GroupIds +} + +func (o *Microfrontends) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *Microfrontends) GetIsDefaultApp() *bool { + if o == nil { + return nil + } + return o.IsDefaultApp +} + +func (o *Microfrontends) GetDefaultRoute() *string { + if o == nil { + return nil + } + return o.DefaultRoute +} + +type UpdateProjectDataCacheNodeVersion string + +const ( + UpdateProjectDataCacheNodeVersionTwentyTwoX UpdateProjectDataCacheNodeVersion = "22.x" + UpdateProjectDataCacheNodeVersionTwentyX UpdateProjectDataCacheNodeVersion = "20.x" + UpdateProjectDataCacheNodeVersionEighteenX UpdateProjectDataCacheNodeVersion = "18.x" + UpdateProjectDataCacheNodeVersionSixteenX UpdateProjectDataCacheNodeVersion = "16.x" + UpdateProjectDataCacheNodeVersionFourteenX UpdateProjectDataCacheNodeVersion = "14.x" + UpdateProjectDataCacheNodeVersionTwelveX UpdateProjectDataCacheNodeVersion = "12.x" + UpdateProjectDataCacheNodeVersionTenX UpdateProjectDataCacheNodeVersion = "10.x" + UpdateProjectDataCacheNodeVersionEight10X UpdateProjectDataCacheNodeVersion = "8.10.x" +) + +func (e UpdateProjectDataCacheNodeVersion) ToPointer() *UpdateProjectDataCacheNodeVersion { + return &e +} +func (e *UpdateProjectDataCacheNodeVersion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "22.x": + fallthrough + case "20.x": + fallthrough + case "18.x": + fallthrough + case "16.x": + fallthrough + case "14.x": + fallthrough + case "12.x": + fallthrough + case "10.x": + fallthrough + case "8.10.x": + *e = UpdateProjectDataCacheNodeVersion(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheNodeVersion: %v", v) + } +} + +type UpdateProjectDataCachePaths struct { + Value string `json:"value"` +} + +func (o *UpdateProjectDataCachePaths) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +type UpdateProjectDataCacheOptionsAllowlist struct { + Paths []UpdateProjectDataCachePaths `json:"paths"` +} + +func (o *UpdateProjectDataCacheOptionsAllowlist) GetPaths() []UpdateProjectDataCachePaths { + if o == nil { + return []UpdateProjectDataCachePaths{} + } + return o.Paths +} + +type UpdateProjectDataCachePasswordProtection struct { +} + +type FunctionDefaultMemoryType string + +const ( + FunctionDefaultMemoryTypeStandardLegacy FunctionDefaultMemoryType = "standard_legacy" + FunctionDefaultMemoryTypeStandard FunctionDefaultMemoryType = "standard" + FunctionDefaultMemoryTypePerformance FunctionDefaultMemoryType = "performance" +) + +func (e FunctionDefaultMemoryType) ToPointer() *FunctionDefaultMemoryType { + return &e +} +func (e *FunctionDefaultMemoryType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "standard_legacy": + fallthrough + case "standard": + fallthrough + case "performance": + *e = FunctionDefaultMemoryType(v) + return nil + default: + return fmt.Errorf("invalid value for FunctionDefaultMemoryType: %v", v) + } +} + +type ResourceConfig struct { + FunctionDefaultRegion *string `json:"functionDefaultRegion,omitempty"` + FunctionDefaultTimeout *float64 `json:"functionDefaultTimeout,omitempty"` + FunctionDefaultMemoryType *FunctionDefaultMemoryType `json:"functionDefaultMemoryType,omitempty"` + FunctionZeroConfigFailover *bool `json:"functionZeroConfigFailover,omitempty"` + AllowServerlessConcurrency *bool `json:"allowServerlessConcurrency,omitempty"` + ElasticConcurrencyEnabled *bool `json:"elasticConcurrencyEnabled,omitempty"` +} + +func (o *ResourceConfig) GetFunctionDefaultRegion() *string { + if o == nil { + return nil + } + return o.FunctionDefaultRegion +} + +func (o *ResourceConfig) GetFunctionDefaultTimeout() *float64 { + if o == nil { + return nil + } + return o.FunctionDefaultTimeout +} + +func (o *ResourceConfig) GetFunctionDefaultMemoryType() *FunctionDefaultMemoryType { + if o == nil { + return nil + } + return o.FunctionDefaultMemoryType +} + +func (o *ResourceConfig) GetFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.FunctionZeroConfigFailover +} + +func (o *ResourceConfig) GetAllowServerlessConcurrency() *bool { + if o == nil { + return nil + } + return o.AllowServerlessConcurrency +} + +func (o *ResourceConfig) GetElasticConcurrencyEnabled() *bool { + if o == nil { + return nil + } + return o.ElasticConcurrencyEnabled +} + +type UpdateProjectDataCacheDeploymentType string + +const ( + UpdateProjectDataCacheDeploymentTypePreview UpdateProjectDataCacheDeploymentType = "preview" + UpdateProjectDataCacheDeploymentTypeAll UpdateProjectDataCacheDeploymentType = "all" + UpdateProjectDataCacheDeploymentTypeProdDeploymentUrlsAndAllPreviews UpdateProjectDataCacheDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e UpdateProjectDataCacheDeploymentType) ToPointer() *UpdateProjectDataCacheDeploymentType { + return &e +} +func (e *UpdateProjectDataCacheDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = UpdateProjectDataCacheDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheDeploymentType: %v", v) + } +} + +type UpdateProjectDataCacheSsoProtection struct { + DeploymentType UpdateProjectDataCacheDeploymentType `json:"deploymentType"` +} + +func (o *UpdateProjectDataCacheSsoProtection) GetDeploymentType() UpdateProjectDataCacheDeploymentType { + if o == nil { + return UpdateProjectDataCacheDeploymentType("") + } + return o.DeploymentType +} + +type UpdateProjectDataCacheAliasAssignedType string + +const ( + UpdateProjectDataCacheAliasAssignedTypeNumber UpdateProjectDataCacheAliasAssignedType = "number" + UpdateProjectDataCacheAliasAssignedTypeBoolean UpdateProjectDataCacheAliasAssignedType = "boolean" +) + +type UpdateProjectDataCacheAliasAssigned struct { + Number *float64 + Boolean *bool + + Type UpdateProjectDataCacheAliasAssignedType +} + +func CreateUpdateProjectDataCacheAliasAssignedNumber(number float64) UpdateProjectDataCacheAliasAssigned { + typ := UpdateProjectDataCacheAliasAssignedTypeNumber + + return UpdateProjectDataCacheAliasAssigned{ + Number: &number, + Type: typ, + } +} + +func CreateUpdateProjectDataCacheAliasAssignedBoolean(boolean bool) UpdateProjectDataCacheAliasAssigned { + typ := UpdateProjectDataCacheAliasAssignedTypeBoolean + + return UpdateProjectDataCacheAliasAssigned{ + Boolean: &boolean, + Type: typ, + } +} + +func (u *UpdateProjectDataCacheAliasAssigned) UnmarshalJSON(data []byte) error { + + var number float64 = float64(0) + if err := utils.UnmarshalJSON(data, &number, "", true, true); err == nil { + u.Number = &number + u.Type = UpdateProjectDataCacheAliasAssignedTypeNumber + return nil + } + + var boolean bool = false + if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { + u.Boolean = &boolean + u.Type = UpdateProjectDataCacheAliasAssignedTypeBoolean + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectDataCacheAliasAssigned", string(data)) +} + +func (u UpdateProjectDataCacheAliasAssigned) MarshalJSON() ([]byte, error) { + if u.Number != nil { + return utils.MarshalJSON(u.Number, "", true) + } + + if u.Boolean != nil { + return utils.MarshalJSON(u.Boolean, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectDataCacheAliasAssigned: all fields are null") +} + +type UpdateProjectDataCacheAliasError struct { + Code string `json:"code"` + Message string `json:"message"` +} + +func (o *UpdateProjectDataCacheAliasError) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *UpdateProjectDataCacheAliasError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType string + +const ( + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsTypeEndsWith UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType = "endsWith" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsTypeStartsWith UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType = "startsWith" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsTypeEquals UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType = "equals" +) + +func (e UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType) ToPointer() *UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType { + return &e +} +func (e *UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "endsWith": + fallthrough + case "startsWith": + fallthrough + case "equals": + *e = UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType: %v", v) + } +} + +type UpdateProjectDataCacheBranchMatcher struct { + Type UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType `json:"type"` + Pattern string `json:"pattern"` +} + +func (o *UpdateProjectDataCacheBranchMatcher) GetType() UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType { + if o == nil { + return UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodyTargetsType("") + } + return o.Type +} + +func (o *UpdateProjectDataCacheBranchMatcher) GetPattern() string { + if o == nil { + return "" + } + return o.Pattern +} + +type UpdateProjectDataCacheBuilds struct { + Use string `json:"use"` + Src *string `json:"src,omitempty"` + Dest *string `json:"dest,omitempty"` +} + +func (o *UpdateProjectDataCacheBuilds) GetUse() string { + if o == nil { + return "" + } + return o.Use +} + +func (o *UpdateProjectDataCacheBuilds) GetSrc() *string { + if o == nil { + return nil + } + return o.Src +} + +func (o *UpdateProjectDataCacheBuilds) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +type UpdateProjectDataCacheChecksConclusion string + +const ( + UpdateProjectDataCacheChecksConclusionSucceeded UpdateProjectDataCacheChecksConclusion = "succeeded" + UpdateProjectDataCacheChecksConclusionFailed UpdateProjectDataCacheChecksConclusion = "failed" + UpdateProjectDataCacheChecksConclusionSkipped UpdateProjectDataCacheChecksConclusion = "skipped" + UpdateProjectDataCacheChecksConclusionCanceled UpdateProjectDataCacheChecksConclusion = "canceled" +) + +func (e UpdateProjectDataCacheChecksConclusion) ToPointer() *UpdateProjectDataCacheChecksConclusion { + return &e +} +func (e *UpdateProjectDataCacheChecksConclusion) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "canceled": + *e = UpdateProjectDataCacheChecksConclusion(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheChecksConclusion: %v", v) + } +} + +type UpdateProjectDataCacheChecksState string + +const ( + UpdateProjectDataCacheChecksStateRegistered UpdateProjectDataCacheChecksState = "registered" + UpdateProjectDataCacheChecksStateRunning UpdateProjectDataCacheChecksState = "running" + UpdateProjectDataCacheChecksStateCompleted UpdateProjectDataCacheChecksState = "completed" +) + +func (e UpdateProjectDataCacheChecksState) ToPointer() *UpdateProjectDataCacheChecksState { + return &e +} +func (e *UpdateProjectDataCacheChecksState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "registered": + fallthrough + case "running": + fallthrough + case "completed": + *e = UpdateProjectDataCacheChecksState(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheChecksState: %v", v) + } +} + +type UpdateProjectDataCacheCreator struct { + Email string `json:"email"` + GithubLogin *string `json:"githubLogin,omitempty"` + GitlabLogin *string `json:"gitlabLogin,omitempty"` + UID string `json:"uid"` + Username string `json:"username"` +} + +func (o *UpdateProjectDataCacheCreator) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *UpdateProjectDataCacheCreator) GetGithubLogin() *string { + if o == nil { + return nil + } + return o.GithubLogin +} + +func (o *UpdateProjectDataCacheCreator) GetGitlabLogin() *string { + if o == nil { + return nil + } + return o.GitlabLogin +} + +func (o *UpdateProjectDataCacheCreator) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *UpdateProjectDataCacheCreator) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + +type UpdateProjectDataCacheOidcTokenClaims struct { + Iss string `json:"iss"` + Sub string `json:"sub"` + Scope string `json:"scope"` + Aud string `json:"aud"` + Owner string `json:"owner"` + OwnerID string `json:"owner_id"` + Project string `json:"project"` + ProjectID string `json:"project_id"` + Environment string `json:"environment"` +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetIss() string { + if o == nil { + return "" + } + return o.Iss +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetSub() string { + if o == nil { + return "" + } + return o.Sub +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetScope() string { + if o == nil { + return "" + } + return o.Scope +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetAud() string { + if o == nil { + return "" + } + return o.Aud +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetOwner() string { + if o == nil { + return "" + } + return o.Owner +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetOwnerID() string { + if o == nil { + return "" + } + return o.OwnerID +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetProject() string { + if o == nil { + return "" + } + return o.Project +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateProjectDataCacheOidcTokenClaims) GetEnvironment() string { + if o == nil { + return "" + } + return o.Environment +} + +type UpdateProjectDataCachePlan string + +const ( + UpdateProjectDataCachePlanPro UpdateProjectDataCachePlan = "pro" + UpdateProjectDataCachePlanEnterprise UpdateProjectDataCachePlan = "enterprise" + UpdateProjectDataCachePlanHobby UpdateProjectDataCachePlan = "hobby" +) + +func (e UpdateProjectDataCachePlan) ToPointer() *UpdateProjectDataCachePlan { + return &e +} +func (e *UpdateProjectDataCachePlan) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "pro": + fallthrough + case "enterprise": + fallthrough + case "hobby": + *e = UpdateProjectDataCachePlan(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCachePlan: %v", v) + } +} + +type UpdateProjectDataCacheReadyState string + +const ( + UpdateProjectDataCacheReadyStateBuilding UpdateProjectDataCacheReadyState = "BUILDING" + UpdateProjectDataCacheReadyStateError UpdateProjectDataCacheReadyState = "ERROR" + UpdateProjectDataCacheReadyStateInitializing UpdateProjectDataCacheReadyState = "INITIALIZING" + UpdateProjectDataCacheReadyStateQueued UpdateProjectDataCacheReadyState = "QUEUED" + UpdateProjectDataCacheReadyStateReady UpdateProjectDataCacheReadyState = "READY" + UpdateProjectDataCacheReadyStateCanceled UpdateProjectDataCacheReadyState = "CANCELED" +) + +func (e UpdateProjectDataCacheReadyState) ToPointer() *UpdateProjectDataCacheReadyState { + return &e +} +func (e *UpdateProjectDataCacheReadyState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BUILDING": + fallthrough + case "ERROR": + fallthrough + case "INITIALIZING": + fallthrough + case "QUEUED": + fallthrough + case "READY": + fallthrough + case "CANCELED": + *e = UpdateProjectDataCacheReadyState(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheReadyState: %v", v) + } +} + +type UpdateProjectDataCacheReadySubstate string + +const ( + UpdateProjectDataCacheReadySubstateStaged UpdateProjectDataCacheReadySubstate = "STAGED" + UpdateProjectDataCacheReadySubstatePromoted UpdateProjectDataCacheReadySubstate = "PROMOTED" +) + +func (e UpdateProjectDataCacheReadySubstate) ToPointer() *UpdateProjectDataCacheReadySubstate { + return &e +} +func (e *UpdateProjectDataCacheReadySubstate) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "STAGED": + fallthrough + case "PROMOTED": + *e = UpdateProjectDataCacheReadySubstate(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheReadySubstate: %v", v) + } +} + +type UpdateProjectDataCacheProjectsType string + +const ( + UpdateProjectDataCacheProjectsTypeLambdas UpdateProjectDataCacheProjectsType = "LAMBDAS" +) + +func (e UpdateProjectDataCacheProjectsType) ToPointer() *UpdateProjectDataCacheProjectsType { + return &e +} +func (e *UpdateProjectDataCacheProjectsType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAMBDAS": + *e = UpdateProjectDataCacheProjectsType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsType: %v", v) + } +} + +type Targets struct { + ID string `json:"id"` + Alias []string `json:"alias,omitempty"` + AliasAssigned *UpdateProjectDataCacheAliasAssigned `json:"aliasAssigned,omitempty"` + AliasError *UpdateProjectDataCacheAliasError `json:"aliasError,omitempty"` + AliasFinal *string `json:"aliasFinal,omitempty"` + AutomaticAliases []string `json:"automaticAliases,omitempty"` + BranchMatcher *UpdateProjectDataCacheBranchMatcher `json:"branchMatcher,omitempty"` + BuildingAt *float64 `json:"buildingAt,omitempty"` + Builds []UpdateProjectDataCacheBuilds `json:"builds,omitempty"` + ChecksConclusion *UpdateProjectDataCacheChecksConclusion `json:"checksConclusion,omitempty"` + ChecksState *UpdateProjectDataCacheChecksState `json:"checksState,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + CreatedAt float64 `json:"createdAt"` + CreatedIn string `json:"createdIn"` + Creator *UpdateProjectDataCacheCreator `json:"creator"` + DeletedAt *float64 `json:"deletedAt,omitempty"` + DeploymentHostname string `json:"deploymentHostname"` + Forced *bool `json:"forced,omitempty"` + Name string `json:"name"` + Meta map[string]string `json:"meta,omitempty"` + MonorepoManager *string `json:"monorepoManager,omitempty"` + OidcTokenClaims *UpdateProjectDataCacheOidcTokenClaims `json:"oidcTokenClaims,omitempty"` + Plan UpdateProjectDataCachePlan `json:"plan"` + // Whether or not preview comments are enabled for the deployment + PreviewCommentsEnabled *bool `json:"previewCommentsEnabled,omitempty"` + Private bool `json:"private"` + ReadyAt *float64 `json:"readyAt,omitempty"` + ReadyState UpdateProjectDataCacheReadyState `json:"readyState"` + ReadySubstate *UpdateProjectDataCacheReadySubstate `json:"readySubstate,omitempty"` + RequestedAt *float64 `json:"requestedAt,omitempty"` + Target *string `json:"target,omitempty"` + TeamID *string `json:"teamId,omitempty"` + Type UpdateProjectDataCacheProjectsType `json:"type"` + URL string `json:"url"` + UserID string `json:"userId"` + WithCache *bool `json:"withCache,omitempty"` +} + +func (o *Targets) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Targets) GetAlias() []string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *Targets) GetAliasAssigned() *UpdateProjectDataCacheAliasAssigned { + if o == nil { + return nil + } + return o.AliasAssigned +} + +func (o *Targets) GetAliasError() *UpdateProjectDataCacheAliasError { + if o == nil { + return nil + } + return o.AliasError +} + +func (o *Targets) GetAliasFinal() *string { + if o == nil { + return nil + } + return o.AliasFinal +} + +func (o *Targets) GetAutomaticAliases() []string { + if o == nil { + return nil + } + return o.AutomaticAliases +} + +func (o *Targets) GetBranchMatcher() *UpdateProjectDataCacheBranchMatcher { + if o == nil { + return nil + } + return o.BranchMatcher +} + +func (o *Targets) GetBuildingAt() *float64 { + if o == nil { + return nil + } + return o.BuildingAt +} + +func (o *Targets) GetBuilds() []UpdateProjectDataCacheBuilds { + if o == nil { + return nil + } + return o.Builds +} + +func (o *Targets) GetChecksConclusion() *UpdateProjectDataCacheChecksConclusion { + if o == nil { + return nil + } + return o.ChecksConclusion +} + +func (o *Targets) GetChecksState() *UpdateProjectDataCacheChecksState { + if o == nil { + return nil + } + return o.ChecksState +} + +func (o *Targets) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *Targets) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *Targets) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *Targets) GetCreatedIn() string { + if o == nil { + return "" + } + return o.CreatedIn +} + +func (o *Targets) GetCreator() *UpdateProjectDataCacheCreator { + if o == nil { + return nil + } + return o.Creator +} + +func (o *Targets) GetDeletedAt() *float64 { + if o == nil { + return nil + } + return o.DeletedAt +} + +func (o *Targets) GetDeploymentHostname() string { + if o == nil { + return "" + } + return o.DeploymentHostname +} + +func (o *Targets) GetForced() *bool { + if o == nil { + return nil + } + return o.Forced +} + +func (o *Targets) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Targets) GetMeta() map[string]string { + if o == nil { + return nil + } + return o.Meta +} + +func (o *Targets) GetMonorepoManager() *string { + if o == nil { + return nil + } + return o.MonorepoManager +} + +func (o *Targets) GetOidcTokenClaims() *UpdateProjectDataCacheOidcTokenClaims { + if o == nil { + return nil + } + return o.OidcTokenClaims +} + +func (o *Targets) GetPlan() UpdateProjectDataCachePlan { + if o == nil { + return UpdateProjectDataCachePlan("") + } + return o.Plan +} + +func (o *Targets) GetPreviewCommentsEnabled() *bool { + if o == nil { + return nil + } + return o.PreviewCommentsEnabled +} + +func (o *Targets) GetPrivate() bool { + if o == nil { + return false + } + return o.Private +} + +func (o *Targets) GetReadyAt() *float64 { + if o == nil { + return nil + } + return o.ReadyAt +} + +func (o *Targets) GetReadyState() UpdateProjectDataCacheReadyState { + if o == nil { + return UpdateProjectDataCacheReadyState("") + } + return o.ReadyState +} + +func (o *Targets) GetReadySubstate() *UpdateProjectDataCacheReadySubstate { + if o == nil { + return nil + } + return o.ReadySubstate +} + +func (o *Targets) GetRequestedAt() *float64 { + if o == nil { + return nil + } + return o.RequestedAt +} + +func (o *Targets) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *Targets) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *Targets) GetType() UpdateProjectDataCacheProjectsType { + if o == nil { + return UpdateProjectDataCacheProjectsType("") + } + return o.Type +} + +func (o *Targets) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *Targets) GetUserID() string { + if o == nil { + return "" + } + return o.UserID +} + +func (o *Targets) GetWithCache() *bool { + if o == nil { + return nil + } + return o.WithCache +} + +type Permissions struct { + AccessGroup []components.ACLAction `json:"accessGroup,omitempty"` + AliasGlobal []components.ACLAction `json:"aliasGlobal,omitempty"` + AnalyticsSampling []components.ACLAction `json:"analyticsSampling,omitempty"` + AnalyticsUsage []components.ACLAction `json:"analyticsUsage,omitempty"` + AuditLog []components.ACLAction `json:"auditLog,omitempty"` + BillingAddress []components.ACLAction `json:"billingAddress,omitempty"` + BillingInformation []components.ACLAction `json:"billingInformation,omitempty"` + BillingInvoice []components.ACLAction `json:"billingInvoice,omitempty"` + BillingInvoiceEmailRecipient []components.ACLAction `json:"billingInvoiceEmailRecipient,omitempty"` + BillingInvoiceLanguage []components.ACLAction `json:"billingInvoiceLanguage,omitempty"` + BillingPlan []components.ACLAction `json:"billingPlan,omitempty"` + BillingPurchaseOrder []components.ACLAction `json:"billingPurchaseOrder,omitempty"` + BillingTaxID []components.ACLAction `json:"billingTaxId,omitempty"` + Blob []components.ACLAction `json:"blob,omitempty"` + Budget []components.ACLAction `json:"budget,omitempty"` + CacheArtifact []components.ACLAction `json:"cacheArtifact,omitempty"` + CacheArtifactUsageEvent []components.ACLAction `json:"cacheArtifactUsageEvent,omitempty"` + CodeChecks []components.ACLAction `json:"codeChecks,omitempty"` + ConcurrentBuilds []components.ACLAction `json:"concurrentBuilds,omitempty"` + Connect []components.ACLAction `json:"connect,omitempty"` + ConnectConfiguration []components.ACLAction `json:"connectConfiguration,omitempty"` + Domain []components.ACLAction `json:"domain,omitempty"` + DomainAcceptDelegation []components.ACLAction `json:"domainAcceptDelegation,omitempty"` + DomainAuthCodes []components.ACLAction `json:"domainAuthCodes,omitempty"` + DomainCertificate []components.ACLAction `json:"domainCertificate,omitempty"` + DomainCheckConfig []components.ACLAction `json:"domainCheckConfig,omitempty"` + DomainMove []components.ACLAction `json:"domainMove,omitempty"` + DomainPurchase []components.ACLAction `json:"domainPurchase,omitempty"` + DomainRecord []components.ACLAction `json:"domainRecord,omitempty"` + DomainTransferIn []components.ACLAction `json:"domainTransferIn,omitempty"` + Event []components.ACLAction `json:"event,omitempty"` + OwnEvent []components.ACLAction `json:"ownEvent,omitempty"` + SensitiveEnvironmentVariablePolicy []components.ACLAction `json:"sensitiveEnvironmentVariablePolicy,omitempty"` + FileUpload []components.ACLAction `json:"fileUpload,omitempty"` + GitRepository []components.ACLAction `json:"gitRepository,omitempty"` + IPBlocking []components.ACLAction `json:"ipBlocking,omitempty"` + Integration []components.ACLAction `json:"integration,omitempty"` + IntegrationAccount []components.ACLAction `json:"integrationAccount,omitempty"` + IntegrationConfiguration []components.ACLAction `json:"integrationConfiguration,omitempty"` + IntegrationConfigurationTransfer []components.ACLAction `json:"integrationConfigurationTransfer,omitempty"` + IntegrationConfigurationProjects []components.ACLAction `json:"integrationConfigurationProjects,omitempty"` + IntegrationVercelConfigurationOverride []components.ACLAction `json:"integrationVercelConfigurationOverride,omitempty"` + IntegrationConfigurationRole []components.ACLAction `json:"integrationConfigurationRole,omitempty"` + IntegrationResource []components.ACLAction `json:"integrationResource,omitempty"` + IntegrationEvent []components.ACLAction `json:"integrationEvent,omitempty"` + IntegrationResourceSecrets []components.ACLAction `json:"integrationResourceSecrets,omitempty"` + IntegrationDeploymentAction []components.ACLAction `json:"integrationDeploymentAction,omitempty"` + MarketplaceInstallationMember []components.ACLAction `json:"marketplaceInstallationMember,omitempty"` + MarketplaceBillingData []components.ACLAction `json:"marketplaceBillingData,omitempty"` + MarketplaceInvoice []components.ACLAction `json:"marketplaceInvoice,omitempty"` + JobGlobal []components.ACLAction `json:"jobGlobal,omitempty"` + LogDrain []components.ACLAction `json:"logDrain,omitempty"` + Monitoring []components.ACLAction `json:"Monitoring,omitempty"` + MonitoringSettings []components.ACLAction `json:"monitoringSettings,omitempty"` + MonitoringQuery []components.ACLAction `json:"monitoringQuery,omitempty"` + MonitoringChart []components.ACLAction `json:"monitoringChart,omitempty"` + MonitoringAlert []components.ACLAction `json:"monitoringAlert,omitempty"` + NotificationDeploymentFailed []components.ACLAction `json:"notificationDeploymentFailed,omitempty"` + NotificationDomainConfiguration []components.ACLAction `json:"notificationDomainConfiguration,omitempty"` + NotificationDomainExpire []components.ACLAction `json:"notificationDomainExpire,omitempty"` + NotificationDomainMoved []components.ACLAction `json:"notificationDomainMoved,omitempty"` + NotificationDomainPurchase []components.ACLAction `json:"notificationDomainPurchase,omitempty"` + NotificationDomainRenewal []components.ACLAction `json:"notificationDomainRenewal,omitempty"` + NotificationDomainTransfer []components.ACLAction `json:"notificationDomainTransfer,omitempty"` + NotificationDomainUnverified []components.ACLAction `json:"notificationDomainUnverified,omitempty"` + NotificationMonitoringAlert []components.ACLAction `json:"NotificationMonitoringAlert,omitempty"` + NotificationPaymentFailed []components.ACLAction `json:"notificationPaymentFailed,omitempty"` + NotificationUsageAlert []components.ACLAction `json:"notificationUsageAlert,omitempty"` + NotificationCustomerBudget []components.ACLAction `json:"notificationCustomerBudget,omitempty"` + NotificationStatementOfReasons []components.ACLAction `json:"notificationStatementOfReasons,omitempty"` + Oauth2Connection []components.ACLAction `json:"oauth2Connection,omitempty"` + ObservabilityConfiguration []components.ACLAction `json:"observabilityConfiguration,omitempty"` + OpenTelemetryEndpoint []components.ACLAction `json:"openTelemetryEndpoint,omitempty"` + PaymentMethod []components.ACLAction `json:"paymentMethod,omitempty"` + Permissions []components.ACLAction `json:"permissions,omitempty"` + Postgres []components.ACLAction `json:"postgres,omitempty"` + PreviewDeploymentSuffix []components.ACLAction `json:"previewDeploymentSuffix,omitempty"` + ProTrialOnboarding []components.ACLAction `json:"proTrialOnboarding,omitempty"` + SharedEnvVars []components.ACLAction `json:"sharedEnvVars,omitempty"` + SharedEnvVarsProduction []components.ACLAction `json:"sharedEnvVarsProduction,omitempty"` + Space []components.ACLAction `json:"space,omitempty"` + SpaceRun []components.ACLAction `json:"spaceRun,omitempty"` + PasswordProtectionInvoiceItem []components.ACLAction `json:"passwordProtectionInvoiceItem,omitempty"` + RateLimit []components.ACLAction `json:"rateLimit,omitempty"` + Redis []components.ACLAction `json:"redis,omitempty"` + Repository []components.ACLAction `json:"repository,omitempty"` + RemoteCaching []components.ACLAction `json:"remoteCaching,omitempty"` + SamlConfig []components.ACLAction `json:"samlConfig,omitempty"` + Secret []components.ACLAction `json:"secret,omitempty"` + RedisStoreTokenSet []components.ACLAction `json:"redisStoreTokenSet,omitempty"` + BlobStoreTokenSet []components.ACLAction `json:"blobStoreTokenSet,omitempty"` + PostgresStoreTokenSet []components.ACLAction `json:"postgresStoreTokenSet,omitempty"` + IntegrationStoreTokenSet []components.ACLAction `json:"integrationStoreTokenSet,omitempty"` + IntegrationResourceReplCommand []components.ACLAction `json:"integrationResourceReplCommand,omitempty"` + StoreTransfer []components.ACLAction `json:"storeTransfer,omitempty"` + SupportCase []components.ACLAction `json:"supportCase,omitempty"` + SupportCaseComment []components.ACLAction `json:"supportCaseComment,omitempty"` + DataCacheBillingSettings []components.ACLAction `json:"dataCacheBillingSettings,omitempty"` + Team []components.ACLAction `json:"team,omitempty"` + TeamAccessRequest []components.ACLAction `json:"teamAccessRequest,omitempty"` + TeamFellowMembership []components.ACLAction `json:"teamFellowMembership,omitempty"` + TeamGitExclusivity []components.ACLAction `json:"teamGitExclusivity,omitempty"` + TeamInvite []components.ACLAction `json:"teamInvite,omitempty"` + TeamInviteCode []components.ACLAction `json:"teamInviteCode,omitempty"` + TeamJoin []components.ACLAction `json:"teamJoin,omitempty"` + TeamMicrofrontends []components.ACLAction `json:"teamMicrofrontends,omitempty"` + TeamOwnMembership []components.ACLAction `json:"teamOwnMembership,omitempty"` + TeamOwnMembershipDisconnectSAML []components.ACLAction `json:"teamOwnMembershipDisconnectSAML,omitempty"` + Token []components.ACLAction `json:"token,omitempty"` + Usage []components.ACLAction `json:"usage,omitempty"` + UsageCycle []components.ACLAction `json:"usageCycle,omitempty"` + User []components.ACLAction `json:"user,omitempty"` + UserConnection []components.ACLAction `json:"userConnection,omitempty"` + VpcPeeringConnection []components.ACLAction `json:"vpcPeeringConnection,omitempty"` + WebAnalyticsPlan []components.ACLAction `json:"webAnalyticsPlan,omitempty"` + WebAuthn []components.ACLAction `json:"webAuthn,omitempty"` + EdgeConfig []components.ACLAction `json:"edgeConfig,omitempty"` + EdgeConfigItem []components.ACLAction `json:"edgeConfigItem,omitempty"` + EdgeConfigSchema []components.ACLAction `json:"edgeConfigSchema,omitempty"` + EdgeConfigToken []components.ACLAction `json:"edgeConfigToken,omitempty"` + Webhook []components.ACLAction `json:"webhook,omitempty"` + WebhookEvent []components.ACLAction `json:"webhook-event,omitempty"` + EndpointVerification []components.ACLAction `json:"endpointVerification,omitempty"` + ProjectTransferIn []components.ACLAction `json:"projectTransferIn,omitempty"` + Oauth2Application []components.ACLAction `json:"oauth2Application,omitempty"` + AliasProject []components.ACLAction `json:"aliasProject,omitempty"` + AliasProtectionBypass []components.ACLAction `json:"aliasProtectionBypass,omitempty"` + ProductionAliasProtectionBypass []components.ACLAction `json:"productionAliasProtectionBypass,omitempty"` + ConnectConfigurationLink []components.ACLAction `json:"connectConfigurationLink,omitempty"` + DataCacheNamespace []components.ACLAction `json:"dataCacheNamespace,omitempty"` + Deployment []components.ACLAction `json:"deployment,omitempty"` + DeploymentCheck []components.ACLAction `json:"deploymentCheck,omitempty"` + DeploymentCheckPreview []components.ACLAction `json:"deploymentCheckPreview,omitempty"` + DeploymentCheckReRunFromProductionBranch []components.ACLAction `json:"deploymentCheckReRunFromProductionBranch,omitempty"` + DeploymentProductionGit []components.ACLAction `json:"deploymentProductionGit,omitempty"` + DeploymentV0 []components.ACLAction `json:"deploymentV0,omitempty"` + DeploymentPreview []components.ACLAction `json:"deploymentPreview,omitempty"` + DeploymentPrivate []components.ACLAction `json:"deploymentPrivate,omitempty"` + DeploymentPromote []components.ACLAction `json:"deploymentPromote,omitempty"` + DeploymentRollback []components.ACLAction `json:"deploymentRollback,omitempty"` + Environments []components.ACLAction `json:"environments,omitempty"` + Logs []components.ACLAction `json:"logs,omitempty"` + LogsPreset []components.ACLAction `json:"logsPreset,omitempty"` + PasswordProtection []components.ACLAction `json:"passwordProtection,omitempty"` + OptionsAllowlist []components.ACLAction `json:"optionsAllowlist,omitempty"` + Job []components.ACLAction `json:"job,omitempty"` + ObservabilityData []components.ACLAction `json:"observabilityData,omitempty"` + Project []components.ACLAction `json:"project,omitempty"` + ProjectFromV0 []components.ACLAction `json:"projectFromV0,omitempty"` + ProjectAccessGroup []components.ACLAction `json:"projectAccessGroup,omitempty"` + ProjectAnalyticsSampling []components.ACLAction `json:"projectAnalyticsSampling,omitempty"` + ProjectDeploymentHook []components.ACLAction `json:"projectDeploymentHook,omitempty"` + ProjectDomain []components.ACLAction `json:"projectDomain,omitempty"` + ProjectDomainMove []components.ACLAction `json:"projectDomainMove,omitempty"` + ProjectDomainCheckConfig []components.ACLAction `json:"projectDomainCheckConfig,omitempty"` + ProjectEnvVars []components.ACLAction `json:"projectEnvVars,omitempty"` + ProjectEnvVarsProduction []components.ACLAction `json:"projectEnvVarsProduction,omitempty"` + ProjectEnvVarsUnownedByIntegration []components.ACLAction `json:"projectEnvVarsUnownedByIntegration,omitempty"` + ProjectFlags []components.ACLAction `json:"projectFlags,omitempty"` + ProjectID []components.ACLAction `json:"projectId,omitempty"` + ProjectIntegrationConfiguration []components.ACLAction `json:"projectIntegrationConfiguration,omitempty"` + ProjectLink []components.ACLAction `json:"projectLink,omitempty"` + ProjectMember []components.ACLAction `json:"projectMember,omitempty"` + ProjectMonitoring []components.ACLAction `json:"projectMonitoring,omitempty"` + ProjectPermissions []components.ACLAction `json:"projectPermissions,omitempty"` + ProjectProductionBranch []components.ACLAction `json:"projectProductionBranch,omitempty"` + ProjectTransfer []components.ACLAction `json:"projectTransfer,omitempty"` + ProjectTransferOut []components.ACLAction `json:"projectTransferOut,omitempty"` + ProjectProtectionBypass []components.ACLAction `json:"projectProtectionBypass,omitempty"` + ProjectUsage []components.ACLAction `json:"projectUsage,omitempty"` + ProjectAnalyticsUsage []components.ACLAction `json:"projectAnalyticsUsage,omitempty"` + ProjectSupportCase []components.ACLAction `json:"projectSupportCase,omitempty"` + ProjectSupportCaseComment []components.ACLAction `json:"projectSupportCaseComment,omitempty"` + ProjectDeploymentExpiration []components.ACLAction `json:"projectDeploymentExpiration,omitempty"` + ProjectTier []components.ACLAction `json:"projectTier,omitempty"` + SeawallConfig []components.ACLAction `json:"seawallConfig,omitempty"` + SkewProtection []components.ACLAction `json:"skewProtection,omitempty"` + Analytics []components.ACLAction `json:"analytics,omitempty"` + TrustedIps []components.ACLAction `json:"trustedIps,omitempty"` + WebAnalytics []components.ACLAction `json:"webAnalytics,omitempty"` + SharedEnvVarConnection []components.ACLAction `json:"sharedEnvVarConnection,omitempty"` + Sonar []components.ACLAction `json:"sonar,omitempty"` +} + +func (o *Permissions) GetAccessGroup() []components.ACLAction { + if o == nil { + return nil + } + return o.AccessGroup +} + +func (o *Permissions) GetAliasGlobal() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasGlobal +} + +func (o *Permissions) GetAnalyticsSampling() []components.ACLAction { + if o == nil { + return nil + } + return o.AnalyticsSampling +} + +func (o *Permissions) GetAnalyticsUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.AnalyticsUsage +} + +func (o *Permissions) GetAuditLog() []components.ACLAction { + if o == nil { + return nil + } + return o.AuditLog +} + +func (o *Permissions) GetBillingAddress() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingAddress +} + +func (o *Permissions) GetBillingInformation() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInformation +} + +func (o *Permissions) GetBillingInvoice() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoice +} + +func (o *Permissions) GetBillingInvoiceEmailRecipient() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoiceEmailRecipient +} + +func (o *Permissions) GetBillingInvoiceLanguage() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingInvoiceLanguage +} + +func (o *Permissions) GetBillingPlan() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingPlan +} + +func (o *Permissions) GetBillingPurchaseOrder() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingPurchaseOrder +} + +func (o *Permissions) GetBillingTaxID() []components.ACLAction { + if o == nil { + return nil + } + return o.BillingTaxID +} + +func (o *Permissions) GetBlob() []components.ACLAction { + if o == nil { + return nil + } + return o.Blob +} + +func (o *Permissions) GetBudget() []components.ACLAction { + if o == nil { + return nil + } + return o.Budget +} + +func (o *Permissions) GetCacheArtifact() []components.ACLAction { + if o == nil { + return nil + } + return o.CacheArtifact +} + +func (o *Permissions) GetCacheArtifactUsageEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.CacheArtifactUsageEvent +} + +func (o *Permissions) GetCodeChecks() []components.ACLAction { + if o == nil { + return nil + } + return o.CodeChecks +} + +func (o *Permissions) GetConcurrentBuilds() []components.ACLAction { + if o == nil { + return nil + } + return o.ConcurrentBuilds +} + +func (o *Permissions) GetConnect() []components.ACLAction { + if o == nil { + return nil + } + return o.Connect +} + +func (o *Permissions) GetConnectConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ConnectConfiguration +} + +func (o *Permissions) GetDomain() []components.ACLAction { + if o == nil { + return nil + } + return o.Domain +} + +func (o *Permissions) GetDomainAcceptDelegation() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainAcceptDelegation +} + +func (o *Permissions) GetDomainAuthCodes() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainAuthCodes +} + +func (o *Permissions) GetDomainCertificate() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainCertificate +} + +func (o *Permissions) GetDomainCheckConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainCheckConfig +} + +func (o *Permissions) GetDomainMove() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainMove +} + +func (o *Permissions) GetDomainPurchase() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainPurchase +} + +func (o *Permissions) GetDomainRecord() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainRecord +} + +func (o *Permissions) GetDomainTransferIn() []components.ACLAction { + if o == nil { + return nil + } + return o.DomainTransferIn +} + +func (o *Permissions) GetEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.Event +} + +func (o *Permissions) GetOwnEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.OwnEvent +} + +func (o *Permissions) GetSensitiveEnvironmentVariablePolicy() []components.ACLAction { + if o == nil { + return nil + } + return o.SensitiveEnvironmentVariablePolicy +} + +func (o *Permissions) GetFileUpload() []components.ACLAction { + if o == nil { + return nil + } + return o.FileUpload +} + +func (o *Permissions) GetGitRepository() []components.ACLAction { + if o == nil { + return nil + } + return o.GitRepository +} + +func (o *Permissions) GetIPBlocking() []components.ACLAction { + if o == nil { + return nil + } + return o.IPBlocking +} + +func (o *Permissions) GetIntegration() []components.ACLAction { + if o == nil { + return nil + } + return o.Integration +} + +func (o *Permissions) GetIntegrationAccount() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationAccount +} + +func (o *Permissions) GetIntegrationConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfiguration +} + +func (o *Permissions) GetIntegrationConfigurationTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationTransfer +} + +func (o *Permissions) GetIntegrationConfigurationProjects() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationProjects +} + +func (o *Permissions) GetIntegrationVercelConfigurationOverride() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationVercelConfigurationOverride +} + +func (o *Permissions) GetIntegrationConfigurationRole() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationConfigurationRole +} + +func (o *Permissions) GetIntegrationResource() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResource +} + +func (o *Permissions) GetIntegrationEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationEvent +} + +func (o *Permissions) GetIntegrationResourceSecrets() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResourceSecrets +} + +func (o *Permissions) GetIntegrationDeploymentAction() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationDeploymentAction +} + +func (o *Permissions) GetMarketplaceInstallationMember() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceInstallationMember +} + +func (o *Permissions) GetMarketplaceBillingData() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceBillingData +} + +func (o *Permissions) GetMarketplaceInvoice() []components.ACLAction { + if o == nil { + return nil + } + return o.MarketplaceInvoice +} + +func (o *Permissions) GetJobGlobal() []components.ACLAction { + if o == nil { + return nil + } + return o.JobGlobal +} + +func (o *Permissions) GetLogDrain() []components.ACLAction { + if o == nil { + return nil + } + return o.LogDrain +} + +func (o *Permissions) GetMonitoring() []components.ACLAction { + if o == nil { + return nil + } + return o.Monitoring +} + +func (o *Permissions) GetMonitoringSettings() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringSettings +} + +func (o *Permissions) GetMonitoringQuery() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringQuery +} + +func (o *Permissions) GetMonitoringChart() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringChart +} + +func (o *Permissions) GetMonitoringAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.MonitoringAlert +} + +func (o *Permissions) GetNotificationDeploymentFailed() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDeploymentFailed +} + +func (o *Permissions) GetNotificationDomainConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainConfiguration +} + +func (o *Permissions) GetNotificationDomainExpire() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainExpire +} + +func (o *Permissions) GetNotificationDomainMoved() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainMoved +} + +func (o *Permissions) GetNotificationDomainPurchase() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainPurchase +} + +func (o *Permissions) GetNotificationDomainRenewal() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainRenewal +} + +func (o *Permissions) GetNotificationDomainTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainTransfer +} + +func (o *Permissions) GetNotificationDomainUnverified() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationDomainUnverified +} + +func (o *Permissions) GetNotificationMonitoringAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationMonitoringAlert +} + +func (o *Permissions) GetNotificationPaymentFailed() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationPaymentFailed +} + +func (o *Permissions) GetNotificationUsageAlert() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationUsageAlert +} + +func (o *Permissions) GetNotificationCustomerBudget() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationCustomerBudget +} + +func (o *Permissions) GetNotificationStatementOfReasons() []components.ACLAction { + if o == nil { + return nil + } + return o.NotificationStatementOfReasons +} + +func (o *Permissions) GetOauth2Connection() []components.ACLAction { + if o == nil { + return nil + } + return o.Oauth2Connection +} + +func (o *Permissions) GetObservabilityConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ObservabilityConfiguration +} + +func (o *Permissions) GetOpenTelemetryEndpoint() []components.ACLAction { + if o == nil { + return nil + } + return o.OpenTelemetryEndpoint +} + +func (o *Permissions) GetPaymentMethod() []components.ACLAction { + if o == nil { + return nil + } + return o.PaymentMethod +} + +func (o *Permissions) GetPermissions() []components.ACLAction { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *Permissions) GetPostgres() []components.ACLAction { + if o == nil { + return nil + } + return o.Postgres +} + +func (o *Permissions) GetPreviewDeploymentSuffix() []components.ACLAction { + if o == nil { + return nil + } + return o.PreviewDeploymentSuffix +} + +func (o *Permissions) GetProTrialOnboarding() []components.ACLAction { + if o == nil { + return nil + } + return o.ProTrialOnboarding +} + +func (o *Permissions) GetSharedEnvVars() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVars +} + +func (o *Permissions) GetSharedEnvVarsProduction() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVarsProduction +} + +func (o *Permissions) GetSpace() []components.ACLAction { + if o == nil { + return nil + } + return o.Space +} + +func (o *Permissions) GetSpaceRun() []components.ACLAction { + if o == nil { + return nil + } + return o.SpaceRun +} + +func (o *Permissions) GetPasswordProtectionInvoiceItem() []components.ACLAction { + if o == nil { + return nil + } + return o.PasswordProtectionInvoiceItem +} + +func (o *Permissions) GetRateLimit() []components.ACLAction { + if o == nil { + return nil + } + return o.RateLimit +} + +func (o *Permissions) GetRedis() []components.ACLAction { + if o == nil { + return nil + } + return o.Redis +} + +func (o *Permissions) GetRepository() []components.ACLAction { + if o == nil { + return nil + } + return o.Repository +} + +func (o *Permissions) GetRemoteCaching() []components.ACLAction { + if o == nil { + return nil + } + return o.RemoteCaching +} + +func (o *Permissions) GetSamlConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.SamlConfig +} + +func (o *Permissions) GetSecret() []components.ACLAction { + if o == nil { + return nil + } + return o.Secret +} + +func (o *Permissions) GetRedisStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.RedisStoreTokenSet +} + +func (o *Permissions) GetBlobStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.BlobStoreTokenSet +} + +func (o *Permissions) GetPostgresStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.PostgresStoreTokenSet +} + +func (o *Permissions) GetIntegrationStoreTokenSet() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationStoreTokenSet +} + +func (o *Permissions) GetIntegrationResourceReplCommand() []components.ACLAction { + if o == nil { + return nil + } + return o.IntegrationResourceReplCommand +} + +func (o *Permissions) GetStoreTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.StoreTransfer +} + +func (o *Permissions) GetSupportCase() []components.ACLAction { + if o == nil { + return nil + } + return o.SupportCase +} + +func (o *Permissions) GetSupportCaseComment() []components.ACLAction { + if o == nil { + return nil + } + return o.SupportCaseComment +} + +func (o *Permissions) GetDataCacheBillingSettings() []components.ACLAction { + if o == nil { + return nil + } + return o.DataCacheBillingSettings +} + +func (o *Permissions) GetTeam() []components.ACLAction { + if o == nil { + return nil + } + return o.Team +} + +func (o *Permissions) GetTeamAccessRequest() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamAccessRequest +} + +func (o *Permissions) GetTeamFellowMembership() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamFellowMembership +} + +func (o *Permissions) GetTeamGitExclusivity() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamGitExclusivity +} + +func (o *Permissions) GetTeamInvite() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamInvite +} + +func (o *Permissions) GetTeamInviteCode() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamInviteCode +} + +func (o *Permissions) GetTeamJoin() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamJoin +} + +func (o *Permissions) GetTeamMicrofrontends() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamMicrofrontends +} + +func (o *Permissions) GetTeamOwnMembership() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamOwnMembership +} + +func (o *Permissions) GetTeamOwnMembershipDisconnectSAML() []components.ACLAction { + if o == nil { + return nil + } + return o.TeamOwnMembershipDisconnectSAML +} + +func (o *Permissions) GetToken() []components.ACLAction { + if o == nil { + return nil + } + return o.Token +} + +func (o *Permissions) GetUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.Usage +} + +func (o *Permissions) GetUsageCycle() []components.ACLAction { + if o == nil { + return nil + } + return o.UsageCycle +} + +func (o *Permissions) GetUser() []components.ACLAction { + if o == nil { + return nil + } + return o.User +} + +func (o *Permissions) GetUserConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.UserConnection +} + +func (o *Permissions) GetVpcPeeringConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.VpcPeeringConnection +} + +func (o *Permissions) GetWebAnalyticsPlan() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAnalyticsPlan +} + +func (o *Permissions) GetWebAuthn() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAuthn +} + +func (o *Permissions) GetEdgeConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfig +} + +func (o *Permissions) GetEdgeConfigItem() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigItem +} + +func (o *Permissions) GetEdgeConfigSchema() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigSchema +} + +func (o *Permissions) GetEdgeConfigToken() []components.ACLAction { + if o == nil { + return nil + } + return o.EdgeConfigToken +} + +func (o *Permissions) GetWebhook() []components.ACLAction { + if o == nil { + return nil + } + return o.Webhook +} + +func (o *Permissions) GetWebhookEvent() []components.ACLAction { + if o == nil { + return nil + } + return o.WebhookEvent +} + +func (o *Permissions) GetEndpointVerification() []components.ACLAction { + if o == nil { + return nil + } + return o.EndpointVerification +} + +func (o *Permissions) GetProjectTransferIn() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransferIn +} + +func (o *Permissions) GetOauth2Application() []components.ACLAction { + if o == nil { + return nil + } + return o.Oauth2Application +} + +func (o *Permissions) GetAliasProject() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasProject +} + +func (o *Permissions) GetAliasProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.AliasProtectionBypass +} + +func (o *Permissions) GetProductionAliasProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.ProductionAliasProtectionBypass +} + +func (o *Permissions) GetConnectConfigurationLink() []components.ACLAction { + if o == nil { + return nil + } + return o.ConnectConfigurationLink +} + +func (o *Permissions) GetDataCacheNamespace() []components.ACLAction { + if o == nil { + return nil + } + return o.DataCacheNamespace +} + +func (o *Permissions) GetDeployment() []components.ACLAction { + if o == nil { + return nil + } + return o.Deployment +} + +func (o *Permissions) GetDeploymentCheck() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheck +} + +func (o *Permissions) GetDeploymentCheckPreview() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheckPreview +} + +func (o *Permissions) GetDeploymentCheckReRunFromProductionBranch() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentCheckReRunFromProductionBranch +} + +func (o *Permissions) GetDeploymentProductionGit() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentProductionGit +} + +func (o *Permissions) GetDeploymentV0() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentV0 +} + +func (o *Permissions) GetDeploymentPreview() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPreview +} + +func (o *Permissions) GetDeploymentPrivate() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPrivate +} + +func (o *Permissions) GetDeploymentPromote() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentPromote +} + +func (o *Permissions) GetDeploymentRollback() []components.ACLAction { + if o == nil { + return nil + } + return o.DeploymentRollback +} + +func (o *Permissions) GetEnvironments() []components.ACLAction { + if o == nil { + return nil + } + return o.Environments +} + +func (o *Permissions) GetLogs() []components.ACLAction { + if o == nil { + return nil + } + return o.Logs +} + +func (o *Permissions) GetLogsPreset() []components.ACLAction { + if o == nil { + return nil + } + return o.LogsPreset +} + +func (o *Permissions) GetPasswordProtection() []components.ACLAction { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *Permissions) GetOptionsAllowlist() []components.ACLAction { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +func (o *Permissions) GetJob() []components.ACLAction { + if o == nil { + return nil + } + return o.Job +} + +func (o *Permissions) GetObservabilityData() []components.ACLAction { + if o == nil { + return nil + } + return o.ObservabilityData +} + +func (o *Permissions) GetProject() []components.ACLAction { + if o == nil { + return nil + } + return o.Project +} + +func (o *Permissions) GetProjectFromV0() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectFromV0 +} + +func (o *Permissions) GetProjectAccessGroup() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAccessGroup +} + +func (o *Permissions) GetProjectAnalyticsSampling() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAnalyticsSampling +} + +func (o *Permissions) GetProjectDeploymentHook() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDeploymentHook +} + +func (o *Permissions) GetProjectDomain() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomain +} + +func (o *Permissions) GetProjectDomainMove() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomainMove +} + +func (o *Permissions) GetProjectDomainCheckConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDomainCheckConfig +} + +func (o *Permissions) GetProjectEnvVars() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVars +} + +func (o *Permissions) GetProjectEnvVarsProduction() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVarsProduction +} + +func (o *Permissions) GetProjectEnvVarsUnownedByIntegration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectEnvVarsUnownedByIntegration +} + +func (o *Permissions) GetProjectFlags() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectFlags +} + +func (o *Permissions) GetProjectID() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectID +} + +func (o *Permissions) GetProjectIntegrationConfiguration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectIntegrationConfiguration +} + +func (o *Permissions) GetProjectLink() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectLink +} + +func (o *Permissions) GetProjectMember() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectMember +} + +func (o *Permissions) GetProjectMonitoring() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectMonitoring +} + +func (o *Permissions) GetProjectPermissions() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectPermissions +} + +func (o *Permissions) GetProjectProductionBranch() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectProductionBranch +} + +func (o *Permissions) GetProjectTransfer() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransfer +} + +func (o *Permissions) GetProjectTransferOut() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTransferOut +} + +func (o *Permissions) GetProjectProtectionBypass() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectProtectionBypass +} + +func (o *Permissions) GetProjectUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectUsage +} + +func (o *Permissions) GetProjectAnalyticsUsage() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectAnalyticsUsage +} + +func (o *Permissions) GetProjectSupportCase() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectSupportCase +} + +func (o *Permissions) GetProjectSupportCaseComment() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectSupportCaseComment +} + +func (o *Permissions) GetProjectDeploymentExpiration() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectDeploymentExpiration +} + +func (o *Permissions) GetProjectTier() []components.ACLAction { + if o == nil { + return nil + } + return o.ProjectTier +} + +func (o *Permissions) GetSeawallConfig() []components.ACLAction { + if o == nil { + return nil + } + return o.SeawallConfig +} + +func (o *Permissions) GetSkewProtection() []components.ACLAction { + if o == nil { + return nil + } + return o.SkewProtection +} + +func (o *Permissions) GetAnalytics() []components.ACLAction { + if o == nil { + return nil + } + return o.Analytics +} + +func (o *Permissions) GetTrustedIps() []components.ACLAction { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *Permissions) GetWebAnalytics() []components.ACLAction { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *Permissions) GetSharedEnvVarConnection() []components.ACLAction { + if o == nil { + return nil + } + return o.SharedEnvVarConnection +} + +func (o *Permissions) GetSonar() []components.ACLAction { + if o == nil { + return nil + } + return o.Sonar +} + +type LastRollbackTarget struct { +} + +type JobStatus string + +const ( + JobStatusSucceeded JobStatus = "succeeded" + JobStatusFailed JobStatus = "failed" + JobStatusSkipped JobStatus = "skipped" + JobStatusPending JobStatus = "pending" + JobStatusInProgress JobStatus = "in-progress" +) + +func (e JobStatus) ToPointer() *JobStatus { + return &e +} +func (e *JobStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "succeeded": + fallthrough + case "failed": + fallthrough + case "skipped": + fallthrough + case "pending": + fallthrough + case "in-progress": + *e = JobStatus(v) + return nil + default: + return fmt.Errorf("invalid value for JobStatus: %v", v) + } +} + +type UpdateProjectDataCacheProjectsResponseType string + +const ( + UpdateProjectDataCacheProjectsResponseTypePromote UpdateProjectDataCacheProjectsResponseType = "promote" + UpdateProjectDataCacheProjectsResponseTypeRollback UpdateProjectDataCacheProjectsResponseType = "rollback" +) + +func (e UpdateProjectDataCacheProjectsResponseType) ToPointer() *UpdateProjectDataCacheProjectsResponseType { + return &e +} +func (e *UpdateProjectDataCacheProjectsResponseType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "promote": + fallthrough + case "rollback": + *e = UpdateProjectDataCacheProjectsResponseType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsResponseType: %v", v) + } +} + +type LastAliasRequest struct { + FromDeploymentID string `json:"fromDeploymentId"` + ToDeploymentID string `json:"toDeploymentId"` + JobStatus JobStatus `json:"jobStatus"` + RequestedAt float64 `json:"requestedAt"` + Type UpdateProjectDataCacheProjectsResponseType `json:"type"` +} + +func (o *LastAliasRequest) GetFromDeploymentID() string { + if o == nil { + return "" + } + return o.FromDeploymentID +} + +func (o *LastAliasRequest) GetToDeploymentID() string { + if o == nil { + return "" + } + return o.ToDeploymentID +} + +func (o *LastAliasRequest) GetJobStatus() JobStatus { + if o == nil { + return JobStatus("") + } + return o.JobStatus +} + +func (o *LastAliasRequest) GetRequestedAt() float64 { + if o == nil { + return 0.0 + } + return o.RequestedAt +} + +func (o *LastAliasRequest) GetType() UpdateProjectDataCacheProjectsResponseType { + if o == nil { + return UpdateProjectDataCacheProjectsResponseType("") + } + return o.Type +} + +type Scope string + +const ( + ScopeAutomationBypass Scope = "automation-bypass" +) + +func (e Scope) ToPointer() *Scope { + return &e +} +func (e *Scope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "automation-bypass": + *e = Scope(v) + return nil + default: + return fmt.Errorf("invalid value for Scope: %v", v) + } +} + +type ProtectionBypass struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope Scope `json:"scope"` +} + +func (o *ProtectionBypass) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *ProtectionBypass) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *ProtectionBypass) GetScope() Scope { + if o == nil { + return Scope("") + } + return o.Scope +} + +type UpdateProjectDataCacheTrustedIpsDeploymentType string + +const ( + UpdateProjectDataCacheTrustedIpsDeploymentTypeProduction UpdateProjectDataCacheTrustedIpsDeploymentType = "production" + UpdateProjectDataCacheTrustedIpsDeploymentTypePreview UpdateProjectDataCacheTrustedIpsDeploymentType = "preview" + UpdateProjectDataCacheTrustedIpsDeploymentTypeAll UpdateProjectDataCacheTrustedIpsDeploymentType = "all" + UpdateProjectDataCacheTrustedIpsDeploymentTypeProdDeploymentUrlsAndAllPreviews UpdateProjectDataCacheTrustedIpsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e UpdateProjectDataCacheTrustedIpsDeploymentType) ToPointer() *UpdateProjectDataCacheTrustedIpsDeploymentType { + return &e +} +func (e *UpdateProjectDataCacheTrustedIpsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = UpdateProjectDataCacheTrustedIpsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheTrustedIpsDeploymentType: %v", v) + } +} + +type TrustedIps2 struct { + DeploymentType UpdateProjectDataCacheTrustedIpsDeploymentType `json:"deploymentType"` +} + +func (o *TrustedIps2) GetDeploymentType() UpdateProjectDataCacheTrustedIpsDeploymentType { + if o == nil { + return UpdateProjectDataCacheTrustedIpsDeploymentType("") + } + return o.DeploymentType +} + +type TrustedIpsDeploymentType string + +const ( + TrustedIpsDeploymentTypeProduction TrustedIpsDeploymentType = "production" + TrustedIpsDeploymentTypePreview TrustedIpsDeploymentType = "preview" + TrustedIpsDeploymentTypeAll TrustedIpsDeploymentType = "all" + TrustedIpsDeploymentTypeProdDeploymentUrlsAndAllPreviews TrustedIpsDeploymentType = "prod_deployment_urls_and_all_previews" +) + +func (e TrustedIpsDeploymentType) ToPointer() *TrustedIpsDeploymentType { + return &e +} +func (e *TrustedIpsDeploymentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "production": + fallthrough + case "preview": + fallthrough + case "all": + fallthrough + case "prod_deployment_urls_and_all_previews": + *e = TrustedIpsDeploymentType(v) + return nil + default: + return fmt.Errorf("invalid value for TrustedIpsDeploymentType: %v", v) + } +} + +type UpdateProjectDataCacheTrustedIpsAddresses struct { + Value string `json:"value"` + Note *string `json:"note,omitempty"` +} + +func (o *UpdateProjectDataCacheTrustedIpsAddresses) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *UpdateProjectDataCacheTrustedIpsAddresses) GetNote() *string { + if o == nil { + return nil + } + return o.Note +} + +type UpdateProjectDataCacheTrustedIpsProtectionMode string + +const ( + UpdateProjectDataCacheTrustedIpsProtectionModeAdditional UpdateProjectDataCacheTrustedIpsProtectionMode = "additional" + UpdateProjectDataCacheTrustedIpsProtectionModeExclusive UpdateProjectDataCacheTrustedIpsProtectionMode = "exclusive" +) + +func (e UpdateProjectDataCacheTrustedIpsProtectionMode) ToPointer() *UpdateProjectDataCacheTrustedIpsProtectionMode { + return &e +} +func (e *UpdateProjectDataCacheTrustedIpsProtectionMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "additional": + fallthrough + case "exclusive": + *e = UpdateProjectDataCacheTrustedIpsProtectionMode(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheTrustedIpsProtectionMode: %v", v) + } +} + +type TrustedIps1 struct { + DeploymentType TrustedIpsDeploymentType `json:"deploymentType"` + Addresses []UpdateProjectDataCacheTrustedIpsAddresses `json:"addresses"` + ProtectionMode UpdateProjectDataCacheTrustedIpsProtectionMode `json:"protectionMode"` +} + +func (o *TrustedIps1) GetDeploymentType() TrustedIpsDeploymentType { + if o == nil { + return TrustedIpsDeploymentType("") + } + return o.DeploymentType +} + +func (o *TrustedIps1) GetAddresses() []UpdateProjectDataCacheTrustedIpsAddresses { + if o == nil { + return []UpdateProjectDataCacheTrustedIpsAddresses{} + } + return o.Addresses +} + +func (o *TrustedIps1) GetProtectionMode() UpdateProjectDataCacheTrustedIpsProtectionMode { + if o == nil { + return UpdateProjectDataCacheTrustedIpsProtectionMode("") + } + return o.ProtectionMode +} + +type UpdateProjectDataCacheTrustedIpsType string + +const ( + UpdateProjectDataCacheTrustedIpsTypeTrustedIps1 UpdateProjectDataCacheTrustedIpsType = "trustedIps_1" + UpdateProjectDataCacheTrustedIpsTypeTrustedIps2 UpdateProjectDataCacheTrustedIpsType = "trustedIps_2" +) + +type UpdateProjectDataCacheTrustedIps struct { + TrustedIps1 *TrustedIps1 + TrustedIps2 *TrustedIps2 + + Type UpdateProjectDataCacheTrustedIpsType +} + +func CreateUpdateProjectDataCacheTrustedIpsTrustedIps1(trustedIps1 TrustedIps1) UpdateProjectDataCacheTrustedIps { + typ := UpdateProjectDataCacheTrustedIpsTypeTrustedIps1 + + return UpdateProjectDataCacheTrustedIps{ + TrustedIps1: &trustedIps1, + Type: typ, + } +} + +func CreateUpdateProjectDataCacheTrustedIpsTrustedIps2(trustedIps2 TrustedIps2) UpdateProjectDataCacheTrustedIps { + typ := UpdateProjectDataCacheTrustedIpsTypeTrustedIps2 + + return UpdateProjectDataCacheTrustedIps{ + TrustedIps2: &trustedIps2, + Type: typ, + } +} + +func (u *UpdateProjectDataCacheTrustedIps) UnmarshalJSON(data []byte) error { + + var trustedIps2 TrustedIps2 = TrustedIps2{} + if err := utils.UnmarshalJSON(data, &trustedIps2, "", true, true); err == nil { + u.TrustedIps2 = &trustedIps2 + u.Type = UpdateProjectDataCacheTrustedIpsTypeTrustedIps2 + return nil + } + + var trustedIps1 TrustedIps1 = TrustedIps1{} + if err := utils.UnmarshalJSON(data, &trustedIps1, "", true, true); err == nil { + u.TrustedIps1 = &trustedIps1 + u.Type = UpdateProjectDataCacheTrustedIpsTypeTrustedIps1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectDataCacheTrustedIps", string(data)) +} + +func (u UpdateProjectDataCacheTrustedIps) MarshalJSON() ([]byte, error) { + if u.TrustedIps1 != nil { + return utils.MarshalJSON(u.TrustedIps1, "", true) + } + + if u.TrustedIps2 != nil { + return utils.MarshalJSON(u.TrustedIps2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectDataCacheTrustedIps: all fields are null") +} + +type GitComments struct { + // Whether the Vercel bot should comment on PRs + OnPullRequest bool `json:"onPullRequest"` + // Whether the Vercel bot should comment on commits + OnCommit bool `json:"onCommit"` +} + +func (o *GitComments) GetOnPullRequest() bool { + if o == nil { + return false + } + return o.OnPullRequest +} + +func (o *GitComments) GetOnCommit() bool { + if o == nil { + return false + } + return o.OnCommit +} + +type WebAnalytics struct { + ID string `json:"id"` + DisabledAt *float64 `json:"disabledAt,omitempty"` + CanceledAt *float64 `json:"canceledAt,omitempty"` + EnabledAt *float64 `json:"enabledAt,omitempty"` + HasData *bool `json:"hasData,omitempty"` +} + +func (o *WebAnalytics) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *WebAnalytics) GetDisabledAt() *float64 { + if o == nil { + return nil + } + return o.DisabledAt +} + +func (o *WebAnalytics) GetCanceledAt() *float64 { + if o == nil { + return nil + } + return o.CanceledAt +} + +func (o *WebAnalytics) GetEnabledAt() *float64 { + if o == nil { + return nil + } + return o.EnabledAt +} + +func (o *WebAnalytics) GetHasData() *bool { + if o == nil { + return nil + } + return o.HasData +} + +type Src2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *Src2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *Src2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *Src2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *Src2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *Src2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *Src2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *Src2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *Src2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *Src2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *Src2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *Src2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type SrcType string + +const ( + SrcTypeStr SrcType = "str" + SrcTypeSrc2 SrcType = "src_2" +) + +type Src struct { + Str *string + Src2 *Src2 + + Type SrcType +} + +func CreateSrcStr(str string) Src { + typ := SrcTypeStr + + return Src{ + Str: &str, + Type: typ, + } +} + +func CreateSrcSrc2(src2 Src2) Src { + typ := SrcTypeSrc2 + + return Src{ + Src2: &src2, + Type: typ, + } +} + +func (u *Src) UnmarshalJSON(data []byte) error { + + var src2 Src2 = Src2{} + if err := utils.UnmarshalJSON(data, &src2, "", true, true); err == nil { + u.Src2 = &src2 + u.Type = SrcTypeSrc2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = SrcTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for Src", string(data)) +} + +func (u Src) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.Src2 != nil { + return utils.MarshalJSON(u.Src2, "", true) + } + + return nil, errors.New("could not marshal union type Src: all fields are null") +} + +type UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType string + +const ( + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypePath UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "path" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeHost UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "host" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeMethod UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "method" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeHeader UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "header" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeCookie UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "cookie" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeQuery UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "query" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeIPAddress UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "ip_address" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeProtocol UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "protocol" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeScheme UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "scheme" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeEnvironment UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "environment" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeRegion UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "region" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityTypeInitialRequestPath UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType = "initial_request_path" +) + +func (e UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType) ToPointer() *UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType { + return &e +} +func (e *UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "path": + fallthrough + case "host": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "region": + fallthrough + case "initial_request_path": + *e = UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType: %v", v) + } +} + +type UpdateProjectDataCacheValueProjects2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *UpdateProjectDataCacheValueProjects2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *UpdateProjectDataCacheValueProjects2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *UpdateProjectDataCacheValueProjects2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *UpdateProjectDataCacheValueProjects2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *UpdateProjectDataCacheValueProjects2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *UpdateProjectDataCacheValueProjects2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *UpdateProjectDataCacheValueProjects2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *UpdateProjectDataCacheValueProjects2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *UpdateProjectDataCacheValueProjects2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *UpdateProjectDataCacheValueProjects2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *UpdateProjectDataCacheValueProjects2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type UpdateProjectDataCacheProjectsValueType string + +const ( + UpdateProjectDataCacheProjectsValueTypeStr UpdateProjectDataCacheProjectsValueType = "str" + UpdateProjectDataCacheProjectsValueTypeUpdateProjectDataCacheValueProjects2 UpdateProjectDataCacheProjectsValueType = "updateProjectDataCache_value_projects_2" +) + +type UpdateProjectDataCacheProjectsValue struct { + Str *string + UpdateProjectDataCacheValueProjects2 *UpdateProjectDataCacheValueProjects2 + + Type UpdateProjectDataCacheProjectsValueType +} + +func CreateUpdateProjectDataCacheProjectsValueStr(str string) UpdateProjectDataCacheProjectsValue { + typ := UpdateProjectDataCacheProjectsValueTypeStr + + return UpdateProjectDataCacheProjectsValue{ + Str: &str, + Type: typ, + } +} + +func CreateUpdateProjectDataCacheProjectsValueUpdateProjectDataCacheValueProjects2(updateProjectDataCacheValueProjects2 UpdateProjectDataCacheValueProjects2) UpdateProjectDataCacheProjectsValue { + typ := UpdateProjectDataCacheProjectsValueTypeUpdateProjectDataCacheValueProjects2 + + return UpdateProjectDataCacheProjectsValue{ + UpdateProjectDataCacheValueProjects2: &updateProjectDataCacheValueProjects2, + Type: typ, + } +} + +func (u *UpdateProjectDataCacheProjectsValue) UnmarshalJSON(data []byte) error { + + var updateProjectDataCacheValueProjects2 UpdateProjectDataCacheValueProjects2 = UpdateProjectDataCacheValueProjects2{} + if err := utils.UnmarshalJSON(data, &updateProjectDataCacheValueProjects2, "", true, true); err == nil { + u.UpdateProjectDataCacheValueProjects2 = &updateProjectDataCacheValueProjects2 + u.Type = UpdateProjectDataCacheProjectsValueTypeUpdateProjectDataCacheValueProjects2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = UpdateProjectDataCacheProjectsValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectDataCacheProjectsValue", string(data)) +} + +func (u UpdateProjectDataCacheProjectsValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.UpdateProjectDataCacheValueProjects2 != nil { + return utils.MarshalJSON(u.UpdateProjectDataCacheValueProjects2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectDataCacheProjectsValue: all fields are null") +} + +type Has struct { + Type UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType `json:"type"` + Key *string `json:"key,omitempty"` + Value *UpdateProjectDataCacheProjectsValue `json:"value,omitempty"` +} + +func (o *Has) GetType() UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType { + if o == nil { + return UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityType("") + } + return o.Type +} + +func (o *Has) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *Has) GetValue() *UpdateProjectDataCacheProjectsValue { + if o == nil { + return nil + } + return o.Value +} + +type UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType string + +const ( + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypePath UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "path" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeHost UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "host" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeMethod UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "method" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeHeader UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "header" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeCookie UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "cookie" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeQuery UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "query" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeIPAddress UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "ip_address" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeProtocol UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "protocol" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeScheme UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "scheme" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeEnvironment UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "environment" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeRegion UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "region" + UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesTypeInitialRequestPath UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType = "initial_request_path" +) + +func (e UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType) ToPointer() *UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType { + return &e +} +func (e *UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "path": + fallthrough + case "host": + fallthrough + case "method": + fallthrough + case "header": + fallthrough + case "cookie": + fallthrough + case "query": + fallthrough + case "ip_address": + fallthrough + case "protocol": + fallthrough + case "scheme": + fallthrough + case "environment": + fallthrough + case "region": + fallthrough + case "initial_request_path": + *e = UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType: %v", v) + } +} + +type UpdateProjectDataCacheValue2 struct { + Re *string `json:"re,omitempty"` + Eq *string `json:"eq,omitempty"` + Neq *string `json:"neq,omitempty"` + Inc []string `json:"inc,omitempty"` + Ninc []string `json:"ninc,omitempty"` + Pre *string `json:"pre,omitempty"` + Suf *string `json:"suf,omitempty"` + Gt *float64 `json:"gt,omitempty"` + Gte *float64 `json:"gte,omitempty"` + Lt *float64 `json:"lt,omitempty"` + Lte *float64 `json:"lte,omitempty"` +} + +func (o *UpdateProjectDataCacheValue2) GetRe() *string { + if o == nil { + return nil + } + return o.Re +} + +func (o *UpdateProjectDataCacheValue2) GetEq() *string { + if o == nil { + return nil + } + return o.Eq +} + +func (o *UpdateProjectDataCacheValue2) GetNeq() *string { + if o == nil { + return nil + } + return o.Neq +} + +func (o *UpdateProjectDataCacheValue2) GetInc() []string { + if o == nil { + return nil + } + return o.Inc +} + +func (o *UpdateProjectDataCacheValue2) GetNinc() []string { + if o == nil { + return nil + } + return o.Ninc +} + +func (o *UpdateProjectDataCacheValue2) GetPre() *string { + if o == nil { + return nil + } + return o.Pre +} + +func (o *UpdateProjectDataCacheValue2) GetSuf() *string { + if o == nil { + return nil + } + return o.Suf +} + +func (o *UpdateProjectDataCacheValue2) GetGt() *float64 { + if o == nil { + return nil + } + return o.Gt +} + +func (o *UpdateProjectDataCacheValue2) GetGte() *float64 { + if o == nil { + return nil + } + return o.Gte +} + +func (o *UpdateProjectDataCacheValue2) GetLt() *float64 { + if o == nil { + return nil + } + return o.Lt +} + +func (o *UpdateProjectDataCacheValue2) GetLte() *float64 { + if o == nil { + return nil + } + return o.Lte +} + +type UpdateProjectDataCacheValueType string + +const ( + UpdateProjectDataCacheValueTypeStr UpdateProjectDataCacheValueType = "str" + UpdateProjectDataCacheValueTypeUpdateProjectDataCacheValue2 UpdateProjectDataCacheValueType = "updateProjectDataCache_value_2" +) + +type UpdateProjectDataCacheValue struct { + Str *string + UpdateProjectDataCacheValue2 *UpdateProjectDataCacheValue2 + + Type UpdateProjectDataCacheValueType +} + +func CreateUpdateProjectDataCacheValueStr(str string) UpdateProjectDataCacheValue { + typ := UpdateProjectDataCacheValueTypeStr + + return UpdateProjectDataCacheValue{ + Str: &str, + Type: typ, + } +} + +func CreateUpdateProjectDataCacheValueUpdateProjectDataCacheValue2(updateProjectDataCacheValue2 UpdateProjectDataCacheValue2) UpdateProjectDataCacheValue { + typ := UpdateProjectDataCacheValueTypeUpdateProjectDataCacheValue2 + + return UpdateProjectDataCacheValue{ + UpdateProjectDataCacheValue2: &updateProjectDataCacheValue2, + Type: typ, + } +} + +func (u *UpdateProjectDataCacheValue) UnmarshalJSON(data []byte) error { + + var updateProjectDataCacheValue2 UpdateProjectDataCacheValue2 = UpdateProjectDataCacheValue2{} + if err := utils.UnmarshalJSON(data, &updateProjectDataCacheValue2, "", true, true); err == nil { + u.UpdateProjectDataCacheValue2 = &updateProjectDataCacheValue2 + u.Type = UpdateProjectDataCacheValueTypeUpdateProjectDataCacheValue2 + return nil + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, true); err == nil { + u.Str = &str + u.Type = UpdateProjectDataCacheValueTypeStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UpdateProjectDataCacheValue", string(data)) +} + +func (u UpdateProjectDataCacheValue) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.UpdateProjectDataCacheValue2 != nil { + return utils.MarshalJSON(u.UpdateProjectDataCacheValue2, "", true) + } + + return nil, errors.New("could not marshal union type UpdateProjectDataCacheValue: all fields are null") +} + +type Missing struct { + Type UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType `json:"type"` + Key *string `json:"key,omitempty"` + Value *UpdateProjectDataCacheValue `json:"value,omitempty"` +} + +func (o *Missing) GetType() UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType { + if o == nil { + return UpdateProjectDataCacheProjectsResponse200ApplicationJSONResponseBodySecurityFirewallRoutesType("") + } + return o.Type +} + +func (o *Missing) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *Missing) GetValue() *UpdateProjectDataCacheValue { + if o == nil { + return nil + } + return o.Value +} + +type Handle string + +const ( + HandleInit Handle = "init" + HandleFinalize Handle = "finalize" +) + +func (e Handle) ToPointer() *Handle { + return &e +} +func (e *Handle) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "init": + fallthrough + case "finalize": + *e = Handle(v) + return nil + default: + return fmt.Errorf("invalid value for Handle: %v", v) + } +} + +type UpdateProjectDataCacheAction string + +const ( + UpdateProjectDataCacheActionDeny UpdateProjectDataCacheAction = "deny" + UpdateProjectDataCacheActionChallenge UpdateProjectDataCacheAction = "challenge" + UpdateProjectDataCacheActionLog UpdateProjectDataCacheAction = "log" + UpdateProjectDataCacheActionBypass UpdateProjectDataCacheAction = "bypass" + UpdateProjectDataCacheActionRateLimit UpdateProjectDataCacheAction = "rate_limit" + UpdateProjectDataCacheActionRedirect UpdateProjectDataCacheAction = "redirect" +) + +func (e UpdateProjectDataCacheAction) ToPointer() *UpdateProjectDataCacheAction { + return &e +} +func (e *UpdateProjectDataCacheAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "deny": + fallthrough + case "challenge": + fallthrough + case "log": + fallthrough + case "bypass": + fallthrough + case "rate_limit": + fallthrough + case "redirect": + *e = UpdateProjectDataCacheAction(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheAction: %v", v) + } +} + +type UpdateProjectDataCacheAlgo string + +const ( + UpdateProjectDataCacheAlgoFixedWindow UpdateProjectDataCacheAlgo = "fixed_window" + UpdateProjectDataCacheAlgoTokenBucket UpdateProjectDataCacheAlgo = "token_bucket" +) + +func (e UpdateProjectDataCacheAlgo) ToPointer() *UpdateProjectDataCacheAlgo { + return &e +} +func (e *UpdateProjectDataCacheAlgo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "fixed_window": + fallthrough + case "token_bucket": + *e = UpdateProjectDataCacheAlgo(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheAlgo: %v", v) + } +} + +type Erl struct { + Algo UpdateProjectDataCacheAlgo `json:"algo"` + Window float64 `json:"window"` + Limit float64 `json:"limit"` + Keys []string `json:"keys"` +} + +func (o *Erl) GetAlgo() UpdateProjectDataCacheAlgo { + if o == nil { + return UpdateProjectDataCacheAlgo("") + } + return o.Algo +} + +func (o *Erl) GetWindow() float64 { + if o == nil { + return 0.0 + } + return o.Window +} + +func (o *Erl) GetLimit() float64 { + if o == nil { + return 0.0 + } + return o.Limit +} + +func (o *Erl) GetKeys() []string { + if o == nil { + return []string{} + } + return o.Keys +} + +type UpdateProjectDataCacheMitigate struct { + Action UpdateProjectDataCacheAction `json:"action"` + RuleID string `json:"rule_id"` + TTL *float64 `json:"ttl,omitempty"` + Erl *Erl `json:"erl,omitempty"` +} + +func (o *UpdateProjectDataCacheMitigate) GetAction() UpdateProjectDataCacheAction { + if o == nil { + return UpdateProjectDataCacheAction("") + } + return o.Action +} + +func (o *UpdateProjectDataCacheMitigate) GetRuleID() string { + if o == nil { + return "" + } + return o.RuleID +} + +func (o *UpdateProjectDataCacheMitigate) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *UpdateProjectDataCacheMitigate) GetErl() *Erl { + if o == nil { + return nil + } + return o.Erl +} + +type FirewallRoutes struct { + Src *Src `json:"src,omitempty"` + Has []Has `json:"has,omitempty"` + Missing []Missing `json:"missing,omitempty"` + Dest *string `json:"dest,omitempty"` + Status *float64 `json:"status,omitempty"` + Handle *Handle `json:"handle,omitempty"` + Mitigate *UpdateProjectDataCacheMitigate `json:"mitigate,omitempty"` +} + +func (o *FirewallRoutes) GetSrc() *Src { + if o == nil { + return nil + } + return o.Src +} + +func (o *FirewallRoutes) GetHas() []Has { + if o == nil { + return nil + } + return o.Has +} + +func (o *FirewallRoutes) GetMissing() []Missing { + if o == nil { + return nil + } + return o.Missing +} + +func (o *FirewallRoutes) GetDest() *string { + if o == nil { + return nil + } + return o.Dest +} + +func (o *FirewallRoutes) GetStatus() *float64 { + if o == nil { + return nil + } + return o.Status +} + +func (o *FirewallRoutes) GetHandle() *Handle { + if o == nil { + return nil + } + return o.Handle +} + +func (o *FirewallRoutes) GetMitigate() *UpdateProjectDataCacheMitigate { + if o == nil { + return nil + } + return o.Mitigate +} + +type Security struct { + AttackModeEnabled *bool `json:"attackModeEnabled,omitempty"` + AttackModeUpdatedAt *float64 `json:"attackModeUpdatedAt,omitempty"` + FirewallEnabled *bool `json:"firewallEnabled,omitempty"` + FirewallUpdatedAt *float64 `json:"firewallUpdatedAt,omitempty"` + AttackModeActiveUntil *float64 `json:"attackModeActiveUntil,omitempty"` + FirewallConfigVersion *float64 `json:"firewallConfigVersion,omitempty"` + FirewallRoutes []FirewallRoutes `json:"firewallRoutes,omitempty"` + FirewallSeawallEnabled *bool `json:"firewallSeawallEnabled,omitempty"` + Ja3Enabled *bool `json:"ja3Enabled,omitempty"` + Ja4Enabled *bool `json:"ja4Enabled,omitempty"` + FirewallBypassIps []string `json:"firewallBypassIps,omitempty"` +} + +func (o *Security) GetAttackModeEnabled() *bool { + if o == nil { + return nil + } + return o.AttackModeEnabled +} + +func (o *Security) GetAttackModeUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.AttackModeUpdatedAt +} + +func (o *Security) GetFirewallEnabled() *bool { + if o == nil { + return nil + } + return o.FirewallEnabled +} + +func (o *Security) GetFirewallUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.FirewallUpdatedAt +} + +func (o *Security) GetAttackModeActiveUntil() *float64 { + if o == nil { + return nil + } + return o.AttackModeActiveUntil +} + +func (o *Security) GetFirewallConfigVersion() *float64 { + if o == nil { + return nil + } + return o.FirewallConfigVersion +} + +func (o *Security) GetFirewallRoutes() []FirewallRoutes { + if o == nil { + return nil + } + return o.FirewallRoutes +} + +func (o *Security) GetFirewallSeawallEnabled() *bool { + if o == nil { + return nil + } + return o.FirewallSeawallEnabled +} + +func (o *Security) GetJa3Enabled() *bool { + if o == nil { + return nil + } + return o.Ja3Enabled +} + +func (o *Security) GetJa4Enabled() *bool { + if o == nil { + return nil + } + return o.Ja4Enabled +} + +func (o *Security) GetFirewallBypassIps() []string { + if o == nil { + return nil + } + return o.FirewallBypassIps +} + +// UpdateProjectDataCacheIssuerMode - - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com` +type UpdateProjectDataCacheIssuerMode string + +const ( + UpdateProjectDataCacheIssuerModeTeam UpdateProjectDataCacheIssuerMode = "team" + UpdateProjectDataCacheIssuerModeGlobal UpdateProjectDataCacheIssuerMode = "global" +) + +func (e UpdateProjectDataCacheIssuerMode) ToPointer() *UpdateProjectDataCacheIssuerMode { + return &e +} +func (e *UpdateProjectDataCacheIssuerMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "team": + fallthrough + case "global": + *e = UpdateProjectDataCacheIssuerMode(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectDataCacheIssuerMode: %v", v) + } +} + +type UpdateProjectDataCacheOidcTokenConfig struct { + Enabled bool `json:"enabled"` + // - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com` + IssuerMode *UpdateProjectDataCacheIssuerMode `json:"issuerMode,omitempty"` +} + +func (o *UpdateProjectDataCacheOidcTokenConfig) GetEnabled() bool { + if o == nil { + return false + } + return o.Enabled +} + +func (o *UpdateProjectDataCacheOidcTokenConfig) GetIssuerMode() *UpdateProjectDataCacheIssuerMode { + if o == nil { + return nil + } + return o.IssuerMode +} + +type Tier string + +const ( + TierStandard Tier = "standard" + TierAdvanced Tier = "advanced" + TierCritical Tier = "critical" +) + +func (e Tier) ToPointer() *Tier { + return &e +} +func (e *Tier) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "standard": + fallthrough + case "advanced": + fallthrough + case "critical": + *e = Tier(v) + return nil + default: + return fmt.Errorf("invalid value for Tier: %v", v) + } +} + +type UpdateProjectDataCacheResponseBody struct { + AccountID string `json:"accountId"` + Analytics *Analytics `json:"analytics,omitempty"` + SpeedInsights *SpeedInsights `json:"speedInsights,omitempty"` + AutoExposeSystemEnvs *bool `json:"autoExposeSystemEnvs,omitempty"` + AutoAssignCustomDomains *bool `json:"autoAssignCustomDomains,omitempty"` + AutoAssignCustomDomainsUpdatedBy *string `json:"autoAssignCustomDomainsUpdatedBy,omitempty"` + BuildCommand *string `json:"buildCommand,omitempty"` + CommandForIgnoringBuildStep *string `json:"commandForIgnoringBuildStep,omitempty"` + ConnectConfigurationID *string `json:"connectConfigurationId,omitempty"` + ConnectBuildsEnabled *bool `json:"connectBuildsEnabled,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + CustomerSupportCodeVisibility *bool `json:"customerSupportCodeVisibility,omitempty"` + Crons *Crons `json:"crons,omitempty"` + DataCache *DataCache `json:"dataCache,omitempty"` + DeploymentExpiration *DeploymentExpiration `json:"deploymentExpiration,omitempty"` + DevCommand *string `json:"devCommand,omitempty"` + DirectoryListing bool `json:"directoryListing"` + InstallCommand *string `json:"installCommand,omitempty"` + Env []Env `json:"env,omitempty"` + CustomEnvironments []CustomEnvironments `json:"customEnvironments,omitempty"` + Framework *UpdateProjectDataCacheFramework `json:"framework,omitempty"` + GitForkProtection *bool `json:"gitForkProtection,omitempty"` + GitLFS *bool `json:"gitLFS,omitempty"` + ID string `json:"id"` + IPBuckets []IPBuckets `json:"ipBuckets,omitempty"` + LatestDeployments []LatestDeployments `json:"latestDeployments,omitempty"` + Link *Link `json:"link,omitempty"` + Microfrontends *Microfrontends `json:"microfrontends,omitempty"` + Name string `json:"name"` + NodeVersion UpdateProjectDataCacheNodeVersion `json:"nodeVersion"` + OptionsAllowlist *UpdateProjectDataCacheOptionsAllowlist `json:"optionsAllowlist,omitempty"` + OutputDirectory *string `json:"outputDirectory,omitempty"` + PassiveConnectConfigurationID *string `json:"passiveConnectConfigurationId,omitempty"` + PasswordProtection *UpdateProjectDataCachePasswordProtection `json:"passwordProtection,omitempty"` + ProductionDeploymentsFastLane *bool `json:"productionDeploymentsFastLane,omitempty"` + PublicSource *bool `json:"publicSource,omitempty"` + ResourceConfig *ResourceConfig `json:"resourceConfig,omitempty"` + RootDirectory *string `json:"rootDirectory,omitempty"` + ServerlessFunctionRegion *string `json:"serverlessFunctionRegion,omitempty"` + ServerlessFunctionZeroConfigFailover *bool `json:"serverlessFunctionZeroConfigFailover,omitempty"` + SkewProtectionBoundaryAt *float64 `json:"skewProtectionBoundaryAt,omitempty"` + SkewProtectionMaxAge *float64 `json:"skewProtectionMaxAge,omitempty"` + SkipGitConnectDuringLink *bool `json:"skipGitConnectDuringLink,omitempty"` + SourceFilesOutsideRootDirectory *bool `json:"sourceFilesOutsideRootDirectory,omitempty"` + EnableAffectedProjectsDeployments *bool `json:"enableAffectedProjectsDeployments,omitempty"` + SsoProtection *UpdateProjectDataCacheSsoProtection `json:"ssoProtection,omitempty"` + Targets map[string]Targets `json:"targets,omitempty"` + TransferCompletedAt *float64 `json:"transferCompletedAt,omitempty"` + TransferStartedAt *float64 `json:"transferStartedAt,omitempty"` + TransferToAccountID *string `json:"transferToAccountId,omitempty"` + TransferredFromAccountID *string `json:"transferredFromAccountId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + Live *bool `json:"live,omitempty"` + EnablePreviewFeedback *bool `json:"enablePreviewFeedback,omitempty"` + EnableProductionFeedback *bool `json:"enableProductionFeedback,omitempty"` + Permissions *Permissions `json:"permissions,omitempty"` + LastRollbackTarget *LastRollbackTarget `json:"lastRollbackTarget,omitempty"` + LastAliasRequest *LastAliasRequest `json:"lastAliasRequest,omitempty"` + HasFloatingAliases *bool `json:"hasFloatingAliases,omitempty"` + ProtectionBypass map[string]ProtectionBypass `json:"protectionBypass,omitempty"` + HasActiveBranches *bool `json:"hasActiveBranches,omitempty"` + TrustedIps *UpdateProjectDataCacheTrustedIps `json:"trustedIps,omitempty"` + GitComments *GitComments `json:"gitComments,omitempty"` + Paused *bool `json:"paused,omitempty"` + ConcurrencyBucketName *string `json:"concurrencyBucketName,omitempty"` + WebAnalytics *WebAnalytics `json:"webAnalytics,omitempty"` + Security *Security `json:"security,omitempty"` + OidcTokenConfig *UpdateProjectDataCacheOidcTokenConfig `json:"oidcTokenConfig,omitempty"` + Tier *Tier `json:"tier,omitempty"` +} + +func (o *UpdateProjectDataCacheResponseBody) GetAccountID() string { + if o == nil { + return "" + } + return o.AccountID +} + +func (o *UpdateProjectDataCacheResponseBody) GetAnalytics() *Analytics { + if o == nil { + return nil + } + return o.Analytics +} + +func (o *UpdateProjectDataCacheResponseBody) GetSpeedInsights() *SpeedInsights { + if o == nil { + return nil + } + return o.SpeedInsights +} + +func (o *UpdateProjectDataCacheResponseBody) GetAutoExposeSystemEnvs() *bool { + if o == nil { + return nil + } + return o.AutoExposeSystemEnvs +} + +func (o *UpdateProjectDataCacheResponseBody) GetAutoAssignCustomDomains() *bool { + if o == nil { + return nil + } + return o.AutoAssignCustomDomains +} + +func (o *UpdateProjectDataCacheResponseBody) GetAutoAssignCustomDomainsUpdatedBy() *string { + if o == nil { + return nil + } + return o.AutoAssignCustomDomainsUpdatedBy +} + +func (o *UpdateProjectDataCacheResponseBody) GetBuildCommand() *string { + if o == nil { + return nil + } + return o.BuildCommand +} + +func (o *UpdateProjectDataCacheResponseBody) GetCommandForIgnoringBuildStep() *string { + if o == nil { + return nil + } + return o.CommandForIgnoringBuildStep +} + +func (o *UpdateProjectDataCacheResponseBody) GetConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.ConnectConfigurationID +} + +func (o *UpdateProjectDataCacheResponseBody) GetConnectBuildsEnabled() *bool { + if o == nil { + return nil + } + return o.ConnectBuildsEnabled +} + +func (o *UpdateProjectDataCacheResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectDataCacheResponseBody) GetCustomerSupportCodeVisibility() *bool { + if o == nil { + return nil + } + return o.CustomerSupportCodeVisibility +} + +func (o *UpdateProjectDataCacheResponseBody) GetCrons() *Crons { + if o == nil { + return nil + } + return o.Crons +} + +func (o *UpdateProjectDataCacheResponseBody) GetDataCache() *DataCache { + if o == nil { + return nil + } + return o.DataCache +} + +func (o *UpdateProjectDataCacheResponseBody) GetDeploymentExpiration() *DeploymentExpiration { + if o == nil { + return nil + } + return o.DeploymentExpiration +} + +func (o *UpdateProjectDataCacheResponseBody) GetDevCommand() *string { + if o == nil { + return nil + } + return o.DevCommand +} + +func (o *UpdateProjectDataCacheResponseBody) GetDirectoryListing() bool { + if o == nil { + return false + } + return o.DirectoryListing +} + +func (o *UpdateProjectDataCacheResponseBody) GetInstallCommand() *string { + if o == nil { + return nil + } + return o.InstallCommand +} + +func (o *UpdateProjectDataCacheResponseBody) GetEnv() []Env { + if o == nil { + return nil + } + return o.Env +} + +func (o *UpdateProjectDataCacheResponseBody) GetCustomEnvironments() []CustomEnvironments { + if o == nil { + return nil + } + return o.CustomEnvironments +} + +func (o *UpdateProjectDataCacheResponseBody) GetFramework() *UpdateProjectDataCacheFramework { + if o == nil { + return nil + } + return o.Framework +} + +func (o *UpdateProjectDataCacheResponseBody) GetGitForkProtection() *bool { + if o == nil { + return nil + } + return o.GitForkProtection +} + +func (o *UpdateProjectDataCacheResponseBody) GetGitLFS() *bool { + if o == nil { + return nil + } + return o.GitLFS +} + +func (o *UpdateProjectDataCacheResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateProjectDataCacheResponseBody) GetIPBuckets() []IPBuckets { + if o == nil { + return nil + } + return o.IPBuckets +} + +func (o *UpdateProjectDataCacheResponseBody) GetLatestDeployments() []LatestDeployments { + if o == nil { + return nil + } + return o.LatestDeployments +} + +func (o *UpdateProjectDataCacheResponseBody) GetLink() *Link { + if o == nil { + return nil + } + return o.Link +} + +func (o *UpdateProjectDataCacheResponseBody) GetMicrofrontends() *Microfrontends { + if o == nil { + return nil + } + return o.Microfrontends +} + +func (o *UpdateProjectDataCacheResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectDataCacheResponseBody) GetNodeVersion() UpdateProjectDataCacheNodeVersion { + if o == nil { + return UpdateProjectDataCacheNodeVersion("") + } + return o.NodeVersion +} + +func (o *UpdateProjectDataCacheResponseBody) GetOptionsAllowlist() *UpdateProjectDataCacheOptionsAllowlist { + if o == nil { + return nil + } + return o.OptionsAllowlist +} + +func (o *UpdateProjectDataCacheResponseBody) GetOutputDirectory() *string { + if o == nil { + return nil + } + return o.OutputDirectory +} + +func (o *UpdateProjectDataCacheResponseBody) GetPassiveConnectConfigurationID() *string { + if o == nil { + return nil + } + return o.PassiveConnectConfigurationID +} + +func (o *UpdateProjectDataCacheResponseBody) GetPasswordProtection() *UpdateProjectDataCachePasswordProtection { + if o == nil { + return nil + } + return o.PasswordProtection +} + +func (o *UpdateProjectDataCacheResponseBody) GetProductionDeploymentsFastLane() *bool { + if o == nil { + return nil + } + return o.ProductionDeploymentsFastLane +} + +func (o *UpdateProjectDataCacheResponseBody) GetPublicSource() *bool { + if o == nil { + return nil + } + return o.PublicSource +} + +func (o *UpdateProjectDataCacheResponseBody) GetResourceConfig() *ResourceConfig { + if o == nil { + return nil + } + return o.ResourceConfig +} + +func (o *UpdateProjectDataCacheResponseBody) GetRootDirectory() *string { + if o == nil { + return nil + } + return o.RootDirectory +} + +func (o *UpdateProjectDataCacheResponseBody) GetServerlessFunctionRegion() *string { + if o == nil { + return nil + } + return o.ServerlessFunctionRegion +} + +func (o *UpdateProjectDataCacheResponseBody) GetServerlessFunctionZeroConfigFailover() *bool { + if o == nil { + return nil + } + return o.ServerlessFunctionZeroConfigFailover +} + +func (o *UpdateProjectDataCacheResponseBody) GetSkewProtectionBoundaryAt() *float64 { + if o == nil { + return nil + } + return o.SkewProtectionBoundaryAt +} + +func (o *UpdateProjectDataCacheResponseBody) GetSkewProtectionMaxAge() *float64 { + if o == nil { + return nil + } + return o.SkewProtectionMaxAge +} + +func (o *UpdateProjectDataCacheResponseBody) GetSkipGitConnectDuringLink() *bool { + if o == nil { + return nil + } + return o.SkipGitConnectDuringLink +} + +func (o *UpdateProjectDataCacheResponseBody) GetSourceFilesOutsideRootDirectory() *bool { + if o == nil { + return nil + } + return o.SourceFilesOutsideRootDirectory +} + +func (o *UpdateProjectDataCacheResponseBody) GetEnableAffectedProjectsDeployments() *bool { + if o == nil { + return nil + } + return o.EnableAffectedProjectsDeployments +} + +func (o *UpdateProjectDataCacheResponseBody) GetSsoProtection() *UpdateProjectDataCacheSsoProtection { + if o == nil { + return nil + } + return o.SsoProtection +} + +func (o *UpdateProjectDataCacheResponseBody) GetTargets() map[string]Targets { + if o == nil { + return nil + } + return o.Targets +} + +func (o *UpdateProjectDataCacheResponseBody) GetTransferCompletedAt() *float64 { + if o == nil { + return nil + } + return o.TransferCompletedAt +} + +func (o *UpdateProjectDataCacheResponseBody) GetTransferStartedAt() *float64 { + if o == nil { + return nil + } + return o.TransferStartedAt +} + +func (o *UpdateProjectDataCacheResponseBody) GetTransferToAccountID() *string { + if o == nil { + return nil + } + return o.TransferToAccountID +} + +func (o *UpdateProjectDataCacheResponseBody) GetTransferredFromAccountID() *string { + if o == nil { + return nil + } + return o.TransferredFromAccountID +} + +func (o *UpdateProjectDataCacheResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *UpdateProjectDataCacheResponseBody) GetLive() *bool { + if o == nil { + return nil + } + return o.Live +} + +func (o *UpdateProjectDataCacheResponseBody) GetEnablePreviewFeedback() *bool { + if o == nil { + return nil + } + return o.EnablePreviewFeedback +} + +func (o *UpdateProjectDataCacheResponseBody) GetEnableProductionFeedback() *bool { + if o == nil { + return nil + } + return o.EnableProductionFeedback +} + +func (o *UpdateProjectDataCacheResponseBody) GetPermissions() *Permissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *UpdateProjectDataCacheResponseBody) GetLastRollbackTarget() *LastRollbackTarget { + if o == nil { + return nil + } + return o.LastRollbackTarget +} + +func (o *UpdateProjectDataCacheResponseBody) GetLastAliasRequest() *LastAliasRequest { + if o == nil { + return nil + } + return o.LastAliasRequest +} + +func (o *UpdateProjectDataCacheResponseBody) GetHasFloatingAliases() *bool { + if o == nil { + return nil + } + return o.HasFloatingAliases +} + +func (o *UpdateProjectDataCacheResponseBody) GetProtectionBypass() map[string]ProtectionBypass { + if o == nil { + return nil + } + return o.ProtectionBypass +} + +func (o *UpdateProjectDataCacheResponseBody) GetHasActiveBranches() *bool { + if o == nil { + return nil + } + return o.HasActiveBranches +} + +func (o *UpdateProjectDataCacheResponseBody) GetTrustedIps() *UpdateProjectDataCacheTrustedIps { + if o == nil { + return nil + } + return o.TrustedIps +} + +func (o *UpdateProjectDataCacheResponseBody) GetGitComments() *GitComments { + if o == nil { + return nil + } + return o.GitComments +} + +func (o *UpdateProjectDataCacheResponseBody) GetPaused() *bool { + if o == nil { + return nil + } + return o.Paused +} + +func (o *UpdateProjectDataCacheResponseBody) GetConcurrencyBucketName() *string { + if o == nil { + return nil + } + return o.ConcurrencyBucketName +} + +func (o *UpdateProjectDataCacheResponseBody) GetWebAnalytics() *WebAnalytics { + if o == nil { + return nil + } + return o.WebAnalytics +} + +func (o *UpdateProjectDataCacheResponseBody) GetSecurity() *Security { + if o == nil { + return nil + } + return o.Security +} + +func (o *UpdateProjectDataCacheResponseBody) GetOidcTokenConfig() *UpdateProjectDataCacheOidcTokenConfig { + if o == nil { + return nil + } + return o.OidcTokenConfig +} + +func (o *UpdateProjectDataCacheResponseBody) GetTier() *Tier { + if o == nil { + return nil + } + return o.Tier +} + +type UpdateProjectDataCacheResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateProjectDataCacheResponseBody +} + +func (o *UpdateProjectDataCacheResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateProjectDataCacheResponse) GetObject() *UpdateProjectDataCacheResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectdomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectdomain.go new file mode 100644 index 00000000..60c62ae4 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectdomain.go @@ -0,0 +1,269 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// RedirectStatusCode - Status code for domain redirect +type RedirectStatusCode int64 + +const ( + RedirectStatusCodeThreeHundredAndOne RedirectStatusCode = 301 + RedirectStatusCodeThreeHundredAndTwo RedirectStatusCode = 302 + RedirectStatusCodeThreeHundredAndSeven RedirectStatusCode = 307 + RedirectStatusCodeThreeHundredAndEight RedirectStatusCode = 308 +) + +func (e RedirectStatusCode) ToPointer() *RedirectStatusCode { + return &e +} +func (e *RedirectStatusCode) UnmarshalJSON(data []byte) error { + var v int64 + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case 301: + fallthrough + case 302: + fallthrough + case 307: + fallthrough + case 308: + *e = RedirectStatusCode(v) + return nil + default: + return fmt.Errorf("invalid value for RedirectStatusCode: %v", v) + } +} + +type UpdateProjectDomainRequestBody struct { + // Git branch to link the project domain + GitBranch *string `json:"gitBranch,omitempty"` + // Target destination domain for redirect + Redirect *string `json:"redirect,omitempty"` + // Status code for domain redirect + RedirectStatusCode *RedirectStatusCode `json:"redirectStatusCode,omitempty"` +} + +func (o *UpdateProjectDomainRequestBody) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *UpdateProjectDomainRequestBody) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *UpdateProjectDomainRequestBody) GetRedirectStatusCode() *RedirectStatusCode { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +type UpdateProjectDomainRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The project domain name + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateProjectDomainRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateProjectDomainRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *UpdateProjectDomainRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *UpdateProjectDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateProjectDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateProjectDomainRequest) GetRequestBody() UpdateProjectDomainRequestBody { + if o == nil { + return UpdateProjectDomainRequestBody{} + } + return o.RequestBody +} + +// UpdateProjectDomainVerification - A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. +type UpdateProjectDomainVerification struct { + Type string `json:"type"` + Domain string `json:"domain"` + Value string `json:"value"` + Reason string `json:"reason"` +} + +func (o *UpdateProjectDomainVerification) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *UpdateProjectDomainVerification) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *UpdateProjectDomainVerification) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *UpdateProjectDomainVerification) GetReason() string { + if o == nil { + return "" + } + return o.Reason +} + +// UpdateProjectDomainResponseBody - The domain was updated successfuly +type UpdateProjectDomainResponseBody struct { + Name string `json:"name"` + ApexName string `json:"apexName"` + ProjectID string `json:"projectId"` + Redirect *string `json:"redirect,omitempty"` + RedirectStatusCode *float64 `json:"redirectStatusCode,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + CustomEnvironmentID *string `json:"customEnvironmentId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + // `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. + Verified bool `json:"verified"` + // A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. + Verification []UpdateProjectDomainVerification `json:"verification,omitempty"` +} + +func (o *UpdateProjectDomainResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateProjectDomainResponseBody) GetApexName() string { + if o == nil { + return "" + } + return o.ApexName +} + +func (o *UpdateProjectDomainResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateProjectDomainResponseBody) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *UpdateProjectDomainResponseBody) GetRedirectStatusCode() *float64 { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +func (o *UpdateProjectDomainResponseBody) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *UpdateProjectDomainResponseBody) GetCustomEnvironmentID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentID +} + +func (o *UpdateProjectDomainResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *UpdateProjectDomainResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateProjectDomainResponseBody) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +func (o *UpdateProjectDomainResponseBody) GetVerification() []UpdateProjectDomainVerification { + if o == nil { + return nil + } + return o.Verification +} + +type UpdateProjectDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The domain was updated successfuly + Object *UpdateProjectDomainResponseBody +} + +func (o *UpdateProjectDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateProjectDomainResponse) GetObject() *UpdateProjectDomainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectprotectionbypass.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectprotectionbypass.go new file mode 100644 index 00000000..bcd1a66f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateprojectprotectionbypass.go @@ -0,0 +1,183 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// Revoke - Optional instructions for revoking and regenerating a automation bypass +type Revoke struct { + // Automation bypass to revoked + Secret string `json:"secret"` + // Whether or not a new automation bypass should be created after the provided secret is revoked + Regenerate bool `json:"regenerate"` +} + +func (o *Revoke) GetSecret() string { + if o == nil { + return "" + } + return o.Secret +} + +func (o *Revoke) GetRegenerate() bool { + if o == nil { + return false + } + return o.Regenerate +} + +// Generate a new secret. If neither generate or revoke are provided, a new random secret will be generated. +type Generate struct { + // Optional value of the secret to generate + Secret *string `json:"secret,omitempty"` +} + +func (o *Generate) GetSecret() *string { + if o == nil { + return nil + } + return o.Secret +} + +type UpdateProjectProtectionBypassRequestBody struct { + // Optional instructions for revoking and regenerating a automation bypass + Revoke *Revoke `json:"revoke,omitempty"` + // Generate a new secret. If neither generate or revoke are provided, a new random secret will be generated. + Generate *Generate `json:"generate,omitempty"` +} + +func (o *UpdateProjectProtectionBypassRequestBody) GetRevoke() *Revoke { + if o == nil { + return nil + } + return o.Revoke +} + +func (o *UpdateProjectProtectionBypassRequestBody) GetGenerate() *Generate { + if o == nil { + return nil + } + return o.Generate +} + +type UpdateProjectProtectionBypassRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateProjectProtectionBypassRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateProjectProtectionBypassRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *UpdateProjectProtectionBypassRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateProjectProtectionBypassRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateProjectProtectionBypassRequest) GetRequestBody() UpdateProjectProtectionBypassRequestBody { + if o == nil { + return UpdateProjectProtectionBypassRequestBody{} + } + return o.RequestBody +} + +type UpdateProjectProtectionBypassScope string + +const ( + UpdateProjectProtectionBypassScopeAutomationBypass UpdateProjectProtectionBypassScope = "automation-bypass" +) + +func (e UpdateProjectProtectionBypassScope) ToPointer() *UpdateProjectProtectionBypassScope { + return &e +} +func (e *UpdateProjectProtectionBypassScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "automation-bypass": + *e = UpdateProjectProtectionBypassScope(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateProjectProtectionBypassScope: %v", v) + } +} + +type UpdateProjectProtectionBypassProtectionBypass struct { + CreatedAt float64 `json:"createdAt"` + CreatedBy string `json:"createdBy"` + Scope UpdateProjectProtectionBypassScope `json:"scope"` +} + +func (o *UpdateProjectProtectionBypassProtectionBypass) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *UpdateProjectProtectionBypassProtectionBypass) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *UpdateProjectProtectionBypassProtectionBypass) GetScope() UpdateProjectProtectionBypassScope { + if o == nil { + return UpdateProjectProtectionBypassScope("") + } + return o.Scope +} + +type UpdateProjectProtectionBypassResponseBody struct { + ProtectionBypass map[string]UpdateProjectProtectionBypassProtectionBypass `json:"protectionBypass,omitempty"` +} + +func (o *UpdateProjectProtectionBypassResponseBody) GetProtectionBypass() map[string]UpdateProjectProtectionBypassProtectionBypass { + if o == nil { + return nil + } + return o.ProtectionBypass +} + +type UpdateProjectProtectionBypassResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateProjectProtectionBypassResponseBody +} + +func (o *UpdateProjectProtectionBypassResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateProjectProtectionBypassResponse) GetObject() *UpdateProjectProtectionBypassResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updaterecord.go b/src/__tests__/mockserver/internal/sdk/models/operations/updaterecord.go new file mode 100644 index 00000000..3b5bb196 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updaterecord.go @@ -0,0 +1,411 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" +) + +// UpdateRecordType - The type of the DNS record +type UpdateRecordType string + +const ( + UpdateRecordTypeA UpdateRecordType = "A" + UpdateRecordTypeAaaa UpdateRecordType = "AAAA" + UpdateRecordTypeAlias UpdateRecordType = "ALIAS" + UpdateRecordTypeCaa UpdateRecordType = "CAA" + UpdateRecordTypeCname UpdateRecordType = "CNAME" + UpdateRecordTypeHTTPS UpdateRecordType = "HTTPS" + UpdateRecordTypeMx UpdateRecordType = "MX" + UpdateRecordTypeSrv UpdateRecordType = "SRV" + UpdateRecordTypeTxt UpdateRecordType = "TXT" + UpdateRecordTypeNs UpdateRecordType = "NS" +) + +func (e UpdateRecordType) ToPointer() *UpdateRecordType { + return &e +} +func (e *UpdateRecordType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = UpdateRecordType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateRecordType: %v", v) + } +} + +type Srv struct { + Target *string `json:"target"` + Weight *int64 `json:"weight"` + Port *int64 `json:"port"` + Priority *int64 `json:"priority"` +} + +func (o *Srv) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *Srv) GetWeight() *int64 { + if o == nil { + return nil + } + return o.Weight +} + +func (o *Srv) GetPort() *int64 { + if o == nil { + return nil + } + return o.Port +} + +func (o *Srv) GetPriority() *int64 { + if o == nil { + return nil + } + return o.Priority +} + +type HTTPS struct { + Priority *int64 `json:"priority"` + Target *string `json:"target"` + Params *string `json:"params,omitempty"` +} + +func (o *HTTPS) GetPriority() *int64 { + if o == nil { + return nil + } + return o.Priority +} + +func (o *HTTPS) GetTarget() *string { + if o == nil { + return nil + } + return o.Target +} + +func (o *HTTPS) GetParams() *string { + if o == nil { + return nil + } + return o.Params +} + +type UpdateRecordRequestBody struct { + // The name of the DNS record + Name *string `json:"name,omitempty"` + // The value of the DNS record + Value *string `json:"value,omitempty"` + // The type of the DNS record + Type *UpdateRecordType `json:"type,omitempty"` + // The Time to live (TTL) value of the DNS record + TTL *int64 `json:"ttl,omitempty"` + // The MX priority value of the DNS record + MxPriority *int64 `json:"mxPriority,omitempty"` + Srv *Srv `json:"srv,omitempty"` + HTTPS *HTTPS `json:"https,omitempty"` + // A comment to add context on what this DNS record is for + Comment *string `json:"comment,omitempty"` +} + +func (o *UpdateRecordRequestBody) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *UpdateRecordRequestBody) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *UpdateRecordRequestBody) GetType() *UpdateRecordType { + if o == nil { + return nil + } + return o.Type +} + +func (o *UpdateRecordRequestBody) GetTTL() *int64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *UpdateRecordRequestBody) GetMxPriority() *int64 { + if o == nil { + return nil + } + return o.MxPriority +} + +func (o *UpdateRecordRequestBody) GetSrv() *Srv { + if o == nil { + return nil + } + return o.Srv +} + +func (o *UpdateRecordRequestBody) GetHTTPS() *HTTPS { + if o == nil { + return nil + } + return o.HTTPS +} + +func (o *UpdateRecordRequestBody) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +type UpdateRecordRequest struct { + // The id of the DNS record + RecordID string `pathParam:"style=simple,explode=false,name=recordId"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UpdateRecordRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateRecordRequest) GetRecordID() string { + if o == nil { + return "" + } + return o.RecordID +} + +func (o *UpdateRecordRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UpdateRecordRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UpdateRecordRequest) GetRequestBody() UpdateRecordRequestBody { + if o == nil { + return UpdateRecordRequestBody{} + } + return o.RequestBody +} + +type RecordType string + +const ( + RecordTypeA RecordType = "A" + RecordTypeAaaa RecordType = "AAAA" + RecordTypeAlias RecordType = "ALIAS" + RecordTypeCaa RecordType = "CAA" + RecordTypeCname RecordType = "CNAME" + RecordTypeHTTPS RecordType = "HTTPS" + RecordTypeMx RecordType = "MX" + RecordTypeSrv RecordType = "SRV" + RecordTypeTxt RecordType = "TXT" + RecordTypeNs RecordType = "NS" +) + +func (e RecordType) ToPointer() *RecordType { + return &e +} +func (e *RecordType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "A": + fallthrough + case "AAAA": + fallthrough + case "ALIAS": + fallthrough + case "CAA": + fallthrough + case "CNAME": + fallthrough + case "HTTPS": + fallthrough + case "MX": + fallthrough + case "SRV": + fallthrough + case "TXT": + fallthrough + case "NS": + *e = RecordType(v) + return nil + default: + return fmt.Errorf("invalid value for RecordType: %v", v) + } +} + +type UpdateRecordDNSType string + +const ( + UpdateRecordDNSTypeRecord UpdateRecordDNSType = "record" + UpdateRecordDNSTypeRecordSys UpdateRecordDNSType = "record-sys" +) + +func (e UpdateRecordDNSType) ToPointer() *UpdateRecordDNSType { + return &e +} +func (e *UpdateRecordDNSType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "record": + fallthrough + case "record-sys": + *e = UpdateRecordDNSType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateRecordDNSType: %v", v) + } +} + +type UpdateRecordResponseBody struct { + CreatedAt *float64 `json:"createdAt,omitempty"` + Creator string `json:"creator"` + Domain string `json:"domain"` + ID string `json:"id"` + Name string `json:"name"` + RecordType RecordType `json:"recordType"` + TTL *float64 `json:"ttl,omitempty"` + Type UpdateRecordDNSType `json:"type"` + Value string `json:"value"` + Comment *string `json:"comment,omitempty"` +} + +func (o *UpdateRecordResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *UpdateRecordResponseBody) GetCreator() string { + if o == nil { + return "" + } + return o.Creator +} + +func (o *UpdateRecordResponseBody) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *UpdateRecordResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdateRecordResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateRecordResponseBody) GetRecordType() RecordType { + if o == nil { + return RecordType("") + } + return o.RecordType +} + +func (o *UpdateRecordResponseBody) GetTTL() *float64 { + if o == nil { + return nil + } + return o.TTL +} + +func (o *UpdateRecordResponseBody) GetType() UpdateRecordDNSType { + if o == nil { + return UpdateRecordDNSType("") + } + return o.Type +} + +func (o *UpdateRecordResponseBody) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *UpdateRecordResponseBody) GetComment() *string { + if o == nil { + return nil + } + return o.Comment +} + +type UpdateRecordResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UpdateRecordResponseBody +} + +func (o *UpdateRecordResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateRecordResponse) GetObject() *UpdateRecordResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateresourcesecrets.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateresourcesecrets.go new file mode 100644 index 00000000..3720f291 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateresourcesecrets.go @@ -0,0 +1,91 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type Secrets struct { + Name string `json:"name"` + Value string `json:"value"` + Prefix *string `json:"prefix,omitempty"` +} + +func (o *Secrets) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Secrets) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *Secrets) GetPrefix() *string { + if o == nil { + return nil + } + return o.Prefix +} + +type UpdateResourceSecretsRequestBody struct { + Secrets []Secrets `json:"secrets"` +} + +func (o *UpdateResourceSecretsRequestBody) GetSecrets() []Secrets { + if o == nil { + return []Secrets{} + } + return o.Secrets +} + +type UpdateResourceSecretsRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` + IntegrationProductIDOrSlug string `pathParam:"style=simple,explode=false,name=integrationProductIdOrSlug"` + ResourceID string `pathParam:"style=simple,explode=false,name=resourceId"` + RequestBody UpdateResourceSecretsRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateResourceSecretsRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +func (o *UpdateResourceSecretsRequest) GetIntegrationProductIDOrSlug() string { + if o == nil { + return "" + } + return o.IntegrationProductIDOrSlug +} + +func (o *UpdateResourceSecretsRequest) GetResourceID() string { + if o == nil { + return "" + } + return o.ResourceID +} + +func (o *UpdateResourceSecretsRequest) GetRequestBody() UpdateResourceSecretsRequestBody { + if o == nil { + return UpdateResourceSecretsRequestBody{} + } + return o.RequestBody +} + +type UpdateResourceSecretsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *UpdateResourceSecretsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateresourcesecretsbyid.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateresourcesecretsbyid.go new file mode 100644 index 00000000..f811b064 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateresourcesecretsbyid.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UpdateResourceSecretsByIDSecrets struct { + Name string `json:"name"` + Value string `json:"value"` + Prefix *string `json:"prefix,omitempty"` +} + +func (o *UpdateResourceSecretsByIDSecrets) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *UpdateResourceSecretsByIDSecrets) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *UpdateResourceSecretsByIDSecrets) GetPrefix() *string { + if o == nil { + return nil + } + return o.Prefix +} + +type UpdateResourceSecretsByIDRequestBody struct { + Secrets []UpdateResourceSecretsByIDSecrets `json:"secrets"` +} + +func (o *UpdateResourceSecretsByIDRequestBody) GetSecrets() []UpdateResourceSecretsByIDSecrets { + if o == nil { + return []UpdateResourceSecretsByIDSecrets{} + } + return o.Secrets +} + +type UpdateResourceSecretsByIDRequest struct { + IntegrationConfigurationID string `pathParam:"style=simple,explode=false,name=integrationConfigurationId"` + ResourceID string `pathParam:"style=simple,explode=false,name=resourceId"` + RequestBody *UpdateResourceSecretsByIDRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateResourceSecretsByIDRequest) GetIntegrationConfigurationID() string { + if o == nil { + return "" + } + return o.IntegrationConfigurationID +} + +func (o *UpdateResourceSecretsByIDRequest) GetResourceID() string { + if o == nil { + return "" + } + return o.ResourceID +} + +func (o *UpdateResourceSecretsByIDRequest) GetRequestBody() *UpdateResourceSecretsByIDRequestBody { + if o == nil { + return nil + } + return o.RequestBody +} + +type UpdateResourceSecretsByIDResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *UpdateResourceSecretsByIDResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/updateteammember.go b/src/__tests__/mockserver/internal/sdk/models/operations/updateteammember.go new file mode 100644 index 00000000..f31b4981 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/updateteammember.go @@ -0,0 +1,181 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +// UpdateTeamMemberRole - The project role of the member that will be added. \"null\" will remove this project level role. +type UpdateTeamMemberRole string + +const ( + UpdateTeamMemberRoleAdmin UpdateTeamMemberRole = "ADMIN" + UpdateTeamMemberRoleProjectViewer UpdateTeamMemberRole = "PROJECT_VIEWER" + UpdateTeamMemberRoleProjectDeveloper UpdateTeamMemberRole = "PROJECT_DEVELOPER" +) + +func (e UpdateTeamMemberRole) ToPointer() *UpdateTeamMemberRole { + return &e +} +func (e *UpdateTeamMemberRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADMIN": + fallthrough + case "PROJECT_VIEWER": + fallthrough + case "PROJECT_DEVELOPER": + *e = UpdateTeamMemberRole(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateTeamMemberRole: %v", v) + } +} + +type UpdateTeamMemberProjects struct { + // The ID of the project. + ProjectID string `json:"projectId"` + // The project role of the member that will be added. \"null\" will remove this project level role. + Role *UpdateTeamMemberRole `json:"role"` +} + +func (o *UpdateTeamMemberProjects) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *UpdateTeamMemberProjects) GetRole() *UpdateTeamMemberRole { + if o == nil { + return nil + } + return o.Role +} + +type UpdateTeamMemberJoinedFrom struct { + SsoUserID any `json:"ssoUserId,omitempty"` +} + +func (o *UpdateTeamMemberJoinedFrom) GetSsoUserID() any { + if o == nil { + return nil + } + return o.SsoUserID +} + +type UpdateTeamMemberRequestBody struct { + // Accept a user who requested access to the team. + Confirmed *bool `json:"confirmed,omitempty"` + // The role in the team of the member. + Role *string `default:"MEMBER" json:"role"` + Projects []UpdateTeamMemberProjects `json:"projects,omitempty"` + JoinedFrom *UpdateTeamMemberJoinedFrom `json:"joinedFrom,omitempty"` +} + +func (u UpdateTeamMemberRequestBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(u, "", false) +} + +func (u *UpdateTeamMemberRequestBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &u, "", false, false); err != nil { + return err + } + return nil +} + +func (o *UpdateTeamMemberRequestBody) GetConfirmed() *bool { + if o == nil { + return nil + } + return o.Confirmed +} + +func (o *UpdateTeamMemberRequestBody) GetRole() *string { + if o == nil { + return nil + } + return o.Role +} + +func (o *UpdateTeamMemberRequestBody) GetProjects() []UpdateTeamMemberProjects { + if o == nil { + return nil + } + return o.Projects +} + +func (o *UpdateTeamMemberRequestBody) GetJoinedFrom() *UpdateTeamMemberJoinedFrom { + if o == nil { + return nil + } + return o.JoinedFrom +} + +type UpdateTeamMemberRequest struct { + // The ID of the member. + UID string `pathParam:"style=simple,explode=false,name=uid"` + TeamID string `pathParam:"style=simple,explode=false,name=teamId"` + RequestBody UpdateTeamMemberRequestBody `request:"mediaType=application/json"` +} + +func (o *UpdateTeamMemberRequest) GetUID() string { + if o == nil { + return "" + } + return o.UID +} + +func (o *UpdateTeamMemberRequest) GetTeamID() string { + if o == nil { + return "" + } + return o.TeamID +} + +func (o *UpdateTeamMemberRequest) GetRequestBody() UpdateTeamMemberRequestBody { + if o == nil { + return UpdateTeamMemberRequestBody{} + } + return o.RequestBody +} + +// UpdateTeamMemberResponseBody - Successfully updated the membership. +type UpdateTeamMemberResponseBody struct { + // ID of the team. + ID string `json:"id"` +} + +func (o *UpdateTeamMemberResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type UpdateTeamMemberResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successfully updated the membership. + Object *UpdateTeamMemberResponseBody +} + +func (o *UpdateTeamMemberResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateTeamMemberResponse) GetObject() *UpdateTeamMemberResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/uploadartifact.go b/src/__tests__/mockserver/internal/sdk/models/operations/uploadartifact.go new file mode 100644 index 00000000..bfc2d3b7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/uploadartifact.go @@ -0,0 +1,124 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "io" + "mockserver/internal/sdk/models/components" +) + +type UploadArtifactRequest struct { + // The artifact size in bytes + ContentLength float64 `header:"style=simple,explode=false,name=Content-Length"` + // The time taken to generate the uploaded artifact in milliseconds. + XArtifactDuration *float64 `header:"style=simple,explode=false,name=x-artifact-duration"` + // The continuous integration or delivery environment where this artifact was generated. + XArtifactClientCi *string `header:"style=simple,explode=false,name=x-artifact-client-ci"` + // 1 if the client is an interactive shell. Otherwise 0 + XArtifactClientInteractive *int64 `header:"style=simple,explode=false,name=x-artifact-client-interactive"` + // The base64 encoded tag for this artifact. The value is sent back to clients when the artifact is downloaded as the header `x-artifact-tag` + XArtifactTag *string `header:"style=simple,explode=false,name=x-artifact-tag"` + // The artifact hash + Hash string `pathParam:"style=simple,explode=false,name=hash"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody io.Reader `request:"mediaType=application/octet-stream"` +} + +func (o *UploadArtifactRequest) GetContentLength() float64 { + if o == nil { + return 0.0 + } + return o.ContentLength +} + +func (o *UploadArtifactRequest) GetXArtifactDuration() *float64 { + if o == nil { + return nil + } + return o.XArtifactDuration +} + +func (o *UploadArtifactRequest) GetXArtifactClientCi() *string { + if o == nil { + return nil + } + return o.XArtifactClientCi +} + +func (o *UploadArtifactRequest) GetXArtifactClientInteractive() *int64 { + if o == nil { + return nil + } + return o.XArtifactClientInteractive +} + +func (o *UploadArtifactRequest) GetXArtifactTag() *string { + if o == nil { + return nil + } + return o.XArtifactTag +} + +func (o *UploadArtifactRequest) GetHash() string { + if o == nil { + return "" + } + return o.Hash +} + +func (o *UploadArtifactRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UploadArtifactRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UploadArtifactRequest) GetRequestBody() io.Reader { + if o == nil { + return nil + } + return o.RequestBody +} + +// UploadArtifactResponseBody - File successfully uploaded +type UploadArtifactResponseBody struct { + // Array of URLs where the artifact was updated + Urls []string `json:"urls"` +} + +func (o *UploadArtifactResponseBody) GetUrls() []string { + if o == nil { + return []string{} + } + return o.Urls +} + +type UploadArtifactResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // File successfully uploaded + Object *UploadArtifactResponseBody +} + +func (o *UploadArtifactResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UploadArtifactResponse) GetObject() *UploadArtifactResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/uploadcert.go b/src/__tests__/mockserver/internal/sdk/models/operations/uploadcert.go new file mode 100644 index 00000000..b6fe026c --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/uploadcert.go @@ -0,0 +1,137 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UploadCertRequestBody struct { + // The certificate authority + Ca string `json:"ca"` + // The certificate key + Key string `json:"key"` + // The certificate + Cert string `json:"cert"` + // Skip validation of the certificate + SkipValidation *bool `json:"skipValidation,omitempty"` +} + +func (o *UploadCertRequestBody) GetCa() string { + if o == nil { + return "" + } + return o.Ca +} + +func (o *UploadCertRequestBody) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +func (o *UploadCertRequestBody) GetCert() string { + if o == nil { + return "" + } + return o.Cert +} + +func (o *UploadCertRequestBody) GetSkipValidation() *bool { + if o == nil { + return nil + } + return o.SkipValidation +} + +type UploadCertRequest struct { + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` + RequestBody UploadCertRequestBody `request:"mediaType=application/json"` +} + +func (o *UploadCertRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UploadCertRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +func (o *UploadCertRequest) GetRequestBody() UploadCertRequestBody { + if o == nil { + return UploadCertRequestBody{} + } + return o.RequestBody +} + +type UploadCertResponseBody struct { + ID string `json:"id"` + CreatedAt float64 `json:"createdAt"` + ExpiresAt float64 `json:"expiresAt"` + AutoRenew bool `json:"autoRenew"` + Cns []string `json:"cns"` +} + +func (o *UploadCertResponseBody) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UploadCertResponseBody) GetCreatedAt() float64 { + if o == nil { + return 0.0 + } + return o.CreatedAt +} + +func (o *UploadCertResponseBody) GetExpiresAt() float64 { + if o == nil { + return 0.0 + } + return o.ExpiresAt +} + +func (o *UploadCertResponseBody) GetAutoRenew() bool { + if o == nil { + return false + } + return o.AutoRenew +} + +func (o *UploadCertResponseBody) GetCns() []string { + if o == nil { + return []string{} + } + return o.Cns +} + +type UploadCertResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + Object *UploadCertResponseBody +} + +func (o *UploadCertResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UploadCertResponse) GetObject() *UploadCertResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/uploadfile.go b/src/__tests__/mockserver/internal/sdk/models/operations/uploadfile.go new file mode 100644 index 00000000..5e5169aa --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/uploadfile.go @@ -0,0 +1,168 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type UploadFileRequest struct { + // The file size in bytes + ContentLength *float64 `header:"style=simple,explode=false,name=Content-Length"` + // The file SHA1 used to check the integrity + XVercelDigest *string `header:"style=simple,explode=false,name=x-vercel-digest"` + // The file SHA1 used to check the integrity + XNowDigest *string `header:"style=simple,explode=false,name=x-now-digest"` + // The file size as an alternative to `Content-Length` + XNowSize *float64 `header:"style=simple,explode=false,name=x-now-size"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *UploadFileRequest) GetContentLength() *float64 { + if o == nil { + return nil + } + return o.ContentLength +} + +func (o *UploadFileRequest) GetXVercelDigest() *string { + if o == nil { + return nil + } + return o.XVercelDigest +} + +func (o *UploadFileRequest) GetXNowDigest() *string { + if o == nil { + return nil + } + return o.XNowDigest +} + +func (o *UploadFileRequest) GetXNowSize() *float64 { + if o == nil { + return nil + } + return o.XNowSize +} + +func (o *UploadFileRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *UploadFileRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +type UploadFileResponseBody2 struct { +} + +type UploadFileResponseBody1 struct { + // Array of URLs where the file was updated + Urls []string `json:"urls"` +} + +func (o *UploadFileResponseBody1) GetUrls() []string { + if o == nil { + return []string{} + } + return o.Urls +} + +type UploadFileResponseBodyType string + +const ( + UploadFileResponseBodyTypeUploadFileResponseBody1 UploadFileResponseBodyType = "uploadFile_responseBody_1" + UploadFileResponseBodyTypeUploadFileResponseBody2 UploadFileResponseBodyType = "uploadFile_responseBody_2" +) + +// UploadFileResponseBody - File already uploaded +// File successfully uploaded +type UploadFileResponseBody struct { + UploadFileResponseBody1 *UploadFileResponseBody1 + UploadFileResponseBody2 *UploadFileResponseBody2 + + Type UploadFileResponseBodyType +} + +func CreateUploadFileResponseBodyUploadFileResponseBody1(uploadFileResponseBody1 UploadFileResponseBody1) UploadFileResponseBody { + typ := UploadFileResponseBodyTypeUploadFileResponseBody1 + + return UploadFileResponseBody{ + UploadFileResponseBody1: &uploadFileResponseBody1, + Type: typ, + } +} + +func CreateUploadFileResponseBodyUploadFileResponseBody2(uploadFileResponseBody2 UploadFileResponseBody2) UploadFileResponseBody { + typ := UploadFileResponseBodyTypeUploadFileResponseBody2 + + return UploadFileResponseBody{ + UploadFileResponseBody2: &uploadFileResponseBody2, + Type: typ, + } +} + +func (u *UploadFileResponseBody) UnmarshalJSON(data []byte) error { + + var uploadFileResponseBody2 UploadFileResponseBody2 = UploadFileResponseBody2{} + if err := utils.UnmarshalJSON(data, &uploadFileResponseBody2, "", true, true); err == nil { + u.UploadFileResponseBody2 = &uploadFileResponseBody2 + u.Type = UploadFileResponseBodyTypeUploadFileResponseBody2 + return nil + } + + var uploadFileResponseBody1 UploadFileResponseBody1 = UploadFileResponseBody1{} + if err := utils.UnmarshalJSON(data, &uploadFileResponseBody1, "", true, true); err == nil { + u.UploadFileResponseBody1 = &uploadFileResponseBody1 + u.Type = UploadFileResponseBodyTypeUploadFileResponseBody1 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for UploadFileResponseBody", string(data)) +} + +func (u UploadFileResponseBody) MarshalJSON() ([]byte, error) { + if u.UploadFileResponseBody1 != nil { + return utils.MarshalJSON(u.UploadFileResponseBody1, "", true) + } + + if u.UploadFileResponseBody2 != nil { + return utils.MarshalJSON(u.UploadFileResponseBody2, "", true) + } + + return nil, errors.New("could not marshal union type UploadFileResponseBody: all fields are null") +} + +type UploadFileResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // File already uploaded + // File successfully uploaded + OneOf *UploadFileResponseBody +} + +func (o *UploadFileResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UploadFileResponse) GetOneOf() *UploadFileResponseBody { + if o == nil { + return nil + } + return o.OneOf +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/verifyprojectdomain.go b/src/__tests__/mockserver/internal/sdk/models/operations/verifyprojectdomain.go new file mode 100644 index 00000000..e393c454 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/verifyprojectdomain.go @@ -0,0 +1,153 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type VerifyProjectDomainRequest struct { + // The unique project identifier or the project name + IDOrName string `pathParam:"style=simple,explode=false,name=idOrName"` + // The domain name you want to verify + Domain string `pathParam:"style=simple,explode=false,name=domain"` + // The Team identifier to perform the request on behalf of. + TeamID *string `queryParam:"style=form,explode=true,name=teamId"` + // The Team slug to perform the request on behalf of. + Slug *string `queryParam:"style=form,explode=true,name=slug"` +} + +func (o *VerifyProjectDomainRequest) GetIDOrName() string { + if o == nil { + return "" + } + return o.IDOrName +} + +func (o *VerifyProjectDomainRequest) GetDomain() string { + if o == nil { + return "" + } + return o.Domain +} + +func (o *VerifyProjectDomainRequest) GetTeamID() *string { + if o == nil { + return nil + } + return o.TeamID +} + +func (o *VerifyProjectDomainRequest) GetSlug() *string { + if o == nil { + return nil + } + return o.Slug +} + +// VerifyProjectDomainResponseBody - The project domain was verified successfully +// Domain is already verified +type VerifyProjectDomainResponseBody struct { + Name string `json:"name"` + ApexName string `json:"apexName"` + ProjectID string `json:"projectId"` + Redirect *string `json:"redirect,omitempty"` + RedirectStatusCode *float64 `json:"redirectStatusCode,omitempty"` + GitBranch *string `json:"gitBranch,omitempty"` + CustomEnvironmentID *string `json:"customEnvironmentId,omitempty"` + UpdatedAt *float64 `json:"updatedAt,omitempty"` + CreatedAt *float64 `json:"createdAt,omitempty"` + // `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. + Verified bool `json:"verified"` +} + +func (o *VerifyProjectDomainResponseBody) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *VerifyProjectDomainResponseBody) GetApexName() string { + if o == nil { + return "" + } + return o.ApexName +} + +func (o *VerifyProjectDomainResponseBody) GetProjectID() string { + if o == nil { + return "" + } + return o.ProjectID +} + +func (o *VerifyProjectDomainResponseBody) GetRedirect() *string { + if o == nil { + return nil + } + return o.Redirect +} + +func (o *VerifyProjectDomainResponseBody) GetRedirectStatusCode() *float64 { + if o == nil { + return nil + } + return o.RedirectStatusCode +} + +func (o *VerifyProjectDomainResponseBody) GetGitBranch() *string { + if o == nil { + return nil + } + return o.GitBranch +} + +func (o *VerifyProjectDomainResponseBody) GetCustomEnvironmentID() *string { + if o == nil { + return nil + } + return o.CustomEnvironmentID +} + +func (o *VerifyProjectDomainResponseBody) GetUpdatedAt() *float64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *VerifyProjectDomainResponseBody) GetCreatedAt() *float64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *VerifyProjectDomainResponseBody) GetVerified() bool { + if o == nil { + return false + } + return o.Verified +} + +type VerifyProjectDomainResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The project domain was verified successfully + // Domain is already verified + Object *VerifyProjectDomainResponseBody +} + +func (o *VerifyProjectDomainResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *VerifyProjectDomainResponse) GetObject() *VerifyProjectDomainResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelbadrequesterror.go b/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelbadrequesterror.go new file mode 100644 index 00000000..38e9c0b0 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelbadrequesterror.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "mockserver/internal/sdk/utils" +) + +type Error struct { + code string `const:"bad_request" json:"code"` + message string `const:"One of the provided values in the request query, body or headers is invalid" json:"message"` +} + +func (e Error) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) +} + +func (e *Error) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Error) GetCode() string { + return "bad_request" +} + +func (o *Error) GetMessage() string { + return "One of the provided values in the request query, body or headers is invalid" +} + +type VercelBadRequestError struct { + Error_ Error `json:"error"` +} + +var _ error = &VercelBadRequestError{} + +func (e *VercelBadRequestError) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelforbiddenerror.go b/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelforbiddenerror.go new file mode 100644 index 00000000..ae5208ad --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelforbiddenerror.go @@ -0,0 +1,46 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "mockserver/internal/sdk/utils" +) + +type VercelForbiddenErrorError struct { + code string `const:"forbidden" json:"code"` + Message string `json:"message"` +} + +func (v VercelForbiddenErrorError) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(v, "", false) +} + +func (v *VercelForbiddenErrorError) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil { + return err + } + return nil +} + +func (o *VercelForbiddenErrorError) GetCode() string { + return "forbidden" +} + +func (o *VercelForbiddenErrorError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +type VercelForbiddenError struct { + Error_ VercelForbiddenErrorError `json:"error"` +} + +var _ error = &VercelForbiddenError{} + +func (e *VercelForbiddenError) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelnotfounderror.go b/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelnotfounderror.go new file mode 100644 index 00000000..83e73371 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelnotfounderror.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "mockserver/internal/sdk/utils" +) + +type VercelNotFoundErrorError struct { + code string `const:"not_found" json:"code"` + message string `const:"The item you requested was not found" json:"message"` +} + +func (v VercelNotFoundErrorError) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(v, "", false) +} + +func (v *VercelNotFoundErrorError) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil { + return err + } + return nil +} + +func (o *VercelNotFoundErrorError) GetCode() string { + return "not_found" +} + +func (o *VercelNotFoundErrorError) GetMessage() string { + return "The item you requested was not found" +} + +type VercelNotFoundError struct { + Error_ VercelNotFoundErrorError `json:"error"` +} + +var _ error = &VercelNotFoundError{} + +func (e *VercelNotFoundError) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelratelimiterror.go b/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelratelimiterror.go new file mode 100644 index 00000000..71757e8e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/sdkerrors/vercelratelimiterror.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type VercelRateLimitErrorError struct { + code string `const:"rate_limited" json:"code"` + Message string `json:"message"` + Limit *components.RateLimitNotice `json:"limit,omitempty"` +} + +func (v VercelRateLimitErrorError) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(v, "", false) +} + +func (v *VercelRateLimitErrorError) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil { + return err + } + return nil +} + +func (o *VercelRateLimitErrorError) GetCode() string { + return "rate_limited" +} + +func (o *VercelRateLimitErrorError) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} + +func (o *VercelRateLimitErrorError) GetLimit() *components.RateLimitNotice { + if o == nil { + return nil + } + return o.Limit +} + +type VercelRateLimitError struct { + Error_ VercelRateLimitErrorError `json:"error"` +} + +var _ error = &VercelRateLimitError{} + +func (e *VercelRateLimitError) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/src/__tests__/mockserver/internal/sdk/types/bigint.go b/src/__tests__/mockserver/internal/sdk/types/bigint.go new file mode 100644 index 00000000..9c6a086d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/types/bigint.go @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "fmt" + "math/big" +) + +// MustNewBigIntFromString returns an instance of big.Int from a string +// The string is assumed to be base 10 and if it is not a valid big.Int +// then the function panics. +// Avoid using this function in production code. +func MustNewBigIntFromString(s string) *big.Int { + i, ok := new(big.Int).SetString(s, 10) + if !ok { + panic(fmt.Errorf("failed to parse string as big.Int")) + } + + return i +} diff --git a/src/__tests__/mockserver/internal/sdk/types/date.go b/src/__tests__/mockserver/internal/sdk/types/date.go new file mode 100644 index 00000000..5b2782f2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/types/date.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "encoding/json" + "fmt" + "strings" + "time" +) + +// Date is a wrapper around time.Time that allows for JSON marshaling a date string formatted as "2006-01-02". +type Date struct { + time.Time +} + +var ( + _ json.Marshaler = &Date{} + _ json.Unmarshaler = &Date{} + _ fmt.Stringer = &Date{} +) + +// NewDate returns an instance of Date from a time.Time. +func NewDate(t time.Time) *Date { + d := DateFromTime(t) + return &d +} + +// DateFromTime returns a Date from a time.Time. +func DateFromTime(t time.Time) Date { + return Date{t} +} + +// NewDateFromString returns an instance of Date from a string formatted as "2006-01-02". +func NewDateFromString(str string) (*Date, error) { + d, err := DateFromString(str) + if err != nil { + return nil, err + } + + return &d, nil +} + +// DateFromString returns a Date from a string formatted as "2006-01-02". +func DateFromString(str string) (Date, error) { + var d Date + var err error + + d.Time, err = time.Parse("2006-01-02", str) + return d, err +} + +// MustNewDateFromString returns an instance of Date from a string formatted as "2006-01-02" or panics. +// Avoid using this function in production code. +func MustNewDateFromString(str string) *Date { + d := MustDateFromString(str) + return &d +} + +// MustDateFromString returns a Date from a string formatted as "2006-01-02" or panics. +// Avoid using this function in production code. +func MustDateFromString(str string) Date { + d, err := DateFromString(str) + if err != nil { + panic(err) + } + return d +} + +func (d Date) GetTime() time.Time { + return d.Time +} + +func (d Date) MarshalJSON() ([]byte, error) { + return []byte(fmt.Sprintf(`"%s"`, d.Time.Format("2006-01-02"))), nil +} + +func (d *Date) UnmarshalJSON(data []byte) error { + var err error + + str := string(data) + str = strings.Trim(str, `"`) + + d.Time, err = time.Parse("2006-01-02", str) + return err +} + +func (d Date) String() string { + return d.Time.Format("2006-01-02") +} diff --git a/src/__tests__/mockserver/internal/sdk/types/datetime.go b/src/__tests__/mockserver/internal/sdk/types/datetime.go new file mode 100644 index 00000000..3eff332d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/types/datetime.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "time" + +// MustTimeFromString returns a time.Time from a string formatted as "2006-01-02T15:04:05Z07:00" or panics. +// Avoid using this function in production code. +func MustTimeFromString(str string) time.Time { + t, err := time.Parse(time.RFC3339, str) + if err != nil { + panic(err) + } + + return t +} + +// MustNewTimeFromString returns an instance of time.Time from a string formatted as "2006-01-02T15:04:05Z07:00" or panics. +// Avoid using this function in production code. +func MustNewTimeFromString(str string) *time.Time { + t := MustTimeFromString(str) + return &t +} diff --git a/src/__tests__/mockserver/internal/sdk/types/decimal.go b/src/__tests__/mockserver/internal/sdk/types/decimal.go new file mode 100644 index 00000000..d8429bc6 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/types/decimal.go @@ -0,0 +1,20 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "fmt" + + "github.com/ericlagergren/decimal" +) + +// MustNewDecimalFromString returns an instance of Decimal from a string +// Avoid using this function in production code. +func MustNewDecimalFromString(s string) *decimal.Big { + d, ok := new(decimal.Big).SetString(s) + if !ok { + panic(fmt.Errorf("failed to parse string as decimal.Big")) + } + + return d +} diff --git a/src/__tests__/mockserver/internal/sdk/types/pointers.go b/src/__tests__/mockserver/internal/sdk/types/pointers.go new file mode 100644 index 00000000..35c439d2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/types/pointers.go @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +func String(s string) *string { return &s } +func Bool(b bool) *bool { return &b } +func Int(i int) *int { return &i } +func Int64(i int64) *int64 { return &i } +func Float32(f float32) *float32 { return &f } +func Float64(f float64) *float64 { return &f } +func Pointer[T any](v T) *T { return &v } diff --git a/src/__tests__/mockserver/internal/sdk/utils/json.go b/src/__tests__/mockserver/internal/sdk/utils/json.go new file mode 100644 index 00000000..f264f1a9 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/utils/json.go @@ -0,0 +1,675 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package utils + +import ( + "bytes" + "encoding/json" + "fmt" + "math/big" + "reflect" + "strconv" + "strings" + "time" + "unsafe" + + "mockserver/internal/sdk/types" + + "github.com/ericlagergren/decimal" +) + +func MarshalJSON(v interface{}, tag reflect.StructTag, topLevel bool) ([]byte, error) { + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + + switch { + case isModelType(typ): + if topLevel { + return json.Marshal(v) + } + + if isNil(typ, val) { + return []byte("null"), nil + } + + out := map[string]json.RawMessage{} + + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + fieldVal := val.Field(i) + + fieldName := field.Name + + omitEmpty := false + jsonTag := field.Tag.Get("json") + if jsonTag != "" { + for _, tag := range strings.Split(jsonTag, ",") { + if tag == "omitempty" { + omitEmpty = true + } else { + fieldName = tag + } + } + } + + if isNil(field.Type, fieldVal) && field.Tag.Get("const") == "" { + if omitEmpty { + continue + } + } + + if !field.IsExported() && field.Tag.Get("const") == "" { + continue + } + + additionalProperties := field.Tag.Get("additionalProperties") + if fieldName == "-" && additionalProperties == "" { + continue + } + + if additionalProperties == "true" { + if isNil(field.Type, fieldVal) { + continue + } + fieldVal := trueReflectValue(fieldVal) + if fieldVal.Type().Kind() != reflect.Map { + return nil, fmt.Errorf("additionalProperties must be a map") + } + + for _, key := range fieldVal.MapKeys() { + r, err := marshalValue(fieldVal.MapIndex(key).Interface(), field.Tag) + if err != nil { + return nil, err + } + + out[key.String()] = r + } + + continue + } + + var fv interface{} + + if field.IsExported() { + fv = fieldVal.Interface() + } else { + pt := reflect.New(typ).Elem() + pt.Set(val) + + pf := pt.Field(i) + + fv = reflect.NewAt(pf.Type(), unsafe.Pointer(pf.UnsafeAddr())).Elem().Interface() + } + + r, err := marshalValue(fv, field.Tag) + if err != nil { + return nil, err + } + + out[fieldName] = r + } + + return json.Marshal(out) + default: + return marshalValue(v, tag) + } +} + +func UnmarshalJSON(b []byte, v interface{}, tag reflect.StructTag, topLevel bool, disallowUnknownFields bool) error { + if reflect.TypeOf(v).Kind() != reflect.Ptr { + return fmt.Errorf("v must be a pointer") + } + + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + + switch { + case isModelType(typ): + if topLevel || bytes.Equal(b, []byte("null")) { + d := json.NewDecoder(bytes.NewReader(b)) + if disallowUnknownFields { + d.DisallowUnknownFields() + } + return d.Decode(v) + } + + var unmarhsaled map[string]json.RawMessage + + if err := json.Unmarshal(b, &unmarhsaled); err != nil { + return err + } + + var additionalPropertiesField *reflect.StructField + var additionalPropertiesValue *reflect.Value + + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + fieldVal := val.Field(i) + + fieldName := field.Name + + jsonTag := field.Tag.Get("json") + if jsonTag != "" { + for _, tag := range strings.Split(jsonTag, ",") { + if tag != "omitempty" { + fieldName = tag + } + } + } + + if field.Tag.Get("additionalProperties") == "true" { + additionalPropertiesField = &field + additionalPropertiesValue = &fieldVal + continue + } + + // If we receive a value for a const field ignore it but mark it as unmarshaled + if field.Tag.Get("const") != "" { + if r, ok := unmarhsaled[fieldName]; ok { + val := string(r) + + if strings.HasPrefix(val, `"`) && strings.HasSuffix(val, `"`) { + var err error + val, err = strconv.Unquote(val) + if err != nil { + return fmt.Errorf("failed to unquote const field `%s` value `%s`: %w", fieldName, val, err) + } + } + constValue := field.Tag.Get("const") + if val != constValue { + return fmt.Errorf("const field `%s` does not match expected value `%s` got `%s`", fieldName, constValue, val) + } + + delete(unmarhsaled, fieldName) + } + } else if !field.IsExported() { + continue + } + + value, ok := unmarhsaled[fieldName] + if !ok { + defaultTag := field.Tag.Get("default") + if defaultTag != "" { + value = handleDefaultConstValue(defaultTag, fieldVal.Interface(), field.Tag) + ok = true + } + } else { + delete(unmarhsaled, fieldName) + } + + if ok { + if err := unmarshalValue(value, fieldVal, field.Tag, disallowUnknownFields); err != nil { + return err + } + } + } + + keys := make([]string, 0, len(unmarhsaled)) + for k := range unmarhsaled { + keys = append(keys, k) + } + + if len(keys) > 0 { + if disallowUnknownFields && (additionalPropertiesField == nil || additionalPropertiesValue == nil) { + return fmt.Errorf("unknown fields: %v", keys) + } + + if additionalPropertiesField != nil && additionalPropertiesValue != nil { + typeOfMap := additionalPropertiesField.Type + if additionalPropertiesValue.Type().Kind() == reflect.Interface { + typeOfMap = reflect.TypeOf(map[string]interface{}{}) + } else if additionalPropertiesValue.Type().Kind() != reflect.Map { + return fmt.Errorf("additionalProperties must be a map") + } + + mapValue := reflect.MakeMap(typeOfMap) + + for key, value := range unmarhsaled { + val := reflect.New(typeOfMap.Elem()) + + if err := unmarshalValue(value, val, additionalPropertiesField.Tag, disallowUnknownFields); err != nil { + return err + } + + if val.Elem().Type().String() == typeOfMap.Elem().String() { + mapValue.SetMapIndex(reflect.ValueOf(key), val.Elem()) + } else { + mapValue.SetMapIndex(reflect.ValueOf(key), trueReflectValue(val)) + } + + } + if additionalPropertiesValue.Type().Kind() == reflect.Interface { + additionalPropertiesValue.Set(mapValue) + } else { + additionalPropertiesValue.Set(mapValue) + } + } + } + default: + return unmarshalValue(b, reflect.ValueOf(v), tag, disallowUnknownFields) + } + + return nil +} + +func marshalValue(v interface{}, tag reflect.StructTag) (json.RawMessage, error) { + constTag := tag.Get("const") + if constTag != "" { + return handleDefaultConstValue(constTag, v, tag), nil + } + + if isNil(reflect.TypeOf(v), reflect.ValueOf(v)) { + defaultTag := tag.Get("default") + if defaultTag != "" { + return handleDefaultConstValue(defaultTag, v, tag), nil + } + + return []byte("null"), nil + } + + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + switch typ.Kind() { + case reflect.Int64: + format := tag.Get("integer") + if format == "string" { + b := val.Interface().(int64) + return []byte(fmt.Sprintf(`"%d"`, b)), nil + } + case reflect.Float64: + format := tag.Get("number") + if format == "string" { + b := val.Interface().(float64) + return []byte(fmt.Sprintf(`"%g"`, b)), nil + } + case reflect.Map: + if isNil(typ, val) { + return []byte("null"), nil + } + + out := map[string]json.RawMessage{} + + for _, key := range val.MapKeys() { + itemVal := val.MapIndex(key) + + if isNil(itemVal.Type(), itemVal) { + out[key.String()] = []byte("null") + continue + } + + r, err := marshalValue(itemVal.Interface(), tag) + if err != nil { + return nil, err + } + + out[key.String()] = r + } + + return json.Marshal(out) + case reflect.Slice, reflect.Array: + if isNil(typ, val) { + return []byte("null"), nil + } + + out := []json.RawMessage{} + + for i := 0; i < val.Len(); i++ { + itemVal := val.Index(i) + + if isNil(itemVal.Type(), itemVal) { + out = append(out, []byte("null")) + continue + } + + r, err := marshalValue(itemVal.Interface(), tag) + if err != nil { + return nil, err + } + + out = append(out, r) + } + + return json.Marshal(out) + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + return []byte(fmt.Sprintf(`"%s"`, val.Interface().(time.Time).Format(time.RFC3339Nano))), nil + case reflect.TypeOf(big.Int{}): + format := tag.Get("bigint") + if format == "string" { + b := val.Interface().(big.Int) + return []byte(fmt.Sprintf(`"%s"`, (&b).String())), nil + } + case reflect.TypeOf(decimal.Big{}): + format := tag.Get("decimal") + if format == "number" { + b := val.Interface().(decimal.Big) + f, ok := (&b).Float64() + if ok { + return []byte(b.String()), nil + } + + return []byte(fmt.Sprintf(`%f`, f)), nil + } + } + } + + return json.Marshal(v) +} + +func handleDefaultConstValue(tagValue string, val interface{}, tag reflect.StructTag) json.RawMessage { + if tagValue == "null" { + return []byte("null") + } + + typ := dereferenceTypePointer(reflect.TypeOf(val)) + switch typ { + case reflect.TypeOf(time.Time{}): + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + case reflect.TypeOf(big.Int{}): + bigIntTag := tag.Get("bigint") + if bigIntTag == "string" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(int64(0)): + format := tag.Get("integer") + if format == "string" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(float64(0)): + format := tag.Get("number") + if format == "string" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(decimal.Big{}): + decimalTag := tag.Get("decimal") + if decimalTag != "number" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(types.Date{}): + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + default: + if typ.Kind() == reflect.String { + return []byte(fmt.Sprintf("%q", tagValue)) + } + } + + return []byte(tagValue) +} + +func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTag, disallowUnknownFields bool) error { + if bytes.Equal(value, []byte("null")) { + if v.CanAddr() { + return json.Unmarshal(value, v.Addr().Interface()) + } else { + return json.Unmarshal(value, v.Interface()) + } + } + + typ := dereferenceTypePointer(v.Type()) + + switch typ.Kind() { + case reflect.Int64: + var b int64 + + format := tag.Get("integer") + if format == "string" { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + var err error + b, err = strconv.ParseInt(s, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse string as int64: %w", err) + } + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(b)) + return nil + } + case reflect.Float64: + var b float64 + + format := tag.Get("number") + if format == "string" { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + var err error + b, err = strconv.ParseFloat(s, 64) + if err != nil { + return fmt.Errorf("failed to parse string as float64: %w", err) + } + + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(b)) + return nil + } + case reflect.Map: + if bytes.Equal(value, []byte("null")) || !isComplexValueType(dereferenceTypePointer(typ.Elem())) { + if v.CanAddr() { + return json.Unmarshal(value, v.Addr().Interface()) + } else { + return json.Unmarshal(value, v.Interface()) + } + } + + var unmarhsaled map[string]json.RawMessage + + if err := json.Unmarshal(value, &unmarhsaled); err != nil { + return err + } + + m := reflect.MakeMap(typ) + + for k, value := range unmarhsaled { + itemVal := reflect.New(typ.Elem()) + + if err := unmarshalValue(value, itemVal, tag, disallowUnknownFields); err != nil { + return err + } + + m.SetMapIndex(reflect.ValueOf(k), itemVal.Elem()) + } + + v.Set(m) + return nil + case reflect.Slice, reflect.Array: + var unmarshaled []json.RawMessage + + if err := json.Unmarshal(value, &unmarshaled); err != nil { + return err + } + + arrVal := reflect.MakeSlice(typ, len(unmarshaled), len(unmarshaled)) + + for index, value := range unmarshaled { + itemVal := reflect.New(typ.Elem()) + + if err := unmarshalValue(value, itemVal, tag, disallowUnknownFields); err != nil { + return err + } + + arrVal.Index(index).Set(itemVal.Elem()) + } + + if v.Kind() == reflect.Pointer { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(arrVal) + return nil + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + t, err := time.Parse(time.RFC3339Nano, s) + if err != nil { + return fmt.Errorf("failed to parse string as time.Time: %w", err) + } + + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(t)) + return nil + case reflect.TypeOf(big.Int{}): + var b *big.Int + + format := tag.Get("bigint") + if format == "string" { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + var ok bool + b, ok = new(big.Int).SetString(s, 10) + if !ok { + return fmt.Errorf("failed to parse string as big.Int") + } + } else { + if err := json.Unmarshal(value, &b); err != nil { + return err + } + } + + if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Ptr { + v = v.Elem() + } + + v.Set(reflect.ValueOf(b)) + return nil + case reflect.TypeOf(decimal.Big{}): + var d *decimal.Big + format := tag.Get("decimal") + if format == "number" { + var ok bool + d, ok = new(decimal.Big).SetString(string(value)) + if !ok { + return fmt.Errorf("failed to parse number as decimal.Big") + } + } else { + if err := json.Unmarshal(value, &d); err != nil { + return err + } + } + + if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Ptr { + v = v.Elem() + } + + v.Set(reflect.ValueOf(d)) + return nil + case reflect.TypeOf(types.Date{}): + var s string + + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + d, err := types.DateFromString(s) + if err != nil { + return fmt.Errorf("failed to parse string as types.Date: %w", err) + } + + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(d)) + return nil + } + } + + var val interface{} + + if v.CanAddr() { + val = v.Addr().Interface() + } else { + val = v.Interface() + } + + d := json.NewDecoder(bytes.NewReader(value)) + if disallowUnknownFields { + d.DisallowUnknownFields() + } + return d.Decode(val) +} + +func dereferencePointers(typ reflect.Type, val reflect.Value) (reflect.Type, reflect.Value) { + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + val = val.Elem() + } else { + return typ, val + } + + return dereferencePointers(typ, val) +} + +func dereferenceTypePointer(typ reflect.Type) reflect.Type { + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } else { + return typ + } + + return dereferenceTypePointer(typ) +} + +func isComplexValueType(typ reflect.Type) bool { + switch typ.Kind() { + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + fallthrough + case reflect.TypeOf(big.Int{}): + fallthrough + case reflect.TypeOf(decimal.Big{}): + fallthrough + case reflect.TypeOf(types.Date{}): + return true + } + } + + return false +} + +func isModelType(typ reflect.Type) bool { + if isComplexValueType(typ) { + return false + } + + if typ.Kind() == reflect.Struct { + return true + } + + return false +} diff --git a/src/__tests__/mockserver/internal/sdk/utils/reflect.go b/src/__tests__/mockserver/internal/sdk/utils/reflect.go new file mode 100644 index 00000000..cde47c89 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/utils/reflect.go @@ -0,0 +1,36 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package utils + +import ( + "reflect" +) + +func isNil(typ reflect.Type, val reflect.Value) bool { + // `reflect.TypeOf(nil) == nil` so calling typ.Kind() will cause a nil pointer + // dereference panic. Catch it and return early. + // https://github.com/golang/go/issues/51649 + // https://github.com/golang/go/issues/54208 + if typ == nil { + return true + } + + if typ.Kind() == reflect.Ptr || typ.Kind() == reflect.Map || typ.Kind() == reflect.Slice || typ.Kind() == reflect.Interface { + return val.IsNil() + } + + return false +} + +func trueReflectValue(val reflect.Value) reflect.Value { + kind := val.Type().Kind() + for kind == reflect.Interface || kind == reflect.Ptr { + innerVal := val.Elem() + if !innerVal.IsValid() { + break + } + val = innerVal + kind = val.Type().Kind() + } + return val +} diff --git a/src/__tests__/mockserver/internal/sdk/utils/sort.go b/src/__tests__/mockserver/internal/sdk/utils/sort.go new file mode 100644 index 00000000..6b265be7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/utils/sort.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package utils + +import ( + "regexp" + "sort" + "strings" +) + +// SortSerializedMaps will sort a given string, []string, or map[string]string +// such that all keys are ordered. This should only be used to simplify testing +// logic. +func SortSerializedMaps(input interface{}, regex string, delim string) interface{} { + sortString := func(input string) string { + r := regexp.MustCompile(regex) + + return replaceAllStringSubmatchFunc(r, input, func(matches []string) string { + result := matches[0] + + for i := 1; i < len(matches); i++ { + match := matches[i] + + pairs := []string{} + if strings.Contains(match, "=") { + pairs = strings.Split(match, delim) + + sort.SliceStable(pairs, func(i, j int) bool { + return strings.Split(pairs[i], "=")[0] < strings.Split(pairs[j], "=")[0] + }) + } else { + values := strings.Split(match, delim) + + if len(values) == 1 { + pairs = values + } else { + pairs = make([]string, len(values)/2) + for i := 0; i < len(values); i += 2 { + pairs[i/2] = values[i] + delim + values[i+1] + } + } + + sort.SliceStable(pairs, func(i, j int) bool { + return strings.Split(pairs[i], delim)[0] < strings.Split(pairs[j], delim)[0] + }) + } + + match = strings.Join(pairs, delim) + + result = strings.Replace(result, matches[i], match, 1) + } + + return result + }) + } + + switch input := input.(type) { + case string: + return sortString(input) + case []string: + for i, v := range input { + input[i] = sortString(v) + } + return input + case map[string]string: + for k, v := range input { + input[k] = sortString(v) + } + return input + default: + panic("unsupported type") + } +} + +func replaceAllStringSubmatchFunc(re *regexp.Regexp, str string, repl func([]string) string) string { + result := "" + lastIndex := 0 + + for _, v := range re.FindAllSubmatchIndex([]byte(str), -1) { + groups := []string{} + for i := 0; i < len(v); i += 2 { + if v[i] == -1 || v[i+1] == -1 { + groups = append(groups, "") + } else { + groups = append(groups, str[v[i]:v[i+1]]) + } + } + + result += str[lastIndex:v[0]] + repl(groups) + lastIndex = v[1] + } + + return result + str[lastIndex:] +} diff --git a/src/__tests__/mockserver/internal/server/doc.go b/src/__tests__/mockserver/internal/server/doc.go new file mode 100644 index 00000000..666dc109 --- /dev/null +++ b/src/__tests__/mockserver/internal/server/doc.go @@ -0,0 +1,4 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +// Package server implements the HTTP server. +package server diff --git a/src/__tests__/mockserver/internal/server/generated_handlers.go b/src/__tests__/mockserver/internal/server/generated_handlers.go new file mode 100644 index 00000000..1ea16355 --- /dev/null +++ b/src/__tests__/mockserver/internal/server/generated_handlers.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package server + +import ( + "context" + + "mockserver/internal/handler" +) + +func (s *Server) registerGeneratedHandlers(ctx context.Context) { + s.logger.Debug("registering generated handlers") + + for _, h := range handler.GeneratedHandlers(ctx, s.httpFileDir, s.requestTracker) { + s.RegisterHandlerFunc(ctx, []string{h.Method}, h.Path, h.HandlerFunc()) + } +} diff --git a/src/__tests__/mockserver/internal/server/internal_handlers.go b/src/__tests__/mockserver/internal/server/internal_handlers.go new file mode 100644 index 00000000..1c248615 --- /dev/null +++ b/src/__tests__/mockserver/internal/server/internal_handlers.go @@ -0,0 +1,343 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package server + +import ( + "bytes" + "context" + "fmt" + "html/template" + "io" + "net/http" + "path/filepath" + "strings" +) + +const ( + // Mock server internal route prefix to prevent naming collisions. + internalPathPrefix = "/_mockserver" +) + +// registerInternalHandlers adds any internal handlers, such as healthcheck +// endpoints and fallback handling. +func (s *Server) registerInternalHandlers(ctx context.Context) { + s.logger.Debug("registering internal handlers") + + // Healthcheck endpoint + s.RegisterHandlerFunc(ctx, []string{http.MethodGet}, internalPathPrefix+"/health", healthcheckHandler) + + // HTTP log index endpoint + s.RegisterHandlerFunc(ctx, []string{http.MethodGet}, internalPathPrefix+"/log", s.httpFileIndexHandler) + + // HTTP log operation endpoint + s.RegisterHandlerFunc(ctx, []string{http.MethodGet}, internalPathPrefix+"/log/{operationId}", s.httpOperationHandler) + + // Default all other requests to 404 Not Found + s.RegisterHandlerFunc(ctx, []string{}, "/", rootHandler) +} + +// healthcheckHandler returns a simple OK response. +func healthcheckHandler(w http.ResponseWriter, _ *http.Request) { + w.Header().Set("Content-Type", "text/plain; charset=utf-8") + w.WriteHeader(http.StatusOK) + fmt.Fprintln(w, "OK") +} + +// httpFileIndexHandler returns a HTML index page for all logged HTTP operations +// written to the HTTP file directory. +func (s *Server) httpFileIndexHandler(w http.ResponseWriter, _ *http.Request) { + operations, err := s.httpFileDir.Operations() + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + type operationModel struct { + CallCount int64 + ID string + LogURL string + Method string + Path string + } + + type indexModel struct { + Operations []operationModel + } + + var index indexModel + + for _, operation := range operations { + index.Operations = append(index.Operations, operationModel{ + CallCount: operation.CallCount(), + ID: operation.Id(), + LogURL: internalPathPrefix + "/log/" + operation.Id(), + Method: operation.Method(), + Path: operation.Path(), + }) + } + + tmpl := template.New("index.html.tmpl") + tmpl.Funcs(template.FuncMap{ + "mod": func(i, j int) bool { return i%j == 0 }, + }) + _, err = tmpl.ParseFiles( + filepath.Join("internal", "server", "templates", "log", "style.css.tmpl"), + filepath.Join("internal", "server", "templates", "log", "index.html.tmpl"), + ) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log template error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + var wBuf bytes.Buffer + + err = tmpl.Execute(&wBuf, index) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log template execution error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + w.WriteHeader(http.StatusOK) + _, _ = wBuf.WriteTo(w) +} + +// httpOperationHandler returns a HTML page for HTTP request and response log files +// written to _debug. +func (s *Server) httpOperationHandler(w http.ResponseWriter, req *http.Request) { + operationId := req.PathValue("operationId") + + if operationId == "" { + http.Error(w, "operation logs not found", http.StatusNotFound) + + return + } + + operation, err := s.httpFileDir.Operation(operationId) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s log error: %s", operationId, err), + http.StatusInternalServerError, + ) + + return + } + + type headerModel struct { + Key string + Values template.HTML + } + + type queryParameterModel struct { + Key string + Values template.HTML + } + + type operationCallModel struct { + Call int64 + ID string + LogOperationURL string + + RawRequest template.HTML + RawResponse template.HTML + + RequestBody string + RequestHeaders []headerModel + RequestQueryParameters []queryParameterModel + + ResponseBody string + ResponseHeaders []headerModel + ResponseStatus string + } + + type operationDataModel struct { + Calls []operationCallModel + ID string + LogIndexURL string + RequestMethod string + RequestPath string + } + + operationData := operationDataModel{ + ID: operationId, + LogIndexURL: internalPathPrefix + "/log", + RequestMethod: operation.Method(), + RequestPath: operation.Path(), + } + + for i := range operation.CallCount() { + call := i + 1 + + callReqRaw, err := operation.RawRequest(call) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log raw request error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callReq, err := operation.Request(call) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log request error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callReqBody, err := io.ReadAll(callReq.Body) + defer callReq.Body.Close() + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log request body error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callRespRaw, err := operation.RawResponse(call) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log response error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callResp, err := operation.Response(call) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log response error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callRespBody, err := io.ReadAll(callResp.Body) + defer callReq.Body.Close() + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log response body error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + operationCall := operationCallModel{ + Call: call, + LogOperationURL: internalPathPrefix + "/log/" + operationId, + + RawRequest: template.HTML(strings.ReplaceAll(string(callReqRaw), "\r\n", "
")), + RawResponse: template.HTML(strings.ReplaceAll(string(callRespRaw), "\r\n", "
")), + + RequestBody: string(callReqBody), + ResponseBody: string(callRespBody), + ResponseStatus: callResp.Status, + } + + for key, values := range callReq.URL.Query() { + operationCall.RequestQueryParameters = append(operationCall.RequestQueryParameters, queryParameterModel{ + Key: key, + Values: template.HTML(strings.Join(values, "
")), + }) + } + + for key, values := range callReq.Header { + operationCall.RequestHeaders = append(operationCall.RequestHeaders, headerModel{ + Key: key, + Values: template.HTML(strings.Join(values, "
")), + }) + } + + for key, values := range callResp.Header { + operationCall.ResponseHeaders = append(operationCall.ResponseHeaders, headerModel{ + Key: key, + Values: template.HTML(strings.Join(values, "
")), + }) + } + + operationData.Calls = append(operationData.Calls, operationCall) + } + + tmpl := template.New("operation.html.tmpl") + tmpl.Funcs(template.FuncMap{ + "mod": func(i, j int) bool { return i%j == 0 }, + }) + _, err = tmpl.ParseFiles( + filepath.Join("internal", "server", "templates", "log", "style.css.tmpl"), + filepath.Join("internal", "server", "templates", "log", "operation.html.tmpl"), + ) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log template error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + var wBuf bytes.Buffer + + err = tmpl.Execute(&wBuf, operationData) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log template execution error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + w.WriteHeader(http.StatusOK) + _, _ = wBuf.WriteTo(w) +} + +// rootHandler returns a slightly customized [http.NotFoundHandler], saying +// "path" instead of "page". +func rootHandler(w http.ResponseWriter, _ *http.Request) { + http.Error(w, "path not found", http.StatusNotFound) +} diff --git a/src/__tests__/mockserver/internal/server/server.go b/src/__tests__/mockserver/internal/server/server.go new file mode 100644 index 00000000..12239611 --- /dev/null +++ b/src/__tests__/mockserver/internal/server/server.go @@ -0,0 +1,134 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package server + +import ( + "context" + "errors" + "fmt" + "log/slog" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" + "strings" + "time" + + "github.com/gorilla/mux" +) + +const ( + // Default address for server listening. + DefaultAddress = ":18080" +) + +// Server implements the HTTP server. +type Server struct { + // Address for server listening. + address string + + // Directory for raw HTTP request and response files. + httpFileDir *logging.HTTPFileDirectory + + // Logger implementation. + logger *slog.Logger + + // Underlying mux implementation. + // Based on gorilla mux as the native mux suffered from issues with ambiguous paths and different http methods + // eg - panic: pattern "HEAD /v8/artifacts/{hash}" (registered at /usr/src/app/internal/server/server.go:104) conflicts with pattern "GET /v8/artifacts/status" (registered at /usr/src/app/internal/server/server.go:104): HEAD /v8/artifacts/{hash} matches fewer methods than GET /v8/artifacts/status, but has a more general path pattern + mux *mux.Router + + // Underlying server implementation. + server *http.Server + + requestTracker *tracking.RequestTracker +} + +// NewServer creates a new Server instance. +func NewServer(ctx context.Context, opts ...ServerOption) (*Server, error) { + // Initialize with defaults. + result := &Server{ + address: DefaultAddress, + logger: slog.Default(), + mux: mux.NewRouter(), + requestTracker: tracking.New(), + } + + // Customize based on ServerOption. + for _, opt := range opts { + err := opt(result) + + if err != nil { + return result, err + } + } + + result.server = &http.Server{ + Addr: result.address, + Handler: logging.HTTPLoggerHandler(result.logger, result.mux), + ErrorLog: slog.NewLogLogger(result.logger.Handler(), slog.LevelError), + } + + httpFileDir, err := logging.NewHTTPFileDirectory("") + + if err != nil { + return result, err + } + + err = httpFileDir.Clean() + + if err != nil { + return result, err + } + + result.httpFileDir = httpFileDir + + result.registerGeneratedHandlers(ctx) + result.registerInternalHandlers(ctx) + + return result, err +} + +// Address returns the server address including protocol, hostname, and port. +func (s *Server) Address() string { + return "http://localhost" + s.address +} + +// RegisterHandlerFunc adds a new HTTP handler function for the given methods and path. +func (s *Server) RegisterHandlerFunc(ctx context.Context, methods []string, path string, handlerFunc http.HandlerFunc) { + s.logger.DebugContext(ctx, fmt.Sprintf("registering handler for %s %s", strings.Join(methods, ", "), path)) + + r := s.mux.HandleFunc(path, handlerFunc) + if len(methods) > 0 { + r.Methods(methods...) + } +} + +// Serve starts the server. +func (s *Server) Serve(ctx context.Context) error { + s.logger.InfoContext(ctx, "starting server with address "+s.server.Addr) + + err := s.server.ListenAndServe() + + if errors.Is(err, http.ErrServerClosed) { + return nil + } + + return fmt.Errorf("error running server: %w", err) +} + +// Shutdown gracefully stops the server. +func (s *Server) Shutdown(ctx context.Context) error { + s.logger.WarnContext(ctx, "shutting down server") + s.server.SetKeepAlivesEnabled(false) + + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + err := s.server.Shutdown(ctx) + + if err != nil { + return fmt.Errorf("error shutting down server: %w", err) + } + + return nil +} diff --git a/src/__tests__/mockserver/internal/server/server_option.go b/src/__tests__/mockserver/internal/server/server_option.go new file mode 100644 index 00000000..ff85a678 --- /dev/null +++ b/src/__tests__/mockserver/internal/server/server_option.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package server + +import ( + "log/slog" +) + +// ServerOption is a function which modifies the Server. +type ServerOption func(*Server) error + +// WithAddress sets the listening address for a Server. By default, the server +// address is :18080. +func WithAddress(address string) ServerOption { + return func(s *Server) error { + s.address = address + + return nil + } +} + +// WithLogger sets the logger implementation for a Server. By default, the +// server logger is [slog.Default]. +func WithLogger(logger *slog.Logger) ServerOption { + return func(s *Server) error { + s.logger = logger + + return nil + } +} diff --git a/src/__tests__/mockserver/internal/server/templates/log/index.html.tmpl b/src/__tests__/mockserver/internal/server/templates/log/index.html.tmpl new file mode 100644 index 00000000..8b1124e5 --- /dev/null +++ b/src/__tests__/mockserver/internal/server/templates/log/index.html.tmpl @@ -0,0 +1,22 @@ + + + Operation Logs + + + +

// Speakeasy

+

Operation Logs

+ + + {{ range $idx, $o := .Operations }} + + + + + + {{ end }} +
OperationRequestCalls
{{ .ID }}{{ .Method }} {{ .Path }}{{ .CallCount }}
+ + diff --git a/src/__tests__/mockserver/internal/server/templates/log/operation.html.tmpl b/src/__tests__/mockserver/internal/server/templates/log/operation.html.tmpl new file mode 100644 index 00000000..a54a2adc --- /dev/null +++ b/src/__tests__/mockserver/internal/server/templates/log/operation.html.tmpl @@ -0,0 +1,93 @@ + + + Operation Logs: {{ .ID }} + + + +

// Speakeasy

+

Operation Logs: {{ .ID }}

+

{{ .RequestMethod }} {{ .RequestPath }}

+

Back to All Operation Logs

+
+ {{ range $idx, $c := .Calls }} +
+ {{ if (ne (len $.Calls) 1) }} +

Call {{ .Call }}

+ {{ end }} +
+

Request

+ + {{ if (gt (len .RequestQueryParameters) 0) }} +
+

Query Parameters

+ + + {{ range $idx, $p := .RequestQueryParameters }} + + + + + {{ end }} +
KeyValue
{{ .Key }}{{ .Values }}
+
+ {{ end }} +
+

Headers

+ + + {{ range $idx, $h := .RequestHeaders }} + + + + + {{ end }} +
KeyValue(s)
{{ .Key }}{{ .Values }}
+
+ {{ if (gt (len .RequestBody) 0) }} +
+

Body

+

{{ .RequestBody }}

+
+ {{ end }} +

+

+ Raw Request +
{{ .RawRequest }}
+
+

+
+
+

Response

+

{{ .ResponseStatus }}

+
+

Headers

+ + + {{ range $idx, $h := .ResponseHeaders }} + + + + + {{ end }} +
KeyValue(s)
{{ .Key }}{{ .Values }}
+
+ {{ if (gt (len .ResponseBody) 0) }} +
+

Body

+

{{ .ResponseBody }}

+
+ {{ end }} +

+

+ Raw Response +
{{ .RawResponse }}
+
+

+
+
+ {{ end }} +
+ + diff --git a/src/__tests__/mockserver/internal/server/templates/log/style.css.tmpl b/src/__tests__/mockserver/internal/server/templates/log/style.css.tmpl new file mode 100644 index 00000000..5490930e --- /dev/null +++ b/src/__tests__/mockserver/internal/server/templates/log/style.css.tmpl @@ -0,0 +1,64 @@ +{{ define "style" }} +a { + color: rgba(251, 227, 50, 1.0); +} +body { + background: black; + font-family: Arial, Helvetica, sans-serif; +} +code { + color: white; +} +details > div { + border-left: 1px solid gray; + margin-left: 10px; + padding: 10px; +} +div { + width: fit-content; +} +div.operation-call.odd { + background-color: rgba(251, 227, 50, 0.1); +} +h1 { + color: hsl(53, 96%, 59%); +} +h2 { + color: rgba(255, 255, 255, 1.0); +} +h3 { + color: rgba(255, 255, 255, 0.75); +} +h4 { + color: rgba(255, 255, 255, 0.50); +} +p { + color: white; + padding-left: 10px; +} +summary { + color: gray; + font-weight: bold; + margin-bottom: 5px; +} +table { + border-collapse: collapse; + margin: 5px; +} +th { + border-bottom: 1px solid gray; + color: white; + padding: 10px; + text-align: left; +} +td { + color: white; + padding: 10px; +} +tr.even { + background-color: rgba(255, 255, 255, 0.0); +} +tr.odd { + background-color: rgba(255, 255, 255, 0.1); +} +{{ end }} diff --git a/src/__tests__/mockserver/internal/tracking/requesttracker.go b/src/__tests__/mockserver/internal/tracking/requesttracker.go new file mode 100644 index 00000000..1d9131d0 --- /dev/null +++ b/src/__tests__/mockserver/internal/tracking/requesttracker.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package tracking + +import ( + "fmt" + "time" + + cache "github.com/go-pkgz/expirable-cache/v3" +) + +type RequestTracker struct { + cache cache.Cache[string, *testEntry] +} + +type testEntry struct { + name string + id string + count int + created time.Time +} + +func New() *RequestTracker { + return &RequestTracker{ + cache: cache.NewCache[string, *testEntry]().WithTTL(5 * time.Minute), + } +} + +func (t *RequestTracker) GetRequestCount(testName, instanceID string) int { + key := fmt.Sprintf("%s-%s", testName, instanceID) + + entry, ok := t.cache.Get(key) + if !ok { + entry = &testEntry{ + name: testName, + id: instanceID, + count: 0, + created: time.Now(), + } + } + + count := entry.count + entry.count++ + t.cache.Set(key, entry, 0) + + return count +} diff --git a/src/__tests__/mockserver/main.go b/src/__tests__/mockserver/main.go new file mode 100644 index 00000000..2270443b --- /dev/null +++ b/src/__tests__/mockserver/main.go @@ -0,0 +1,74 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package main + +import ( + "context" + "flag" + "fmt" + "os" + "os/signal" + "strings" + + "mockserver/internal/logging" + "mockserver/internal/server" +) + +func main() { + ctx := context.Background() + + address := flag.String("address", server.DefaultAddress, fmt.Sprintf("server listen address (default: %s)", server.DefaultAddress)) + logFormat := flag.String("log-format", logging.DefaultFormat, fmt.Sprintf("logging format (default: %s, supported: %s)", logging.DefaultFormat, strings.Join(logging.Formats(), ", "))) + logLevel := flag.String("log-level", logging.DefaultLevel, fmt.Sprintf("logging level (default: %s, supported: %s)", logging.DefaultLevel, strings.Join(logging.Levels(), ", "))) + + flag.Parse() + + logger, err := logging.NewLogger(os.Stdout, *logFormat, *logLevel) + + if err != nil { + fmt.Fprintf(os.Stderr, "error setting up logging: %s", err) + os.Exit(1) + } + + serverOpts := []server.ServerOption{ + server.WithAddress(*address), + server.WithLogger(logger), + } + + s, err := server.NewServer(ctx, serverOpts...) + + if err != nil { + logger.ErrorContext(ctx, err.Error()) + os.Exit(1) + } + + finishedShutdown := make(chan struct{}) + startShutdown := make(chan os.Signal, 1) + signal.Notify(startShutdown, os.Interrupt) + + go func() { + <-startShutdown + + logger.WarnContext(ctx, "server received interrupt") + + err := s.Shutdown(ctx) + + if err != nil { + logger.Error(err.Error()) + os.Exit(1) + } + + close(finishedShutdown) + }() + + err = s.Serve(ctx) + + if err != nil { + logger.ErrorContext(ctx, err.Error()) + os.Exit(1) + } + + <-finishedShutdown + + logger.InfoContext(ctx, "server stopped") +} diff --git a/src/__tests__/mockserver/testdata/example.file b/src/__tests__/mockserver/testdata/example.file new file mode 100644 index 00000000..3b18e512 --- /dev/null +++ b/src/__tests__/mockserver/testdata/example.file @@ -0,0 +1 @@ +hello world diff --git a/src/__tests__/projectmembers.test.ts b/src/__tests__/projectmembers.test.ts new file mode 100644 index 00000000..b45c0ce4 --- /dev/null +++ b/src/__tests__/projectmembers.test.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Projectmembers Add Project Member", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("addProjectMember"), + bearerToken: "", + }); + + const result = await vercel.projectMembers.addProjectMember({ + idOrName: "prj_pavWOn1iLObbXLRiwVvzmPrTWyTf", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + uid: "ndlgr43fadlPyCtREAqxxdyFK", + username: "example", + email: "entity@example.com", + role: "ADMIN", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + }); +}); + +test("Projectmembers Remove Project Member", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("removeProjectMember"), + bearerToken: "", + }); + + const result = await vercel.projectMembers.removeProjectMember({ + idOrName: "prj_pavWOn1iLObbXLRiwVvzmPrTWyTf", + uid: "ndlgr43fadlPyCtREAqxxdyFK", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + }); +}); diff --git a/src/__tests__/projects.test.ts b/src/__tests__/projects.test.ts new file mode 100644 index 00000000..8c0e963d --- /dev/null +++ b/src/__tests__/projects.test.ts @@ -0,0 +1,637 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Projects Update Project Data Cache", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateProjectDataCache"), + bearerToken: "", + }); + + const result = await vercel.projects.updateProjectDataCache({ + projectId: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + disabled: true, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + accountId: "", + crons: { + enabledAt: 7135.80, + disabledAt: 2989.85, + updatedAt: 6226.22, + deploymentId: "", + definitions: [ + { + host: "vercel.com", + path: "/api/crons/sync-something?hello=world", + schedule: "0 0 * * *", + }, + { + host: "vercel.com", + path: "/api/crons/sync-something?hello=world", + schedule: "0 0 * * *", + }, + { + host: "vercel.com", + path: "/api/crons/sync-something?hello=world", + schedule: "0 0 * * *", + }, + ], + }, + directoryListing: false, + id: "", + latestDeployments: [ + { + id: "", + createdAt: 5719.60, + createdIn: "", + creator: { + email: "Braeden15@gmail.com", + uid: "", + username: "Teresa84", + }, + deploymentHostname: "", + name: "", + plan: "pro", + previewCommentsEnabled: false, + private: false, + readyState: "BUILDING", + type: "LAMBDAS", + url: "https://unknown-gift.biz", + userId: "", + }, + { + id: "", + createdAt: 7644.50, + createdIn: "", + creator: { + email: "Erich.Mann@hotmail.com", + uid: "", + username: "Genoveva89", + }, + deploymentHostname: "", + name: "", + plan: "hobby", + previewCommentsEnabled: false, + private: true, + readyState: "ERROR", + type: "LAMBDAS", + url: "https://slimy-tuba.name", + userId: "", + }, + { + id: "", + createdAt: 2357.62, + createdIn: "", + creator: { + email: "Garret.Ferry81@gmail.com", + uid: "", + username: "Vivianne.Gutkowski", + }, + deploymentHostname: "", + name: "", + plan: "pro", + previewCommentsEnabled: false, + private: true, + readyState: "CANCELED", + type: "LAMBDAS", + url: "https://astonishing-cinema.net/", + userId: "", + }, + ], + name: "", + nodeVersion: "10.x", + }); +}); + +test("Projects Get Projects", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getProjects"), + bearerToken: "", + }); + + const result = await vercel.projects.getProjects({ + gitForkProtection: "1", + repoUrl: "https://github.com/vercel/next.js", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + projects: [], + pagination: { + count: 20, + next: 1540095775951, + prev: 1540095775951, + }, + }); +}); + +test("Projects Create Project", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createProject"), + bearerToken: "", + }); + + const result = await vercel.projects.createProject({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "a-project-name", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + accountId: "", + crons: { + enabledAt: 5535.60, + disabledAt: 7749.32, + updatedAt: 4248.45, + deploymentId: "", + definitions: [ + { + host: "vercel.com", + path: "/api/crons/sync-something?hello=world", + schedule: "0 0 * * *", + }, + { + host: "vercel.com", + path: "/api/crons/sync-something?hello=world", + schedule: "0 0 * * *", + }, + ], + }, + directoryListing: false, + id: "", + latestDeployments: [ + { + id: "", + createdAt: 3954.07, + createdIn: "", + creator: { + email: "Junior46@yahoo.com", + uid: "", + username: "Rick.Fritsch", + }, + deploymentHostname: "", + name: "", + plan: "enterprise", + previewCommentsEnabled: false, + private: false, + readyState: "CANCELED", + type: "LAMBDAS", + url: "https://potable-bid.biz", + userId: "", + }, + ], + name: "", + nodeVersion: "22.x", + targets: { + "key": { + id: "", + createdAt: 1667.88, + createdIn: "", + creator: { + email: "Mustafa49@yahoo.com", + uid: "", + username: "Roberta.Cormier", + }, + deploymentHostname: "", + name: "", + plan: "hobby", + previewCommentsEnabled: false, + private: false, + readyState: "INITIALIZING", + type: "LAMBDAS", + url: "https://formal-breastplate.org", + userId: "", + }, + }, + }); +}); + +test("Projects Update Project", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateProject"), + bearerToken: "", + }); + + const result = await vercel.projects.updateProject({ + idOrName: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "a-project-name", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + accountId: "", + crons: { + enabledAt: 6482.22, + disabledAt: 3040.87, + updatedAt: 9398.85, + deploymentId: "", + definitions: [ + { + host: "vercel.com", + path: "/api/crons/sync-something?hello=world", + schedule: "0 0 * * *", + }, + { + host: "vercel.com", + path: "/api/crons/sync-something?hello=world", + schedule: "0 0 * * *", + }, + ], + }, + directoryListing: true, + id: "", + latestDeployments: [ + { + id: "", + createdAt: 7688.55, + createdIn: "", + creator: { + email: "Alfredo_Murazik@yahoo.com", + uid: "", + username: "Kiera28", + }, + deploymentHostname: "", + name: "", + plan: "enterprise", + previewCommentsEnabled: false, + private: false, + readyState: "ERROR", + type: "LAMBDAS", + url: "https://close-premise.net/", + userId: "", + }, + { + id: "", + createdAt: 3847.37, + createdIn: "", + creator: { + email: "Zachery.Johns68@yahoo.com", + uid: "", + username: "Nicole_Reynolds", + }, + deploymentHostname: "", + name: "", + plan: "hobby", + previewCommentsEnabled: false, + private: true, + readyState: "QUEUED", + type: "LAMBDAS", + url: "https://unsightly-newsstand.net/", + userId: "", + }, + ], + name: "", + nodeVersion: "14.x", + targets: { + "key": { + id: "", + createdAt: 5163.13, + createdIn: "", + creator: { + email: "Joyce_Hodkiewicz46@yahoo.com", + uid: "", + username: "Bud.Bogan18", + }, + deploymentHostname: "", + name: "", + plan: "pro", + previewCommentsEnabled: false, + private: true, + readyState: "QUEUED", + type: "LAMBDAS", + url: "https://frugal-coordination.net/", + userId: "", + }, + }, + }); +}); + +test("Projects Delete Project", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteProject"), + bearerToken: "", + }); + + await vercel.projects.deleteProject({ + idOrName: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Projects Get Project Domains", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getProjectDomains"), + bearerToken: "", + }); + + const result = await vercel.projects.getProjectDomains({ + idOrName: "", + customEnvironmentId: "env_123abc4567", + redirect: "example.com", + limit: 20, + since: 1609499532000, + until: 1612264332000, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + domains: [ + { + name: "", + apexName: "", + projectId: "", + verified: true, + }, + ], + pagination: { + count: 20, + next: 1540095775951, + prev: 1540095775951, + }, + }); +}); + +test("Projects Get Project Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getProjectDomain"), + bearerToken: "", + }); + + const result = await vercel.projects.getProjectDomain({ + idOrName: "", + domain: "www.example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + name: "", + apexName: "", + projectId: "", + verified: true, + }); +}); + +test("Projects Update Project Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateProjectDomain"), + bearerToken: "", + }); + + const result = await vercel.projects.updateProjectDomain({ + idOrName: "", + domain: "www.example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + gitBranch: null, + redirect: "foobar.com", + redirectStatusCode: 307, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + name: "", + apexName: "", + projectId: "", + verified: false, + }); +}); + +test("Projects Remove Project Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("removeProjectDomain"), + bearerToken: "", + }); + + const result = await vercel.projects.removeProjectDomain({ + idOrName: "", + domain: "www.example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Projects Add Project Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("addProjectDomain"), + bearerToken: "", + }); + + const result = await vercel.projects.addProjectDomain({ + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + name: "www.example.com", + gitBranch: null, + redirect: "foobar.com", + redirectStatusCode: 307, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + name: "", + apexName: "", + projectId: "", + verified: true, + }); +}); + +test("Projects Verify Project Domain", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("verifyProjectDomain"), + bearerToken: "", + }); + + const result = await vercel.projects.verifyProjectDomain({ + idOrName: "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + domain: "example.com", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + name: "", + apexName: "", + projectId: "", + verified: false, + }); +}); + +test("Projects Get Project Env", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getProjectEnv"), + bearerToken: "", + }); + + const result = await vercel.projects.getProjectEnv({ + idOrName: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA", + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + type: "plain", + key: "", + value: "", + }); +}); + +test("Projects Create Project Env", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createProjectEnv"), + bearerToken: "", + }); + + const result = await vercel.projects.createProjectEnv({ + idOrName: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA", + upsert: "true", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: [ + { + key: "API_URL", + value: "https://api.vercel.com", + type: "plain", + target: [ + "preview", + ], + gitBranch: "feature-1", + comment: "database connection string for production", + }, + ], + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + created: [ + {}, + ], + failed: [ + { + error: { + code: "", + message: "", + }, + }, + ], + }); +}); + +test("Projects Remove Project Env", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("removeProjectEnv"), + bearerToken: "", + }); + + const result = await vercel.projects.removeProjectEnv({ + idOrName: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA", + id: "XMbOEya1gUUO1ir4", + customEnvironmentId: "env_123abc4567", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual([ + { + type: "sensitive", + key: "", + value: "", + }, + { + type: "plain", + key: "", + value: "", + }, + { + type: "encrypted", + key: "", + value: "", + }, + ]); +}); + +test("Projects Update Project Protection Bypass", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateProjectProtectionBypass"), + bearerToken: "", + }); + + const result = await vercel.projects.updateProjectProtectionBypass({ + idOrName: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: {}, + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Projects Request Promote", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("requestPromote"), + bearerToken: "", + }); + + await vercel.projects.requestPromote({ + projectId: "", + deploymentId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); + +test("Projects List Promote Aliases", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listPromoteAliases"), + bearerToken: "", + }); + + const result = await vercel.projects.listPromoteAliases({ + projectId: "", + limit: 20, + since: 1609499532000, + until: 1612264332000, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); diff --git a/src/__tests__/security.test.ts b/src/__tests__/security.test.ts new file mode 100644 index 00000000..7130501c --- /dev/null +++ b/src/__tests__/security.test.ts @@ -0,0 +1,401 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Security Update Attack Challenge Mode", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateAttackChallengeMode"), + bearerToken: "", + }); + + const result = await vercel.security.updateAttackChallengeMode({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + projectId: "", + attackModeEnabled: true, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + attackModeEnabled: true, + attackModeUpdatedAt: 4536.22, + }); +}); + +test("Security Put Firewall Config", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("putFirewallConfig"), + bearerToken: "", + }); + + const result = await vercel.security.putFirewallConfig({ + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + firewallEnabled: true, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + active: { + ownerId: "", + projectKey: "", + id: "", + version: 4570.86, + updatedAt: "", + firewallEnabled: true, + crs: { + sd: { + active: false, + action: "deny", + }, + ma: { + active: false, + action: "log", + }, + lfi: { + active: false, + action: "log", + }, + rfi: { + active: false, + action: "deny", + }, + rce: { + active: false, + action: "deny", + }, + php: { + active: true, + action: "deny", + }, + gen: { + active: false, + action: "deny", + }, + xss: { + active: false, + action: "deny", + }, + sqli: { + active: true, + action: "log", + }, + sf: { + active: true, + action: "deny", + }, + java: { + active: true, + action: "log", + }, + }, + rules: [ + { + id: "", + name: "", + active: true, + conditionGroup: [ + { + conditions: [ + { + type: "ip_address", + op: "suf", + }, + { + type: "geo_as_number", + op: "pre", + }, + { + type: "ja3_digest", + op: "inc", + }, + ], + }, + { + conditions: [ + { + type: "geo_as_number", + op: "neq", + }, + { + type: "protocol", + op: "sub", + }, + { + type: "ja3_digest", + op: "suf", + }, + ], + }, + { + conditions: [ + { + type: "region", + op: "neq", + }, + ], + }, + ], + action: {}, + }, + { + id: "", + name: "", + active: false, + conditionGroup: [], + action: {}, + }, + { + id: "", + name: "", + active: false, + conditionGroup: [ + { + conditions: [ + { + type: "scheme", + op: "neq", + }, + ], + }, + { + conditions: [], + }, + { + conditions: [ + { + type: "header", + op: "inc", + }, + { + type: "query", + op: "eq", + }, + ], + }, + ], + action: {}, + }, + ], + ips: [], + changes: [], + }, + }); +}); + +test("Security Update Firewall Config", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateFirewallConfig"), + bearerToken: "", + }); + + const result = await vercel.security.updateFirewallConfig({ + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + action: "ip.remove", + id: "", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Security Get Firewall Config", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getFirewallConfig"), + bearerToken: "", + }); + + const result = await vercel.security.getFirewallConfig({ + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + configVersion: "", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + ownerId: "", + projectKey: "", + id: "", + version: 228.91, + updatedAt: "", + firewallEnabled: true, + crs: { + sd: { + active: false, + action: "deny", + }, + ma: { + active: true, + action: "log", + }, + lfi: { + active: false, + action: "log", + }, + rfi: { + active: false, + action: "deny", + }, + rce: { + active: true, + action: "deny", + }, + php: { + active: false, + action: "log", + }, + gen: { + active: false, + action: "log", + }, + xss: { + active: true, + action: "deny", + }, + sqli: { + active: true, + action: "deny", + }, + sf: { + active: true, + action: "deny", + }, + java: { + active: true, + action: "deny", + }, + }, + rules: [ + { + id: "", + name: "", + active: true, + conditionGroup: [ + { + conditions: [ + { + type: "ip_address", + op: "eq", + }, + ], + }, + { + conditions: [ + { + type: "geo_city", + op: "ex", + }, + { + type: "ja4_digest", + op: "nex", + }, + { + type: "ip_address", + op: "lte", + }, + ], + }, + ], + action: {}, + }, + ], + ips: [ + { + id: "", + hostname: "puny-goat.org", + ip: "0.147.40.42", + action: "challenge", + }, + ], + changes: [], + }); +}); + +test("Security Get Bypass Ip", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getBypassIp"), + bearerToken: "", + }); + + const result = await vercel.security.getBypassIp({ + projectId: "", + limit: 10, + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + result: [ + { + ownerId: "", + id: "", + domain: "sneaky-intervention.info", + ip: "124.153.161.35", + projectId: "", + isProjectRule: false, + }, + ], + pagination: "", + }); +}); + +test("Security Add Bypass Ip", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("addBypassIp"), + bearerToken: "", + }); + + const result = await vercel.security.addBypassIp({ + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + ok: false, + result: [ + { + ownerId: "", + id: "", + domain: "jubilant-outrun.name", + projectId: "", + isProjectRule: true, + }, + ], + pagination: "", + }); +}); + +test("Security Remove Bypass Ip", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("removeBypassIp"), + bearerToken: "", + }); + + const result = await vercel.security.removeBypassIp({ + projectId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + ok: true, + }); +}); diff --git a/src/__tests__/teams.test.ts b/src/__tests__/teams.test.ts new file mode 100644 index 00000000..a8291a89 --- /dev/null +++ b/src/__tests__/teams.test.ts @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Teams Get Team Members", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getTeamMembers"), + bearerToken: "", + }); + + const result = await vercel.teams.getTeamMembers({ + limit: 20, + since: 1540095775951, + until: 1540095775951, + role: "OWNER", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + members: [ + { + avatar: "123a6c5209bc3778245d011443644c8d27dc2c50", + confirmed: true, + email: "jane.doe@example.com", + role: "OWNER", + uid: "zTuNVUXEAvvnNN3IaqinkyMw", + username: "jane-doe", + name: "Jane Doe", + createdAt: 1588720733602, + accessRequestedAt: 1588820733602, + }, + { + avatar: "123a6c5209bc3778245d011443644c8d27dc2c50", + confirmed: true, + email: "jane.doe@example.com", + role: "OWNER", + uid: "zTuNVUXEAvvnNN3IaqinkyMw", + username: "jane-doe", + name: "Jane Doe", + createdAt: 1588720733602, + accessRequestedAt: 1588820733602, + }, + ], + pagination: { + hasNext: true, + count: 20, + next: 1540095775951, + prev: 1540095775951, + }, + }); +}); + +test("Teams Request Access To Team", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("requestAccessToTeam"), + bearerToken: "", + }); + + const result = await vercel.teams.requestAccessToTeam({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + requestBody: { + joinedFrom: { + origin: "github", + commitId: "f498d25d8bd654b578716203be73084b31130cd7", + repoId: "67753070", + repoPath: "jane-doe/example", + gitUserId: 103053343, + gitUserLogin: "jane-doe", + }, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamSlug: "", + teamName: "", + github: {}, + gitlab: {}, + bitbucket: {}, + }); +}); + +test("Teams Get Team Access Request", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getTeamAccessRequest"), + bearerToken: "", + }); + + const result = await vercel.teams.getTeamAccessRequest({ + userId: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamSlug: "my-team", + teamName: "My Team", + confirmed: false, + joinedFrom: { + origin: "import", + }, + accessRequestedAt: 1588720733602, + github: {}, + gitlab: {}, + bitbucket: {}, + }); +}); + +test("Teams Join Team", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("joinTeam"), + bearerToken: "", + }); + + const result = await vercel.teams.joinTeam({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + requestBody: { + inviteCode: "fisdh38aejkeivn34nslfore9vjtn4ls", + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teamId: "team_LLHUOMOoDlqOp8wPE4kFo9pE", + slug: "my-team", + name: "My Team", + from: "email", + }); +}); + +test("Teams Update Team Member", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("updateTeamMember"), + bearerToken: "", + }); + + const result = await vercel.teams.updateTeamMember({ + uid: "ndfasllgPyCtREAqxxdyFKb", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + requestBody: { + confirmed: true, + role: "[\"MEMBER\",\"VIEWER\"]", + projects: [ + { + projectId: "prj_ndlgr43fadlPyCtREAqxxdyFK", + role: "ADMIN", + }, + ], + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + }); +}); + +test("Teams Remove Team Member", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("removeTeamMember"), + bearerToken: "", + }); + + const result = await vercel.teams.removeTeamMember({ + uid: "ndlgr43fadlPyCtREAqxxdyFK", + newDefaultTeamId: "team_nllPyCtREAqxxdyFKbbMDlxd", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + }); +}); + +test("Teams Get Team", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getTeam"), + bearerToken: "", + }); + + const result = await vercel.teams.getTeam({ + slug: "my-team-url-slug", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Teams Patch Team", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("patchTeam"), + bearerToken: "", + }); + + const result = await vercel.teams.patchTeam({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + description: + "Our mission is to make cloud computing accessible to everyone", + emailDomain: "example.com", + name: "My Team", + previewDeploymentSuffix: "example.dev", + regenerateInviteCode: true, + saml: { + enforced: true, + }, + slug: "my-team", + enablePreviewFeedback: "on", + enableProductionFeedback: "on", + sensitiveEnvironmentVariablePolicy: "on", + remoteCaching: { + enabled: true, + }, + hideIpAddresses: false, + hideIpAddressesInLogDrains: false, + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({}); +}); + +test("Teams Get Teams", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getTeams"), + bearerToken: "", + }); + + const result = await vercel.teams.getTeams({ + limit: 20, + since: 1540095775951, + until: 1540095775951, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + teams: [ + {}, + {}, + ], + pagination: { + count: 20, + next: 1540095775951, + prev: 1540095775951, + }, + }); +}); + +test("Teams Create Team", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createTeam"), + bearerToken: "", + }); + + const result = await vercel.teams.createTeam({ + slug: "a-random-team", + name: "A Random Team", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "team_nLlpyC6RE1qxqglFKbrMxlud", + slug: "", + billing: {}, + }); +}); + +test("Teams Delete Team", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteTeam"), + bearerToken: "", + }); + + const result = await vercel.teams.deleteTeam({ + newDefaultTeamId: "team_LLHUOMOoDlqOp8wPE4kFo9pE", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: {}, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "team_LLHUOMOoDlqOp8wPE4kFo9pE", + newDefaultTeamIdError: true, + }); +}); + +test("Teams Delete Team Invite Code", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteTeamInviteCode"), + bearerToken: "", + }); + + const result = await vercel.teams.deleteTeamInviteCode({ + inviteId: "2wn2hudbr4chb1ecywo9dvzo7g9sscs6mzcz8htdde0txyom4l", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + }); +}); diff --git a/src/__tests__/testclient.ts b/src/__tests__/testclient.ts new file mode 100644 index 00000000..0dd5b597 --- /dev/null +++ b/src/__tests__/testclient.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { getRandomValues } from "crypto"; +import { HTTPClient } from "../lib/http.js"; + +export function createTestHTTPClient(testName: string): HTTPClient { + const httpClient = new HTTPClient({ + fetcher: (request: URL | RequestInfo) => { + return fetch(request); + }, + }); + + const testInstanceId = genTestId(); + + httpClient.addHook("beforeRequest", (request: Request) => { + const nextRequest = new Request(request, { + signal: request.signal || AbortSignal.timeout(5000), + }); + + nextRequest.headers.set("x-speakeasy-test-name", testName); + nextRequest.headers.set("x-speakeasy-test-instance-id", testInstanceId); + + return nextRequest; + }); + + return httpClient; +} + +function genTestId(): string { + const b = new Uint8Array(16); + getRandomValues(b); + + return `${buf2hex(b.slice(0, 4))}-${buf2hex(b.slice(4, 6))}-${ + buf2hex( + b.slice(6, 8), + ) + }-${buf2hex(b.slice(8, 10))}-${buf2hex(b.slice(10))}`; +} + +// Helper function to convert buffer to hex string +function buf2hex(buffer: Uint8Array): string { + return [...buffer] + .map((x) => x.toString(16).padStart(2, "0")) + .join("") + .toUpperCase(); +} diff --git a/src/__tests__/user.test.ts b/src/__tests__/user.test.ts new file mode 100644 index 00000000..be6446cf --- /dev/null +++ b/src/__tests__/user.test.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("User List User Events", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("listUserEvents"), + bearerToken: "", + }); + + const result = await vercel.user.listUserEvents({ + limit: 20, + since: "2019-12-08T10:00:38.976Z", + until: "2019-12-09T23:00:38.976Z", + types: "login,team-member-join,domain-buy", + userId: "aeIInYVk59zbFF2SxfyxxmuO", + withPayload: "true", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + events: [], + }); +}); + +test("User Request Delete", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("requestDelete"), + bearerToken: "", + }); + + const result = await vercel.user.requestDelete({}); + expect(result).toBeDefined(); + expect(result).toEqual({ + id: "", + email: "Lamont82@gmail.com", + message: "Verification email sent", + }); +}); diff --git a/src/__tests__/webhooks.test.ts b/src/__tests__/webhooks.test.ts new file mode 100644 index 00000000..c4f5cd41 --- /dev/null +++ b/src/__tests__/webhooks.test.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { expect, test } from "vitest"; +import { Vercel } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Webhooks Create Webhook", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("createWebhook"), + bearerToken: "", + }); + + const result = await vercel.webhooks.createWebhook({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + requestBody: { + url: "https://woeful-yin.biz", + events: [], + }, + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + secret: "", + events: [ + "deployment.created", + ], + id: "account_hook_GflD6EYyo7F4ViYS", + url: "https://my-webhook.com", + ownerId: "ZspSRT4ljIEEmMHgoDwKWDei", + createdAt: 1567024758130, + updatedAt: 1567024758130, + projectIds: [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + ], + }); +}); + +test("Webhooks Get Webhooks", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getWebhooks"), + bearerToken: "", + }); + + const result = await vercel.webhooks.getWebhooks({ + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual([ + { + projectsMetadata: [ + { + id: "", + name: "", + }, + { + id: "", + name: "", + }, + { + id: "", + name: "", + }, + ], + events: [ + "deployment.created", + ], + id: "account_hook_GflD6EYyo7F4ViYS", + url: "https://my-webhook.com", + ownerId: "ZspSRT4ljIEEmMHgoDwKWDei", + createdAt: 1567024758130, + updatedAt: 1567024758130, + projectIds: [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + ], + }, + { + projectsMetadata: [ + { + id: "", + name: "", + }, + ], + events: [ + "deployment.created", + ], + id: "account_hook_GflD6EYyo7F4ViYS", + url: "https://my-webhook.com", + ownerId: "ZspSRT4ljIEEmMHgoDwKWDei", + createdAt: 1567024758130, + updatedAt: 1567024758130, + projectIds: [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + ], + }, + { + projectsMetadata: [ + { + id: "", + name: "", + }, + ], + events: [ + "deployment.created", + ], + id: "account_hook_GflD6EYyo7F4ViYS", + url: "https://my-webhook.com", + ownerId: "ZspSRT4ljIEEmMHgoDwKWDei", + createdAt: 1567024758130, + updatedAt: 1567024758130, + projectIds: [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + ], + }, + ]); +}); + +test("Webhooks Get Webhook", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("getWebhook"), + bearerToken: "", + }); + + const result = await vercel.webhooks.getWebhook({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); + expect(result).toBeDefined(); + expect(result).toEqual({ + events: [ + "deployment.created", + ], + id: "account_hook_GflD6EYyo7F4ViYS", + url: "https://my-webhook.com", + ownerId: "ZspSRT4ljIEEmMHgoDwKWDei", + createdAt: 1567024758130, + updatedAt: 1567024758130, + projectIds: [ + "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB", + ], + }); +}); + +test("Webhooks Delete Webhook", async () => { + const vercel = new Vercel({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: createTestHTTPClient("deleteWebhook"), + bearerToken: "", + }); + + await vercel.webhooks.deleteWebhook({ + id: "", + teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", + slug: "my-team-url-slug", + }); +}); diff --git a/src/funcs/accessGroupsCreateAccessGroup.ts b/src/funcs/accessGroupsCreateAccessGroup.ts index 9e2d8e6f..acc58dff 100644 --- a/src/funcs/accessGroupsCreateAccessGroup.ts +++ b/src/funcs/accessGroupsCreateAccessGroup.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,10 +82,10 @@ export async function accessGroupsCreateAccessGroup( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,8 +150,9 @@ export async function accessGroupsCreateAccessGroup( M.json(200, CreateAccessGroupResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsCreateAccessGroupProject.ts b/src/funcs/accessGroupsCreateAccessGroupProject.ts index 676bc0dd..8c7af12f 100644 --- a/src/funcs/accessGroupsCreateAccessGroupProject.ts +++ b/src/funcs/accessGroupsCreateAccessGroupProject.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -91,10 +92,10 @@ export async function accessGroupsCreateAccessGroupProject( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -159,8 +160,9 @@ export async function accessGroupsCreateAccessGroupProject( M.json(200, CreateAccessGroupProjectResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsDeleteAccessGroup.ts b/src/funcs/accessGroupsDeleteAccessGroup.ts index 7aef18f6..0a9f3be2 100644 --- a/src/funcs/accessGroupsDeleteAccessGroup.ts +++ b/src/funcs/accessGroupsDeleteAccessGroup.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function accessGroupsDeleteAccessGroup( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function accessGroupsDeleteAccessGroup( M.nil(200, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsDeleteAccessGroupProject.ts b/src/funcs/accessGroupsDeleteAccessGroupProject.ts index 07148b7b..8f6434e1 100644 --- a/src/funcs/accessGroupsDeleteAccessGroupProject.ts +++ b/src/funcs/accessGroupsDeleteAccessGroupProject.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -94,9 +95,9 @@ export async function accessGroupsDeleteAccessGroupProject( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -161,8 +162,9 @@ export async function accessGroupsDeleteAccessGroupProject( M.nil(200, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsListAccessGroupMembers.ts b/src/funcs/accessGroupsListAccessGroupMembers.ts index a1f4904b..657215b5 100644 --- a/src/funcs/accessGroupsListAccessGroupMembers.ts +++ b/src/funcs/accessGroupsListAccessGroupMembers.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -91,9 +92,9 @@ export async function accessGroupsListAccessGroupMembers( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -158,8 +159,9 @@ export async function accessGroupsListAccessGroupMembers( M.json(200, ListAccessGroupMembersResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsListAccessGroupProjects.ts b/src/funcs/accessGroupsListAccessGroupProjects.ts index f991dfc9..26cb4e92 100644 --- a/src/funcs/accessGroupsListAccessGroupProjects.ts +++ b/src/funcs/accessGroupsListAccessGroupProjects.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -90,9 +91,9 @@ export async function accessGroupsListAccessGroupProjects( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -157,8 +158,9 @@ export async function accessGroupsListAccessGroupProjects( M.json(200, ListAccessGroupProjectsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsListAccessGroups.ts b/src/funcs/accessGroupsListAccessGroups.ts index bf025390..7f0e866d 100644 --- a/src/funcs/accessGroupsListAccessGroups.ts +++ b/src/funcs/accessGroupsListAccessGroups.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function accessGroupsListAccessGroups( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function accessGroupsListAccessGroups( M.json(200, ListAccessGroupsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsReadAccessGroup.ts b/src/funcs/accessGroupsReadAccessGroup.ts index 6a0a8384..0be30e03 100644 --- a/src/funcs/accessGroupsReadAccessGroup.ts +++ b/src/funcs/accessGroupsReadAccessGroup.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function accessGroupsReadAccessGroup( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function accessGroupsReadAccessGroup( M.json(200, ReadAccessGroupResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsReadAccessGroupProject.ts b/src/funcs/accessGroupsReadAccessGroupProject.ts index a9a38ba8..64bef0fc 100644 --- a/src/funcs/accessGroupsReadAccessGroupProject.ts +++ b/src/funcs/accessGroupsReadAccessGroupProject.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -95,9 +96,9 @@ export async function accessGroupsReadAccessGroupProject( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -162,8 +163,9 @@ export async function accessGroupsReadAccessGroupProject( M.json(200, ReadAccessGroupProjectResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsUpdateAccessGroup.ts b/src/funcs/accessGroupsUpdateAccessGroup.ts index e8be4804..9963304d 100644 --- a/src/funcs/accessGroupsUpdateAccessGroup.ts +++ b/src/funcs/accessGroupsUpdateAccessGroup.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function accessGroupsUpdateAccessGroup( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function accessGroupsUpdateAccessGroup( M.json(200, UpdateAccessGroupResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/accessGroupsUpdateAccessGroupProject.ts b/src/funcs/accessGroupsUpdateAccessGroupProject.ts index a8b0f553..0f4938b6 100644 --- a/src/funcs/accessGroupsUpdateAccessGroupProject.ts +++ b/src/funcs/accessGroupsUpdateAccessGroupProject.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -95,10 +96,10 @@ export async function accessGroupsUpdateAccessGroupProject( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -163,8 +164,9 @@ export async function accessGroupsUpdateAccessGroupProject( M.json(200, UpdateAccessGroupProjectResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/aliasesAssignAlias.ts b/src/funcs/aliasesAssignAlias.ts index b42f0858..694b416b 100644 --- a/src/funcs/aliasesAssignAlias.ts +++ b/src/funcs/aliasesAssignAlias.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function aliasesAssignAlias( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function aliasesAssignAlias( M.json(200, AssignAliasResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", "5XX"]), + M.fail([402, 403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/aliasesDeleteAlias.ts b/src/funcs/aliasesDeleteAlias.ts index 86a6ef44..ef141043 100644 --- a/src/funcs/aliasesDeleteAlias.ts +++ b/src/funcs/aliasesDeleteAlias.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function aliasesDeleteAlias( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function aliasesDeleteAlias( M.json(200, DeleteAliasResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/aliasesGetAlias.ts b/src/funcs/aliasesGetAlias.ts index 71bfcab4..d4fd4e40 100644 --- a/src/funcs/aliasesGetAlias.ts +++ b/src/funcs/aliasesGetAlias.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -92,9 +93,9 @@ export async function aliasesGetAlias( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -159,8 +160,9 @@ export async function aliasesGetAlias( M.json(200, GetAliasResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/aliasesListAliases.ts b/src/funcs/aliasesListAliases.ts index 83543127..259547a5 100644 --- a/src/funcs/aliasesListAliases.ts +++ b/src/funcs/aliasesListAliases.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function aliasesListAliases( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function aliasesListAliases( M.json(200, ListAliasesResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/aliasesListDeploymentAliases.ts b/src/funcs/aliasesListDeploymentAliases.ts index be155f7b..805fc5b8 100644 --- a/src/funcs/aliasesListDeploymentAliases.ts +++ b/src/funcs/aliasesListDeploymentAliases.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function aliasesListDeploymentAliases( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function aliasesListDeploymentAliases( M.json(200, ListDeploymentAliasesResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/artifactsArtifactExists.ts b/src/funcs/artifactsArtifactExists.ts index a9e7f1ae..99e0e2db 100644 --- a/src/funcs/artifactsArtifactExists.ts +++ b/src/funcs/artifactsArtifactExists.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function artifactsArtifactExists( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function artifactsArtifactExists( M.nil(200, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/artifactsArtifactQuery.ts b/src/funcs/artifactsArtifactQuery.ts index 2d589ab4..cae20dd1 100644 --- a/src/funcs/artifactsArtifactQuery.ts +++ b/src/funcs/artifactsArtifactQuery.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -77,10 +78,10 @@ export async function artifactsArtifactQuery( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -144,7 +145,8 @@ export async function artifactsArtifactQuery( M.json(200, z.record(ResponseBody$inboundSchema)), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/artifactsDownloadArtifact.ts b/src/funcs/artifactsDownloadArtifact.ts index 1101837d..86795749 100644 --- a/src/funcs/artifactsDownloadArtifact.ts +++ b/src/funcs/artifactsDownloadArtifact.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,7 +88,7 @@ export async function artifactsDownloadArtifact( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", "x-artifact-client-ci": encodeSimple( "x-artifact-client-ci", @@ -99,7 +100,7 @@ export async function artifactsDownloadArtifact( payload["x-artifact-client-interactive"], { explode: false, charEncoding: "none" }, ), - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -166,8 +167,9 @@ export async function artifactsDownloadArtifact( }), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/artifactsRecordEvents.ts b/src/funcs/artifactsRecordEvents.ts index 0ecc9f1e..3581e457 100644 --- a/src/funcs/artifactsRecordEvents.ts +++ b/src/funcs/artifactsRecordEvents.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -75,7 +76,7 @@ export async function artifactsRecordEvents( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "x-artifact-client-ci": encodeSimple( @@ -88,7 +89,7 @@ export async function artifactsRecordEvents( payload["x-artifact-client-interactive"], { explode: false, charEncoding: "none" }, ), - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -152,7 +153,8 @@ export async function artifactsRecordEvents( M.nil(200, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/artifactsStatus.ts b/src/funcs/artifactsStatus.ts index 1ac00df0..d847c7fd 100644 --- a/src/funcs/artifactsStatus.ts +++ b/src/funcs/artifactsStatus.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,9 +77,9 @@ export async function artifactsStatus( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -142,7 +143,8 @@ export async function artifactsStatus( M.json(200, StatusResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/artifactsUploadArtifact.ts b/src/funcs/artifactsUploadArtifact.ts index 41e168da..3d6427e2 100644 --- a/src/funcs/artifactsUploadArtifact.ts +++ b/src/funcs/artifactsUploadArtifact.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,7 +84,7 @@ export async function artifactsUploadArtifact( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/octet-stream", Accept: "application/json", "Content-Length": encodeSimple( @@ -111,7 +112,7 @@ export async function artifactsUploadArtifact( payload["x-artifact-tag"], { explode: false, charEncoding: "none" }, ), - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -175,7 +176,8 @@ export async function artifactsUploadArtifact( M.json(202, UploadArtifactResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/authenticationCreateAuthToken.ts b/src/funcs/authenticationCreateAuthToken.ts index 8d93412d..c480f60f 100644 --- a/src/funcs/authenticationCreateAuthToken.ts +++ b/src/funcs/authenticationCreateAuthToken.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,10 +77,10 @@ export async function authenticationCreateAuthToken( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function authenticationCreateAuthToken( M.json(200, CreateAuthTokenResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/authenticationDeleteAuthToken.ts b/src/funcs/authenticationDeleteAuthToken.ts index fca1fa8e..8501ae37 100644 --- a/src/funcs/authenticationDeleteAuthToken.ts +++ b/src/funcs/authenticationDeleteAuthToken.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,9 +84,9 @@ export async function authenticationDeleteAuthToken( const path = pathToFunc("/v3/user/tokens/{tokenId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,8 +150,9 @@ export async function authenticationDeleteAuthToken( M.json(200, DeleteAuthTokenResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/authenticationExchangeSsoToken.ts b/src/funcs/authenticationExchangeSsoToken.ts index 5bcafbd5..c8be7f0d 100644 --- a/src/funcs/authenticationExchangeSsoToken.ts +++ b/src/funcs/authenticationExchangeSsoToken.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; @@ -70,10 +71,10 @@ export async function authenticationExchangeSsoToken( const path = pathToFunc("/v1/integrations/sso/token")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const context = { operationID: "exchange-sso-token", @@ -131,7 +132,8 @@ export async function authenticationExchangeSsoToken( M.json(200, ExchangeSsoTokenResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(404, VercelNotFoundError$inboundSchema), - M.fail(["4XX", 500, "5XX"]), + M.fail([500, "5XX"]), + M.fail("4XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/authenticationGetAuthToken.ts b/src/funcs/authenticationGetAuthToken.ts index 85c6d70b..0478b09d 100644 --- a/src/funcs/authenticationGetAuthToken.ts +++ b/src/funcs/authenticationGetAuthToken.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,9 +84,9 @@ export async function authenticationGetAuthToken( const path = pathToFunc("/v5/user/tokens/{tokenId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,8 +150,9 @@ export async function authenticationGetAuthToken( M.json(200, GetAuthTokenResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/authenticationListAuthTokens.ts b/src/funcs/authenticationListAuthTokens.ts index 95a0397f..442b918e 100644 --- a/src/funcs/authenticationListAuthTokens.ts +++ b/src/funcs/authenticationListAuthTokens.ts @@ -4,6 +4,7 @@ import { VercelCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -55,9 +56,9 @@ export async function authenticationListAuthTokens( > { const path = pathToFunc("/v5/user/tokens")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -119,7 +120,8 @@ export async function authenticationListAuthTokens( M.json(200, ListAuthTokensResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/certsGetCertById.ts b/src/funcs/certsGetCertById.ts index 141e5564..e6330421 100644 --- a/src/funcs/certsGetCertById.ts +++ b/src/funcs/certsGetCertById.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function certsGetCertById( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function certsGetCertById( M.json(200, GetCertByIdResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/certsIssueCert.ts b/src/funcs/certsIssueCert.ts index 3431b206..63bd496a 100644 --- a/src/funcs/certsIssueCert.ts +++ b/src/funcs/certsIssueCert.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,10 +82,10 @@ export async function certsIssueCert( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,8 +150,9 @@ export async function certsIssueCert( M.json(200, IssueCertResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 449, "4XX", 500, "5XX"]), + M.fail([402, 403, 449, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([500, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/certsRemoveCert.ts b/src/funcs/certsRemoveCert.ts index 87e965c8..c4489cd7 100644 --- a/src/funcs/certsRemoveCert.ts +++ b/src/funcs/certsRemoveCert.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function certsRemoveCert( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function certsRemoveCert( M.json(200, RemoveCertResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/certsUploadCert.ts b/src/funcs/certsUploadCert.ts index fb1e2925..9d3d905e 100644 --- a/src/funcs/certsUploadCert.ts +++ b/src/funcs/certsUploadCert.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,10 +77,10 @@ export async function certsUploadCert( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function certsUploadCert( M.json(200, UploadCertResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/checksCreateCheck.ts b/src/funcs/checksCreateCheck.ts index bcc6f7ef..94276376 100644 --- a/src/funcs/checksCreateCheck.ts +++ b/src/funcs/checksCreateCheck.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function checksCreateCheck( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function checksCreateCheck( M.json(200, CreateCheckResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/checksGetAllChecks.ts b/src/funcs/checksGetAllChecks.ts index ddb1d7c3..f0b6f2a1 100644 --- a/src/funcs/checksGetAllChecks.ts +++ b/src/funcs/checksGetAllChecks.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function checksGetAllChecks( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function checksGetAllChecks( M.json(200, GetAllChecksResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/checksGetCheck.ts b/src/funcs/checksGetCheck.ts index 868d0b92..fda4a278 100644 --- a/src/funcs/checksGetCheck.ts +++ b/src/funcs/checksGetCheck.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -94,9 +95,9 @@ export async function checksGetCheck( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -161,8 +162,9 @@ export async function checksGetCheck( M.json(200, GetCheckResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/checksRerequestCheck.ts b/src/funcs/checksRerequestCheck.ts index 42c86348..b3667eb7 100644 --- a/src/funcs/checksRerequestCheck.ts +++ b/src/funcs/checksRerequestCheck.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -94,9 +95,9 @@ export async function checksRerequestCheck( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -161,8 +162,9 @@ export async function checksRerequestCheck( M.json(200, RerequestCheckResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/checksUpdateCheck.ts b/src/funcs/checksUpdateCheck.ts index 6f19085b..b8b478e3 100644 --- a/src/funcs/checksUpdateCheck.ts +++ b/src/funcs/checksUpdateCheck.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -94,10 +95,10 @@ export async function checksUpdateCheck( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -162,8 +163,9 @@ export async function checksUpdateCheck( M.json(200, UpdateCheckResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 413, "4XX", "5XX"]), + M.fail([403, 413, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/deploymentsCancelDeployment.ts b/src/funcs/deploymentsCancelDeployment.ts index 6b6b50f8..97d8c271 100644 --- a/src/funcs/deploymentsCancelDeployment.ts +++ b/src/funcs/deploymentsCancelDeployment.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function deploymentsCancelDeployment( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function deploymentsCancelDeployment( M.json(200, CancelDeploymentResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/deploymentsCreateDeployment.ts b/src/funcs/deploymentsCreateDeployment.ts index 942e5b74..c1ab82ec 100644 --- a/src/funcs/deploymentsCreateDeployment.ts +++ b/src/funcs/deploymentsCreateDeployment.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,10 +84,10 @@ export async function deploymentsCreateDeployment( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -151,8 +152,9 @@ export async function deploymentsCreateDeployment( M.json(200, CreateDeploymentResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", "5XX"]), + M.fail([402, 403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/deploymentsDeleteDeployment.ts b/src/funcs/deploymentsDeleteDeployment.ts index 3ac77457..41855f15 100644 --- a/src/funcs/deploymentsDeleteDeployment.ts +++ b/src/funcs/deploymentsDeleteDeployment.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -89,9 +90,9 @@ export async function deploymentsDeleteDeployment( "url": payload.url, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function deploymentsDeleteDeployment( M.json(200, DeleteDeploymentResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/deploymentsGetDeployment.ts b/src/funcs/deploymentsGetDeployment.ts index 6e2d7139..81174fc9 100644 --- a/src/funcs/deploymentsGetDeployment.ts +++ b/src/funcs/deploymentsGetDeployment.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -84,9 +85,9 @@ export async function deploymentsGetDeployment( "withGitRepoInfo": payload.withGitRepoInfo, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,8 +150,9 @@ export async function deploymentsGetDeployment( >( M.json(200, GetDeploymentResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/deploymentsGetDeploymentEvents.ts b/src/funcs/deploymentsGetDeploymentEvents.ts index 983178ff..69468f47 100644 --- a/src/funcs/deploymentsGetDeploymentEvents.ts +++ b/src/funcs/deploymentsGetDeploymentEvents.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -91,9 +92,9 @@ export async function deploymentsGetDeploymentEvents( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,7 +157,8 @@ export async function deploymentsGetDeploymentEvents( >( M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", 500, "5XX"]), + M.fail([403, "4XX"]), + M.fail([500, "5XX"]), M.nil("2XX", z.void()), )(response, { extraFields: responseFields }); if (!result.ok) { diff --git a/src/funcs/deploymentsGetDeploymentFileContents.ts b/src/funcs/deploymentsGetDeploymentFileContents.ts index 11f5760d..b669d204 100644 --- a/src/funcs/deploymentsGetDeploymentFileContents.ts +++ b/src/funcs/deploymentsGetDeploymentFileContents.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -92,9 +93,9 @@ export async function deploymentsGetDeploymentFileContents( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -158,9 +159,10 @@ export async function deploymentsGetDeploymentFileContents( >( M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 410, "4XX", "5XX"]), + M.fail([403, 410, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), M.nil("2XX", z.void()), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/deploymentsGetDeployments.ts b/src/funcs/deploymentsGetDeployments.ts index a434763b..ab75a094 100644 --- a/src/funcs/deploymentsGetDeployments.ts +++ b/src/funcs/deploymentsGetDeployments.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -92,9 +93,9 @@ export async function deploymentsGetDeployments( "users": payload.users, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -159,8 +160,9 @@ export async function deploymentsGetDeployments( M.json(200, GetDeploymentsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 422, "4XX", "5XX"]), + M.fail([403, 422, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/deploymentsListDeploymentFiles.ts b/src/funcs/deploymentsListDeploymentFiles.ts index be486e7d..4e10db7d 100644 --- a/src/funcs/deploymentsListDeploymentFiles.ts +++ b/src/funcs/deploymentsListDeploymentFiles.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function deploymentsListDeploymentFiles( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function deploymentsListDeploymentFiles( M.json(200, z.array(FileTree$inboundSchema)), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/deploymentsUploadFile.ts b/src/funcs/deploymentsUploadFile.ts index 7ac68a1b..d14f3561 100644 --- a/src/funcs/deploymentsUploadFile.ts +++ b/src/funcs/deploymentsUploadFile.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,7 +77,7 @@ export async function deploymentsUploadFile( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", "Content-Length": encodeSimple( "Content-Length", @@ -96,7 +97,7 @@ export async function deploymentsUploadFile( payload["x-vercel-digest"], { explode: false, charEncoding: "none" }, ), - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -160,7 +161,8 @@ export async function deploymentsUploadFile( M.json(200, UploadFileResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/dnsCreateRecord.ts b/src/funcs/dnsCreateRecord.ts index a51ae9a3..483f5c3c 100644 --- a/src/funcs/dnsCreateRecord.ts +++ b/src/funcs/dnsCreateRecord.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function dnsCreateRecord( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function dnsCreateRecord( M.json(200, CreateRecordResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", "5XX"]), + M.fail([402, 403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/dnsGetRecords.ts b/src/funcs/dnsGetRecords.ts index 19fbf473..76ecdbc3 100644 --- a/src/funcs/dnsGetRecords.ts +++ b/src/funcs/dnsGetRecords.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -91,9 +92,9 @@ export async function dnsGetRecords( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -158,8 +159,9 @@ export async function dnsGetRecords( M.json(200, GetRecordsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/dnsRemoveRecord.ts b/src/funcs/dnsRemoveRecord.ts index 43010027..80e39220 100644 --- a/src/funcs/dnsRemoveRecord.ts +++ b/src/funcs/dnsRemoveRecord.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -94,9 +95,9 @@ export async function dnsRemoveRecord( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -161,8 +162,9 @@ export async function dnsRemoveRecord( M.json(200, RemoveRecordResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/dnsUpdateRecord.ts b/src/funcs/dnsUpdateRecord.ts index cd05c9b7..f326c968 100644 --- a/src/funcs/dnsUpdateRecord.ts +++ b/src/funcs/dnsUpdateRecord.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function dnsUpdateRecord( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function dnsUpdateRecord( M.json(200, UpdateRecordResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", "5XX"]), + M.fail([402, 403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsBuyDomain.ts b/src/funcs/domainsBuyDomain.ts index bb2c79e8..9307b13f 100644 --- a/src/funcs/domainsBuyDomain.ts +++ b/src/funcs/domainsBuyDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,10 +82,10 @@ export async function domainsBuyDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,8 +151,9 @@ export async function domainsBuyDomain( M.json(202, BuyDomainResponse$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), M.jsonErr(429, VercelRateLimitError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsCheckDomainPrice.ts b/src/funcs/domainsCheckDomainPrice.ts index 199e86bb..a0d2f1bd 100644 --- a/src/funcs/domainsCheckDomainPrice.ts +++ b/src/funcs/domainsCheckDomainPrice.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -78,9 +79,9 @@ export async function domainsCheckDomainPrice( "type": payload.type, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -144,7 +145,8 @@ export async function domainsCheckDomainPrice( M.json(200, CheckDomainPriceResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsCheckDomainStatus.ts b/src/funcs/domainsCheckDomainStatus.ts index 30234792..60c9b748 100644 --- a/src/funcs/domainsCheckDomainStatus.ts +++ b/src/funcs/domainsCheckDomainStatus.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -77,9 +78,9 @@ export async function domainsCheckDomainStatus( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function domainsCheckDomainStatus( M.json(200, CheckDomainStatusResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsCreateOrTransferDomain.ts b/src/funcs/domainsCreateOrTransferDomain.ts index 1021c07f..ad0b9b99 100644 --- a/src/funcs/domainsCreateOrTransferDomain.ts +++ b/src/funcs/domainsCreateOrTransferDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,10 +82,10 @@ export async function domainsCreateOrTransferDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,8 +150,9 @@ export async function domainsCreateOrTransferDomain( M.json(200, CreateOrTransferDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", 500, "5XX"]), + M.fail([402, 403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([500, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsDeleteDomain.ts b/src/funcs/domainsDeleteDomain.ts index a6d6b7ab..ad6cd98b 100644 --- a/src/funcs/domainsDeleteDomain.ts +++ b/src/funcs/domainsDeleteDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function domainsDeleteDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function domainsDeleteDomain( M.json(200, DeleteDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsGetDomain.ts b/src/funcs/domainsGetDomain.ts index 1e642317..a3a3d890 100644 --- a/src/funcs/domainsGetDomain.ts +++ b/src/funcs/domainsGetDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function domainsGetDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function domainsGetDomain( M.json(200, GetDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsGetDomainConfig.ts b/src/funcs/domainsGetDomainConfig.ts index 3790a6fc..3b654bd9 100644 --- a/src/funcs/domainsGetDomainConfig.ts +++ b/src/funcs/domainsGetDomainConfig.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -84,9 +85,9 @@ export async function domainsGetDomainConfig( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,7 +151,8 @@ export async function domainsGetDomainConfig( M.json(200, GetDomainConfigResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", 500, "5XX"]), + M.fail([403, "4XX"]), + M.fail([500, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsGetDomainTransfer.ts b/src/funcs/domainsGetDomainTransfer.ts index ecd4d283..071b85b9 100644 --- a/src/funcs/domainsGetDomainTransfer.ts +++ b/src/funcs/domainsGetDomainTransfer.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,9 +84,9 @@ export async function domainsGetDomainTransfer( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,7 +150,8 @@ export async function domainsGetDomainTransfer( M.json(200, GetDomainTransferResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsGetDomains.ts b/src/funcs/domainsGetDomains.ts index 274cc886..b751a8bc 100644 --- a/src/funcs/domainsGetDomains.ts +++ b/src/funcs/domainsGetDomains.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -79,9 +80,9 @@ export async function domainsGetDomains( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -145,7 +146,8 @@ export async function domainsGetDomains( M.json(200, GetDomainsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/domainsPatchDomain.ts b/src/funcs/domainsPatchDomain.ts index 9e88e0cb..cff343ea 100644 --- a/src/funcs/domainsPatchDomain.ts +++ b/src/funcs/domainsPatchDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function domainsPatchDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function domainsPatchDomain( M.json(200, PatchDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigCreateEdgeConfig.ts b/src/funcs/edgeConfigCreateEdgeConfig.ts index 9a759da5..bbd35527 100644 --- a/src/funcs/edgeConfigCreateEdgeConfig.ts +++ b/src/funcs/edgeConfigCreateEdgeConfig.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,10 +77,10 @@ export async function edgeConfigCreateEdgeConfig( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function edgeConfigCreateEdgeConfig( M.json(201, CreateEdgeConfigResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigCreateEdgeConfigToken.ts b/src/funcs/edgeConfigCreateEdgeConfigToken.ts index 1e60f3bc..75fc5dc6 100644 --- a/src/funcs/edgeConfigCreateEdgeConfigToken.ts +++ b/src/funcs/edgeConfigCreateEdgeConfigToken.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function edgeConfigCreateEdgeConfigToken( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function edgeConfigCreateEdgeConfigToken( M.json(201, CreateEdgeConfigTokenResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigDeleteEdgeConfig.ts b/src/funcs/edgeConfigDeleteEdgeConfig.ts index 044a155e..f46e783d 100644 --- a/src/funcs/edgeConfigDeleteEdgeConfig.ts +++ b/src/funcs/edgeConfigDeleteEdgeConfig.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function edgeConfigDeleteEdgeConfig( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function edgeConfigDeleteEdgeConfig( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigDeleteEdgeConfigSchema.ts b/src/funcs/edgeConfigDeleteEdgeConfigSchema.ts index 45266c77..b4c61430 100644 --- a/src/funcs/edgeConfigDeleteEdgeConfigSchema.ts +++ b/src/funcs/edgeConfigDeleteEdgeConfigSchema.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function edgeConfigDeleteEdgeConfigSchema( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function edgeConfigDeleteEdgeConfigSchema( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigDeleteEdgeConfigTokens.ts b/src/funcs/edgeConfigDeleteEdgeConfigTokens.ts index a2fffeaf..179396d7 100644 --- a/src/funcs/edgeConfigDeleteEdgeConfigTokens.ts +++ b/src/funcs/edgeConfigDeleteEdgeConfigTokens.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,10 +88,10 @@ export async function edgeConfigDeleteEdgeConfigTokens( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function edgeConfigDeleteEdgeConfigTokens( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfig.ts b/src/funcs/edgeConfigGetEdgeConfig.ts index bd5bd364..22099693 100644 --- a/src/funcs/edgeConfigGetEdgeConfig.ts +++ b/src/funcs/edgeConfigGetEdgeConfig.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function edgeConfigGetEdgeConfig( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function edgeConfigGetEdgeConfig( M.json(200, GetEdgeConfigResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfigBackup.ts b/src/funcs/edgeConfigGetEdgeConfigBackup.ts index e4b8c925..8b8d7b45 100644 --- a/src/funcs/edgeConfigGetEdgeConfigBackup.ts +++ b/src/funcs/edgeConfigGetEdgeConfigBackup.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -95,9 +96,9 @@ export async function edgeConfigGetEdgeConfigBackup( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -162,8 +163,9 @@ export async function edgeConfigGetEdgeConfigBackup( M.json(200, GetEdgeConfigBackupResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfigBackups.ts b/src/funcs/edgeConfigGetEdgeConfigBackups.ts index 06c634c4..b09d22c6 100644 --- a/src/funcs/edgeConfigGetEdgeConfigBackups.ts +++ b/src/funcs/edgeConfigGetEdgeConfigBackups.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -91,9 +92,9 @@ export async function edgeConfigGetEdgeConfigBackups( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -158,8 +159,9 @@ export async function edgeConfigGetEdgeConfigBackups( M.json(200, GetEdgeConfigBackupsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfigItem.ts b/src/funcs/edgeConfigGetEdgeConfigItem.ts index 969f1975..d3739dfb 100644 --- a/src/funcs/edgeConfigGetEdgeConfigItem.ts +++ b/src/funcs/edgeConfigGetEdgeConfigItem.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -97,9 +98,9 @@ export async function edgeConfigGetEdgeConfigItem( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -164,8 +165,9 @@ export async function edgeConfigGetEdgeConfigItem( M.json(200, EdgeConfigItem$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfigItems.ts b/src/funcs/edgeConfigGetEdgeConfigItems.ts index bbaa5cde..a088e541 100644 --- a/src/funcs/edgeConfigGetEdgeConfigItems.ts +++ b/src/funcs/edgeConfigGetEdgeConfigItems.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -90,9 +91,9 @@ export async function edgeConfigGetEdgeConfigItems( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -157,8 +158,9 @@ export async function edgeConfigGetEdgeConfigItems( M.json(200, EdgeConfigItem$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfigSchema.ts b/src/funcs/edgeConfigGetEdgeConfigSchema.ts index f133b3da..0774a718 100644 --- a/src/funcs/edgeConfigGetEdgeConfigSchema.ts +++ b/src/funcs/edgeConfigGetEdgeConfigSchema.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function edgeConfigGetEdgeConfigSchema( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function edgeConfigGetEdgeConfigSchema( M.json(200, GetEdgeConfigSchemaResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfigToken.ts b/src/funcs/edgeConfigGetEdgeConfigToken.ts index b8e8e3a7..6ff8145c 100644 --- a/src/funcs/edgeConfigGetEdgeConfigToken.ts +++ b/src/funcs/edgeConfigGetEdgeConfigToken.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -96,9 +97,9 @@ export async function edgeConfigGetEdgeConfigToken( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -163,8 +164,9 @@ export async function edgeConfigGetEdgeConfigToken( M.json(200, EdgeConfigToken$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfigTokens.ts b/src/funcs/edgeConfigGetEdgeConfigTokens.ts index c5f2a742..0fbbe450 100644 --- a/src/funcs/edgeConfigGetEdgeConfigTokens.ts +++ b/src/funcs/edgeConfigGetEdgeConfigTokens.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -90,9 +91,9 @@ export async function edgeConfigGetEdgeConfigTokens( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -157,8 +158,9 @@ export async function edgeConfigGetEdgeConfigTokens( M.json(200, EdgeConfigToken$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigGetEdgeConfigs.ts b/src/funcs/edgeConfigGetEdgeConfigs.ts index 765dd33f..28b1b205 100644 --- a/src/funcs/edgeConfigGetEdgeConfigs.ts +++ b/src/funcs/edgeConfigGetEdgeConfigs.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -77,9 +78,9 @@ export async function edgeConfigGetEdgeConfigs( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function edgeConfigGetEdgeConfigs( M.json(200, z.array(GetEdgeConfigsResponseBody$inboundSchema)), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigPatchEdgeConfigSchema.ts b/src/funcs/edgeConfigPatchEdgeConfigSchema.ts index d8bb9af8..a003fe60 100644 --- a/src/funcs/edgeConfigPatchEdgeConfigSchema.ts +++ b/src/funcs/edgeConfigPatchEdgeConfigSchema.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -89,10 +90,10 @@ export async function edgeConfigPatchEdgeConfigSchema( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -157,8 +158,9 @@ export async function edgeConfigPatchEdgeConfigSchema( M.json(200, PatchEdgeConfigSchemaResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/edgeConfigUpdateEdgeConfig.ts b/src/funcs/edgeConfigUpdateEdgeConfig.ts index df47b7ce..93c32f8c 100644 --- a/src/funcs/edgeConfigUpdateEdgeConfig.ts +++ b/src/funcs/edgeConfigUpdateEdgeConfig.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function edgeConfigUpdateEdgeConfig( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function edgeConfigUpdateEdgeConfig( M.json(200, UpdateEdgeConfigResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts b/src/funcs/environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts new file mode 100644 index 00000000..867318a1 --- /dev/null +++ b/src/funcs/environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { VercelCore } from "../core.js"; +import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema, + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema, +} from "../models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Remove a custom environment + * + * @remarks + * Remove a custom environment for the project. Must not be named 'Production' or 'Preview'. + */ +export async function environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + client: VercelCore, + request: DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + options?: RequestOptions, +): Promise< + Result< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + environmentSlugOrId: encodeSimple( + "environmentSlugOrId", + payload.environmentSlugOrId, + { explode: false, charEncoding: "percent" }, + ), + idOrName: encodeSimple("idOrName", payload.idOrName, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + )(pathParams); + + const query = encodeFormQuery({ + "slug": payload.slug, + "teamId": payload.teamId, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: + "delete_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema, + ), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([403, "4XX"]), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironments.ts b/src/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironments.ts new file mode 100644 index 00000000..ff919f85 --- /dev/null +++ b/src/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironments.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { VercelCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + GetV9ProjectsIdOrNameCustomEnvironmentsRequest, + GetV9ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema, + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody, + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema, +} from "../models/getv9projectsidornamecustomenvironmentsop.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Retrieve custom environments + * + * @remarks + * Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'. + */ +export async function environmentGetV9ProjectsIdOrNameCustomEnvironments( + client: VercelCore, + request: GetV9ProjectsIdOrNameCustomEnvironmentsRequest, + options?: RequestOptions, +): Promise< + Result< + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + GetV9ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + idOrName: encodeSimple("idOrName", payload.idOrName, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v9/projects/{idOrName}/custom-environments")( + pathParams, + ); + + const query = encodeFormQuery({ + "gitBranch": payload.gitBranch, + "slug": payload.slug, + "teamId": payload.teamId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get_/v9/projects/{idOrName}/custom-environments", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema, + ), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([403, "4XX"]), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts b/src/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts new file mode 100644 index 00000000..c36116a6 --- /dev/null +++ b/src/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { VercelCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema, + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema, +} from "../models/getv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { + VercelNotFoundError, + VercelNotFoundError$inboundSchema, +} from "../models/vercelnotfounderror.js"; +import { Result } from "../types/fp.js"; + +/** + * Retrieve a custom environment + * + * @remarks + * Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'. + */ +export async function environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + client: VercelCore, + request: GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + options?: RequestOptions, +): Promise< + Result< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + environmentSlugOrId: encodeSimple( + "environmentSlugOrId", + payload.environmentSlugOrId, + { explode: false, charEncoding: "percent" }, + ), + idOrName: encodeSimple("idOrName", payload.idOrName, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + )(pathParams); + + const query = encodeFormQuery({ + "slug": payload.slug, + "teamId": payload.teamId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: + "get_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema, + ), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([403, "4XX"]), + M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts b/src/funcs/environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts new file mode 100644 index 00000000..18ff4c25 --- /dev/null +++ b/src/funcs/environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { VercelCore } from "../core.js"; +import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema, +} from "../models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a custom environment + * + * @remarks + * Update a custom environment for the project. Must not be named 'Production' or 'Preview'. + */ +export async function environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + client: VercelCore, + request: PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + options?: RequestOptions, +): Promise< + Result< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + environmentSlugOrId: encodeSimple( + "environmentSlugOrId", + payload.environmentSlugOrId, + { explode: false, charEncoding: "percent" }, + ), + idOrName: encodeSimple("idOrName", payload.idOrName, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + )(pathParams); + + const query = encodeFormQuery({ + "slug": payload.slug, + "teamId": payload.teamId, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: + "patch_/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "402", "403", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema, + ), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([402, 403, "4XX"]), + M.fail([500, "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/environmentPostV1ProjectsIdOrNameCustomEnvironments.ts b/src/funcs/environmentPostV1ProjectsIdOrNameCustomEnvironments.ts new file mode 100644 index 00000000..5d25f568 --- /dev/null +++ b/src/funcs/environmentPostV1ProjectsIdOrNameCustomEnvironments.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { VercelCore } from "../core.js"; +import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { + PostV1ProjectsIdOrNameCustomEnvironmentsRequest, + PostV1ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema, + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody, + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema, +} from "../models/postv1projectsidornamecustomenvironmentsop.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a custom environment for the current project. + * + * @remarks + * Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'. + */ +export async function environmentPostV1ProjectsIdOrNameCustomEnvironments( + client: VercelCore, + request: PostV1ProjectsIdOrNameCustomEnvironmentsRequest, + options?: RequestOptions, +): Promise< + Result< + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + PostV1ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + idOrName: encodeSimple("idOrName", payload.idOrName, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/projects/{idOrName}/custom-environments")( + pathParams, + ); + + const query = encodeFormQuery({ + "slug": payload.slug, + "teamId": payload.teamId, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "post_/v1/projects/{idOrName}/custom-environments", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "402", "403", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 201, + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema, + ), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([402, 403, "4XX"]), + M.fail([500, "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/integrationsDeleteConfiguration.ts b/src/funcs/integrationsDeleteConfiguration.ts index 431849f4..b0cc2354 100644 --- a/src/funcs/integrationsDeleteConfiguration.ts +++ b/src/funcs/integrationsDeleteConfiguration.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function integrationsDeleteConfiguration( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function integrationsDeleteConfiguration( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/integrationsGetConfiguration.ts b/src/funcs/integrationsGetConfiguration.ts index 91531a92..639c96c9 100644 --- a/src/funcs/integrationsGetConfiguration.ts +++ b/src/funcs/integrationsGetConfiguration.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function integrationsGetConfiguration( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function integrationsGetConfiguration( M.json(200, GetConfigurationResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/integrationsGetConfigurations.ts b/src/funcs/integrationsGetConfigurations.ts index da07ee4b..24de5bb6 100644 --- a/src/funcs/integrationsGetConfigurations.ts +++ b/src/funcs/integrationsGetConfigurations.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -79,9 +80,9 @@ export async function integrationsGetConfigurations( "view": payload.view, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -145,7 +146,8 @@ export async function integrationsGetConfigurations( M.json(200, GetConfigurationsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/integrationsGitNamespaces.ts b/src/funcs/integrationsGitNamespaces.ts index 552e550a..2fcf6bd0 100644 --- a/src/funcs/integrationsGitNamespaces.ts +++ b/src/funcs/integrationsGitNamespaces.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -77,9 +78,9 @@ export async function integrationsGitNamespaces( "provider": payload.provider, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function integrationsGitNamespaces( M.json(200, z.array(GitNamespacesResponseBody$inboundSchema)), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/integrationsSearchRepo.ts b/src/funcs/integrationsSearchRepo.ts index e5e1c74d..05c5a80a 100644 --- a/src/funcs/integrationsSearchRepo.ts +++ b/src/funcs/integrationsSearchRepo.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,9 +77,9 @@ export async function integrationsSearchRepo( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -140,7 +141,8 @@ export async function integrationsSearchRepo( >( M.json(200, SearchRepoResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/logDrainsCreateConfigurableLogDrain.ts b/src/funcs/logDrainsCreateConfigurableLogDrain.ts index 2d5681de..396ebe96 100644 --- a/src/funcs/logDrainsCreateConfigurableLogDrain.ts +++ b/src/funcs/logDrainsCreateConfigurableLogDrain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,10 +77,10 @@ export async function logDrainsCreateConfigurableLogDrain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function logDrainsCreateConfigurableLogDrain( M.json(200, CreateConfigurableLogDrainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/logDrainsCreateLogDrain.ts b/src/funcs/logDrainsCreateLogDrain.ts index 93b188d2..51d4de5b 100644 --- a/src/funcs/logDrainsCreateLogDrain.ts +++ b/src/funcs/logDrainsCreateLogDrain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,10 +77,10 @@ export async function logDrainsCreateLogDrain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function logDrainsCreateLogDrain( M.json(200, CreateLogDrainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/logDrainsDeleteConfigurableLogDrain.ts b/src/funcs/logDrainsDeleteConfigurableLogDrain.ts index b177e815..fe0fa659 100644 --- a/src/funcs/logDrainsDeleteConfigurableLogDrain.ts +++ b/src/funcs/logDrainsDeleteConfigurableLogDrain.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function logDrainsDeleteConfigurableLogDrain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function logDrainsDeleteConfigurableLogDrain( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/logDrainsDeleteIntegrationLogDrain.ts b/src/funcs/logDrainsDeleteIntegrationLogDrain.ts index 54eb6850..f8c9aa76 100644 --- a/src/funcs/logDrainsDeleteIntegrationLogDrain.ts +++ b/src/funcs/logDrainsDeleteIntegrationLogDrain.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function logDrainsDeleteIntegrationLogDrain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function logDrainsDeleteIntegrationLogDrain( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/logDrainsGetAllLogDrains.ts b/src/funcs/logDrainsGetAllLogDrains.ts index 86cc2b2a..8a491534 100644 --- a/src/funcs/logDrainsGetAllLogDrains.ts +++ b/src/funcs/logDrainsGetAllLogDrains.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -78,9 +79,9 @@ export async function logDrainsGetAllLogDrains( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -144,7 +145,8 @@ export async function logDrainsGetAllLogDrains( M.json(200, z.array(GetAllLogDrainsResponseBody$inboundSchema)), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/logDrainsGetConfigurableLogDrain.ts b/src/funcs/logDrainsGetConfigurableLogDrain.ts index 1548cd88..75743676 100644 --- a/src/funcs/logDrainsGetConfigurableLogDrain.ts +++ b/src/funcs/logDrainsGetConfigurableLogDrain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function logDrainsGetConfigurableLogDrain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,8 +156,9 @@ export async function logDrainsGetConfigurableLogDrain( M.json(200, GetConfigurableLogDrainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/logDrainsGetIntegrationLogDrains.ts b/src/funcs/logDrainsGetIntegrationLogDrains.ts index 1c25e940..529c01d0 100644 --- a/src/funcs/logDrainsGetIntegrationLogDrains.ts +++ b/src/funcs/logDrainsGetIntegrationLogDrains.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -77,9 +78,9 @@ export async function logDrainsGetIntegrationLogDrains( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function logDrainsGetIntegrationLogDrains( M.json(200, z.array(GetIntegrationLogDrainsResponseBody$inboundSchema)), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceCreateEvent.ts b/src/funcs/marketplaceCreateEvent.ts index b60d5af3..70862085 100644 --- a/src/funcs/marketplaceCreateEvent.ts +++ b/src/funcs/marketplaceCreateEvent.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -80,10 +81,10 @@ export async function marketplaceCreateEvent( "/v1/installations/{integrationConfigurationId}/events", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -146,7 +147,8 @@ export async function marketplaceCreateEvent( M.nil(201, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceExchangeSsoToken.ts b/src/funcs/marketplaceExchangeSsoToken.ts index f0731b34..114175c3 100644 --- a/src/funcs/marketplaceExchangeSsoToken.ts +++ b/src/funcs/marketplaceExchangeSsoToken.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; @@ -70,10 +71,10 @@ export async function marketplaceExchangeSsoToken( const path = pathToFunc("/v1/integrations/sso/token")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const context = { operationID: "exchange-sso-token", @@ -131,7 +132,8 @@ export async function marketplaceExchangeSsoToken( M.json(200, ExchangeSsoTokenResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(404, VercelNotFoundError$inboundSchema), - M.fail(["4XX", 500, "5XX"]), + M.fail([500, "5XX"]), + M.fail("4XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceGetAccountInfo.ts b/src/funcs/marketplaceGetAccountInfo.ts index d77381d8..cafb25d6 100644 --- a/src/funcs/marketplaceGetAccountInfo.ts +++ b/src/funcs/marketplaceGetAccountInfo.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,9 +82,9 @@ export async function marketplaceGetAccountInfo( "/v1/installations/{integrationConfigurationId}/account", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -146,7 +147,8 @@ export async function marketplaceGetAccountInfo( M.json(200, GetAccountInfoResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceGetInvoice.ts b/src/funcs/marketplaceGetInvoice.ts index 51872b5e..7d816780 100644 --- a/src/funcs/marketplaceGetInvoice.ts +++ b/src/funcs/marketplaceGetInvoice.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -90,9 +91,9 @@ export async function marketplaceGetInvoice( "/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function marketplaceGetInvoice( M.json(200, GetInvoiceResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceGetMember.ts b/src/funcs/marketplaceGetMember.ts index fda5a4e7..ccad5a42 100644 --- a/src/funcs/marketplaceGetMember.ts +++ b/src/funcs/marketplaceGetMember.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -90,9 +91,9 @@ export async function marketplaceGetMember( "/v1/installations/{integrationConfigurationId}/member/{memberId}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function marketplaceGetMember( M.json(200, GetMemberResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceSubmitBillingData.ts b/src/funcs/marketplaceSubmitBillingData.ts index f993c63b..f6ca3b69 100644 --- a/src/funcs/marketplaceSubmitBillingData.ts +++ b/src/funcs/marketplaceSubmitBillingData.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -80,10 +81,10 @@ export async function marketplaceSubmitBillingData( "/v1/installations/{integrationConfigurationId}/billing", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -146,7 +147,8 @@ export async function marketplaceSubmitBillingData( M.nil(201, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceSubmitInvoice.ts b/src/funcs/marketplaceSubmitInvoice.ts index c41ede6a..6c9e4903 100644 --- a/src/funcs/marketplaceSubmitInvoice.ts +++ b/src/funcs/marketplaceSubmitInvoice.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,10 +82,10 @@ export async function marketplaceSubmitInvoice( "/v1/installations/{integrationConfigurationId}/billing/invoices", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -147,7 +148,8 @@ export async function marketplaceSubmitInvoice( M.json(200, SubmitInvoiceResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceUpdateInvoice.ts b/src/funcs/marketplaceUpdateInvoice.ts index e2615292..055e1bda 100644 --- a/src/funcs/marketplaceUpdateInvoice.ts +++ b/src/funcs/marketplaceUpdateInvoice.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -89,10 +90,10 @@ export async function marketplaceUpdateInvoice( "/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}/actions", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function marketplaceUpdateInvoice( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceUpdateResourceSecrets.ts b/src/funcs/marketplaceUpdateResourceSecrets.ts index 72110231..853f6ee2 100644 --- a/src/funcs/marketplaceUpdateResourceSecrets.ts +++ b/src/funcs/marketplaceUpdateResourceSecrets.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -38,10 +39,10 @@ import { import { Result } from "../types/fp.js"; /** - * Update Resource Secrets + * Update Resource Secrets (Deprecated) * * @remarks - * This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
+ * This endpoint is deprecated and replaced with the endpoint [Update Resource Secrets](#update-resource-secrets).
This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
*/ export async function marketplaceUpdateResourceSecrets( client: VercelCore, @@ -94,10 +95,10 @@ export async function marketplaceUpdateResourceSecrets( "/v1/installations/{integrationConfigurationId}/products/{integrationProductIdOrSlug}/resources/{resourceId}/secrets", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -161,8 +162,9 @@ export async function marketplaceUpdateResourceSecrets( M.nil(201, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/marketplaceUpdateResourceSecretsById.ts b/src/funcs/marketplaceUpdateResourceSecretsById.ts new file mode 100644 index 00000000..6d8d2b02 --- /dev/null +++ b/src/funcs/marketplaceUpdateResourceSecretsById.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { VercelCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + UpdateResourceSecretsByIdRequest, + UpdateResourceSecretsByIdRequest$outboundSchema, +} from "../models/updateresourcesecretsbyidop.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { + VercelNotFoundError, + VercelNotFoundError$inboundSchema, +} from "../models/vercelnotfounderror.js"; +import { Result } from "../types/fp.js"; + +/** + * Update Resource Secrets + * + * @remarks + * This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
+ */ +export async function marketplaceUpdateResourceSecretsById( + client: VercelCore, + request: UpdateResourceSecretsByIdRequest, + options?: RequestOptions, +): Promise< + Result< + void, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => UpdateResourceSecretsByIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + integrationConfigurationId: encodeSimple( + "integrationConfigurationId", + payload.integrationConfigurationId, + { explode: false, charEncoding: "percent" }, + ), + resourceId: encodeSimple("resourceId", payload.resourceId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/secrets", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-resource-secrets-by-id", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([403, "4XX"]), + M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/projectMembersAddProjectMember.ts b/src/funcs/projectMembersAddProjectMember.ts index 973be5e5..377562fc 100644 --- a/src/funcs/projectMembersAddProjectMember.ts +++ b/src/funcs/projectMembersAddProjectMember.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,10 +84,10 @@ export async function projectMembersAddProjectMember( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,7 +151,8 @@ export async function projectMembersAddProjectMember( M.json(200, AddProjectMemberResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", 500, "5XX"]), + M.fail([403, "4XX"]), + M.fail([500, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectMembersGetProjectMembers.ts b/src/funcs/projectMembersGetProjectMembers.ts index cc3f4565..fd11d792 100644 --- a/src/funcs/projectMembersGetProjectMembers.ts +++ b/src/funcs/projectMembersGetProjectMembers.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function projectMembersGetProjectMembers( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -153,7 +154,8 @@ export async function projectMembersGetProjectMembers( M.json(200, GetProjectMembersResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectMembersRemoveProjectMember.ts b/src/funcs/projectMembersRemoveProjectMember.ts index 21e23f4d..a53bea9e 100644 --- a/src/funcs/projectMembersRemoveProjectMember.ts +++ b/src/funcs/projectMembersRemoveProjectMember.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function projectMembersRemoveProjectMember( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -153,7 +154,8 @@ export async function projectMembersRemoveProjectMember( M.json(200, RemoveProjectMemberResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsAddProjectDomain.ts b/src/funcs/projectsAddProjectDomain.ts index 871a1e51..53947a79 100644 --- a/src/funcs/projectsAddProjectDomain.ts +++ b/src/funcs/projectsAddProjectDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,10 +84,10 @@ export async function projectsAddProjectDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,7 +151,8 @@ export async function projectsAddProjectDomain( M.json(200, AddProjectDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", "5XX"]), + M.fail([402, 403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsCreateProject.ts b/src/funcs/projectsCreateProject.ts index 5bd4a9d4..5a43cf69 100644 --- a/src/funcs/projectsCreateProject.ts +++ b/src/funcs/projectsCreateProject.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,10 +77,10 @@ export async function projectsCreateProject( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function projectsCreateProject( M.json(200, CreateProjectResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", "5XX"]), + M.fail([402, 403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsCreateProjectEnv.ts b/src/funcs/projectsCreateProjectEnv.ts index 8657230c..33eb4557 100644 --- a/src/funcs/projectsCreateProjectEnv.ts +++ b/src/funcs/projectsCreateProjectEnv.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -84,10 +85,10 @@ export async function projectsCreateProjectEnv( "upsert": payload.upsert, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -151,7 +152,8 @@ export async function projectsCreateProjectEnv( M.json(201, CreateProjectEnvResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", "5XX"]), + M.fail([402, 403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsDeleteProject.ts b/src/funcs/projectsDeleteProject.ts index 07fd1a7b..f329cc8a 100644 --- a/src/funcs/projectsDeleteProject.ts +++ b/src/funcs/projectsDeleteProject.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -82,9 +83,9 @@ export async function projectsDeleteProject( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -148,7 +149,8 @@ export async function projectsDeleteProject( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsEditProjectEnv.ts b/src/funcs/projectsEditProjectEnv.ts index ba93884a..a8183131 100644 --- a/src/funcs/projectsEditProjectEnv.ts +++ b/src/funcs/projectsEditProjectEnv.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,10 +88,10 @@ export async function projectsEditProjectEnv( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,7 +155,8 @@ export async function projectsEditProjectEnv( M.json(200, EditProjectEnvResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsFilterProjectEnvs.ts b/src/funcs/projectsFilterProjectEnvs.ts index 7db4714d..3ae98f33 100644 --- a/src/funcs/projectsFilterProjectEnvs.ts +++ b/src/funcs/projectsFilterProjectEnvs.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -79,6 +80,8 @@ export async function projectsFilterProjectEnvs( const path = pathToFunc("/v9/projects/{idOrName}/env")(pathParams); const query = encodeFormQuery({ + "customEnvironmentId": payload.customEnvironmentId, + "customEnvironmentSlug": payload.customEnvironmentSlug, "decrypt": payload.decrypt, "gitBranch": payload.gitBranch, "slug": payload.slug, @@ -86,9 +89,9 @@ export async function projectsFilterProjectEnvs( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -152,7 +155,8 @@ export async function projectsFilterProjectEnvs( M.json(200, FilterProjectEnvsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsGetProjectDomain.ts b/src/funcs/projectsGetProjectDomain.ts index b01915b5..a1fa697c 100644 --- a/src/funcs/projectsGetProjectDomain.ts +++ b/src/funcs/projectsGetProjectDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -89,9 +90,9 @@ export async function projectsGetProjectDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,7 +156,8 @@ export async function projectsGetProjectDomain( M.json(200, GetProjectDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsGetProjectDomains.ts b/src/funcs/projectsGetProjectDomains.ts index b426d2ee..0bc16040 100644 --- a/src/funcs/projectsGetProjectDomains.ts +++ b/src/funcs/projectsGetProjectDomains.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -79,6 +80,7 @@ export async function projectsGetProjectDomains( const path = pathToFunc("/v9/projects/{idOrName}/domains")(pathParams); const query = encodeFormQuery({ + "customEnvironmentId": payload.customEnvironmentId, "gitBranch": payload.gitBranch, "limit": payload.limit, "order": payload.order, @@ -93,9 +95,9 @@ export async function projectsGetProjectDomains( "verified": payload.verified, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -159,7 +161,8 @@ export async function projectsGetProjectDomains( M.json(200, GetProjectDomainsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsGetProjectEnv.ts b/src/funcs/projectsGetProjectEnv.ts index 78ff956c..92eab5ae 100644 --- a/src/funcs/projectsGetProjectEnv.ts +++ b/src/funcs/projectsGetProjectEnv.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function projectsGetProjectEnv( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -153,7 +154,8 @@ export async function projectsGetProjectEnv( M.json(200, GetProjectEnvResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsGetProjects.ts b/src/funcs/projectsGetProjects.ts index cf23262c..466fcd3a 100644 --- a/src/funcs/projectsGetProjects.ts +++ b/src/funcs/projectsGetProjects.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function projectsGetProjects( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -153,7 +154,8 @@ export async function projectsGetProjects( M.json(200, GetProjectsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsListPromoteAliases.ts b/src/funcs/projectsListPromoteAliases.ts index cfd03784..25282727 100644 --- a/src/funcs/projectsListPromoteAliases.ts +++ b/src/funcs/projectsListPromoteAliases.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -94,9 +95,9 @@ export async function projectsListPromoteAliases( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -161,8 +162,9 @@ export async function projectsListPromoteAliases( M.json(200, ListPromoteAliasesResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsRemoveProjectDomain.ts b/src/funcs/projectsRemoveProjectDomain.ts index 07e16781..d943ff57 100644 --- a/src/funcs/projectsRemoveProjectDomain.ts +++ b/src/funcs/projectsRemoveProjectDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -94,9 +95,9 @@ export async function projectsRemoveProjectDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -161,8 +162,9 @@ export async function projectsRemoveProjectDomain( M.json(200, RemoveProjectDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsRemoveProjectEnv.ts b/src/funcs/projectsRemoveProjectEnv.ts index fa56cade..9cf3704e 100644 --- a/src/funcs/projectsRemoveProjectEnv.ts +++ b/src/funcs/projectsRemoveProjectEnv.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,13 +89,14 @@ export async function projectsRemoveProjectEnv( const path = pathToFunc("/v9/projects/{idOrName}/env/{id}")(pathParams); const query = encodeFormQuery({ + "customEnvironmentId": payload.customEnvironmentId, "slug": payload.slug, "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -159,8 +161,9 @@ export async function projectsRemoveProjectEnv( M.json(200, RemoveProjectEnvResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsRequestPromote.ts b/src/funcs/projectsRequestPromote.ts index 2abc42b7..f0b19f1f 100644 --- a/src/funcs/projectsRequestPromote.ts +++ b/src/funcs/projectsRequestPromote.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,9 +89,9 @@ export async function projectsRequestPromote( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,7 +155,8 @@ export async function projectsRequestPromote( M.nil(201, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsUpdateProject.ts b/src/funcs/projectsUpdateProject.ts index 63de926f..eb649332 100644 --- a/src/funcs/projectsUpdateProject.ts +++ b/src/funcs/projectsUpdateProject.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,10 +84,10 @@ export async function projectsUpdateProject( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,7 +151,8 @@ export async function projectsUpdateProject( M.json(200, UpdateProjectResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, 428, "4XX", "5XX"]), + M.fail([402, 403, 409, 428, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsUpdateProjectDataCache.ts b/src/funcs/projectsUpdateProjectDataCache.ts index 79e1fa46..9b31f4e6 100644 --- a/src/funcs/projectsUpdateProjectDataCache.ts +++ b/src/funcs/projectsUpdateProjectDataCache.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function projectsUpdateProjectDataCache( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function projectsUpdateProjectDataCache( M.json(200, UpdateProjectDataCacheResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsUpdateProjectDomain.ts b/src/funcs/projectsUpdateProjectDomain.ts index 3a766427..a7fd45bf 100644 --- a/src/funcs/projectsUpdateProjectDomain.ts +++ b/src/funcs/projectsUpdateProjectDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -89,10 +90,10 @@ export async function projectsUpdateProjectDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,7 +157,8 @@ export async function projectsUpdateProjectDomain( M.json(200, UpdateProjectDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsUpdateProjectProtectionBypass.ts b/src/funcs/projectsUpdateProjectProtectionBypass.ts index 7af68aa2..9330c6e5 100644 --- a/src/funcs/projectsUpdateProjectProtectionBypass.ts +++ b/src/funcs/projectsUpdateProjectProtectionBypass.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -90,10 +91,10 @@ export async function projectsUpdateProjectProtectionBypass( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -158,8 +159,9 @@ export async function projectsUpdateProjectProtectionBypass( M.json(200, UpdateProjectProtectionBypassResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/projectsVerifyProjectDomain.ts b/src/funcs/projectsVerifyProjectDomain.ts index 7288b156..75f1fde8 100644 --- a/src/funcs/projectsVerifyProjectDomain.ts +++ b/src/funcs/projectsVerifyProjectDomain.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -89,9 +90,9 @@ export async function projectsVerifyProjectDomain( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -155,7 +156,8 @@ export async function projectsVerifyProjectDomain( M.json(200, VerifyProjectDomainResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/securityAddBypassIp.ts b/src/funcs/securityAddBypassIp.ts new file mode 100644 index 00000000..697f341b --- /dev/null +++ b/src/funcs/securityAddBypassIp.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { VercelCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + AddBypassIpRequest, + AddBypassIpRequest$outboundSchema, + AddBypassIpResponseBody, + AddBypassIpResponseBody$inboundSchema, +} from "../models/addbypassipop.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { + VercelNotFoundError, + VercelNotFoundError$inboundSchema, +} from "../models/vercelnotfounderror.js"; +import { Result } from "../types/fp.js"; + +/** + * Create System Bypass Rule + * + * @remarks + * Create new system bypass rules + */ +export async function securityAddBypassIp( + client: VercelCore, + request: AddBypassIpRequest, + options?: RequestOptions, +): Promise< + Result< + AddBypassIpResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => AddBypassIpRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const path = pathToFunc("/v1/security/firewall/bypass")(); + + const query = encodeFormQuery({ + "projectId": payload.projectId, + "slug": payload.slug, + "teamId": payload.teamId, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "addBypassIp", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + AddBypassIpResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, AddBypassIpResponseBody$inboundSchema), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([403, "4XX"]), + M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([500, "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/securityGetBypassIp.ts b/src/funcs/securityGetBypassIp.ts new file mode 100644 index 00000000..e0e311ff --- /dev/null +++ b/src/funcs/securityGetBypassIp.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { VercelCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + GetBypassIpRequest, + GetBypassIpRequest$outboundSchema, + GetBypassIpResponseBody, + GetBypassIpResponseBody$inboundSchema, +} from "../models/getbypassipop.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { + VercelNotFoundError, + VercelNotFoundError$inboundSchema, +} from "../models/vercelnotfounderror.js"; +import { Result } from "../types/fp.js"; + +/** + * Read System Bypass + * + * @remarks + * Retrieve the system bypass rules configured for the specified project + */ +export async function securityGetBypassIp( + client: VercelCore, + request: GetBypassIpRequest, + options?: RequestOptions, +): Promise< + Result< + GetBypassIpResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => GetBypassIpRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/security/firewall/bypass")(); + + const query = encodeFormQuery({ + "domain": payload.domain, + "limit": payload.limit, + "offset": payload.offset, + "projectId": payload.projectId, + "projectScope": payload.projectScope, + "slug": payload.slug, + "sourceIp": payload.sourceIp, + "teamId": payload.teamId, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "getBypassIp", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + GetBypassIpResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, GetBypassIpResponseBody$inboundSchema), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([403, "4XX"]), + M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([500, "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/securityGetFirewallConfig.ts b/src/funcs/securityGetFirewallConfig.ts index 6ab79e4c..b06a19ba 100644 --- a/src/funcs/securityGetFirewallConfig.ts +++ b/src/funcs/securityGetFirewallConfig.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -91,9 +92,9 @@ export async function securityGetFirewallConfig( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -158,8 +159,9 @@ export async function securityGetFirewallConfig( M.json(200, GetFirewallConfigResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/securityPutFirewallConfig.ts b/src/funcs/securityPutFirewallConfig.ts index 3ac159d3..f456a519 100644 --- a/src/funcs/securityPutFirewallConfig.ts +++ b/src/funcs/securityPutFirewallConfig.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -82,10 +83,10 @@ export async function securityPutFirewallConfig( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,8 +151,9 @@ export async function securityPutFirewallConfig( M.json(200, PutFirewallConfigResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", 500, "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([500, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/securityRemoveBypassIp.ts b/src/funcs/securityRemoveBypassIp.ts new file mode 100644 index 00000000..81f6e79d --- /dev/null +++ b/src/funcs/securityRemoveBypassIp.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { VercelCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/httpclienterrors.js"; +import { + RemoveBypassIpRequest, + RemoveBypassIpRequest$outboundSchema, + RemoveBypassIpResponseBody, + RemoveBypassIpResponseBody$inboundSchema, +} from "../models/removebypassipop.js"; +import { SDKError } from "../models/sdkerror.js"; +import { SDKValidationError } from "../models/sdkvalidationerror.js"; +import { + VercelBadRequestError, + VercelBadRequestError$inboundSchema, +} from "../models/vercelbadrequesterror.js"; +import { + VercelForbiddenError, + VercelForbiddenError$inboundSchema, +} from "../models/vercelforbiddenerror.js"; +import { + VercelNotFoundError, + VercelNotFoundError$inboundSchema, +} from "../models/vercelnotfounderror.js"; +import { Result } from "../types/fp.js"; + +/** + * Remove System Bypass Rule + * + * @remarks + * Remove system bypass rules + */ +export async function securityRemoveBypassIp( + client: VercelCore, + request: RemoveBypassIpRequest, + options?: RequestOptions, +): Promise< + Result< + RemoveBypassIpResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => RemoveBypassIpRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const path = pathToFunc("/v1/security/firewall/bypass")(); + + const query = encodeFormQuery({ + "projectId": payload.projectId, + "slug": payload.slug, + "teamId": payload.teamId, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerToken); + const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "removeBypassIp", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + RemoveBypassIpResponseBody, + | VercelBadRequestError + | VercelForbiddenError + | VercelNotFoundError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, RemoveBypassIpResponseBody$inboundSchema), + M.jsonErr(400, VercelBadRequestError$inboundSchema), + M.jsonErr(401, VercelForbiddenError$inboundSchema), + M.fail([403, "4XX"]), + M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([500, "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/securityUpdateAttackChallengeMode.ts b/src/funcs/securityUpdateAttackChallengeMode.ts index 5e48fb30..531c07d1 100644 --- a/src/funcs/securityUpdateAttackChallengeMode.ts +++ b/src/funcs/securityUpdateAttackChallengeMode.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,10 +82,10 @@ export async function securityUpdateAttackChallengeMode( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,8 +150,9 @@ export async function securityUpdateAttackChallengeMode( M.json(200, UpdateAttackChallengeModeResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/securityUpdateFirewallConfig.ts b/src/funcs/securityUpdateFirewallConfig.ts index d3aa909d..0026154b 100644 --- a/src/funcs/securityUpdateFirewallConfig.ts +++ b/src/funcs/securityUpdateFirewallConfig.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -82,10 +83,10 @@ export async function securityUpdateFirewallConfig( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,8 +151,9 @@ export async function securityUpdateFirewallConfig( M.json(200, UpdateFirewallConfigResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", 500, "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([500, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsCreateTeam.ts b/src/funcs/teamsCreateTeam.ts index 287170a8..685985aa 100644 --- a/src/funcs/teamsCreateTeam.ts +++ b/src/funcs/teamsCreateTeam.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -71,10 +72,10 @@ export async function teamsCreateTeam( const path = pathToFunc("/v1/teams")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -137,7 +138,8 @@ export async function teamsCreateTeam( M.json(200, CreateTeamResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsDeleteTeam.ts b/src/funcs/teamsDeleteTeam.ts index 1e9bf750..19b344b6 100644 --- a/src/funcs/teamsDeleteTeam.ts +++ b/src/funcs/teamsDeleteTeam.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -88,10 +89,10 @@ export async function teamsDeleteTeam( "slug": payload.slug, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -156,8 +157,9 @@ export async function teamsDeleteTeam( M.json(200, DeleteTeamResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, 409, "4XX", "5XX"]), + M.fail([402, 403, 409, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsDeleteTeamInviteCode.ts b/src/funcs/teamsDeleteTeamInviteCode.ts index 3473984a..04818950 100644 --- a/src/funcs/teamsDeleteTeamInviteCode.ts +++ b/src/funcs/teamsDeleteTeamInviteCode.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function teamsDeleteTeamInviteCode( const path = pathToFunc("/v1/teams/{teamId}/invites/{inviteId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -153,8 +154,9 @@ export async function teamsDeleteTeamInviteCode( M.json(200, DeleteTeamInviteCodeResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsGetTeam.ts b/src/funcs/teamsGetTeam.ts index 2e553dde..084b7fbb 100644 --- a/src/funcs/teamsGetTeam.ts +++ b/src/funcs/teamsGetTeam.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -86,9 +87,9 @@ export async function teamsGetTeam( "slug": payload.slug, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -153,8 +154,9 @@ export async function teamsGetTeam( M.json(200, z.record(z.any())), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsGetTeamAccessRequest.ts b/src/funcs/teamsGetTeamAccessRequest.ts index 3ddc0480..c93f41e3 100644 --- a/src/funcs/teamsGetTeamAccessRequest.ts +++ b/src/funcs/teamsGetTeamAccessRequest.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,9 +88,9 @@ export async function teamsGetTeamAccessRequest( const path = pathToFunc("/v1/teams/{teamId}/request/{userId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -153,8 +154,9 @@ export async function teamsGetTeamAccessRequest( M.json(200, GetTeamAccessRequestResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsGetTeamMembers.ts b/src/funcs/teamsGetTeamMembers.ts index 40cac4b9..2dc9d584 100644 --- a/src/funcs/teamsGetTeamMembers.ts +++ b/src/funcs/teamsGetTeamMembers.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -93,9 +94,9 @@ export async function teamsGetTeamMembers( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -160,8 +161,9 @@ export async function teamsGetTeamMembers( M.json(200, GetTeamMembersResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsGetTeams.ts b/src/funcs/teamsGetTeams.ts index 06a8f9c5..141547bb 100644 --- a/src/funcs/teamsGetTeams.ts +++ b/src/funcs/teamsGetTeams.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -77,9 +78,9 @@ export async function teamsGetTeams( "until": payload.until, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function teamsGetTeams( M.json(200, GetTeamsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsInviteUserToTeam.ts b/src/funcs/teamsInviteUserToTeam.ts index 0368dc40..0f578aaa 100644 --- a/src/funcs/teamsInviteUserToTeam.ts +++ b/src/funcs/teamsInviteUserToTeam.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,10 +84,10 @@ export async function teamsInviteUserToTeam( const path = pathToFunc("/v1/teams/{teamId}/members")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,8 +151,9 @@ export async function teamsInviteUserToTeam( M.json(200, InviteUserToTeamResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", 503, "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([503, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsJoinTeam.ts b/src/funcs/teamsJoinTeam.ts index e0a8518f..ac37d092 100644 --- a/src/funcs/teamsJoinTeam.ts +++ b/src/funcs/teamsJoinTeam.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,10 +84,10 @@ export async function teamsJoinTeam( const path = pathToFunc("/v1/teams/{teamId}/members/teams/join")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,8 +151,9 @@ export async function teamsJoinTeam( M.json(200, JoinTeamResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsPatchTeam.ts b/src/funcs/teamsPatchTeam.ts index 5be2ebcf..319ff74d 100644 --- a/src/funcs/teamsPatchTeam.ts +++ b/src/funcs/teamsPatchTeam.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -86,10 +87,10 @@ export async function teamsPatchTeam( "slug": payload.slug, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function teamsPatchTeam( M.json(200, z.record(z.any())), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsRemoveTeamMember.ts b/src/funcs/teamsRemoveTeamMember.ts index ce9d3243..e04b55cc 100644 --- a/src/funcs/teamsRemoveTeamMember.ts +++ b/src/funcs/teamsRemoveTeamMember.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -91,9 +92,9 @@ export async function teamsRemoveTeamMember( "newDefaultTeamId": payload.newDefaultTeamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -158,8 +159,9 @@ export async function teamsRemoveTeamMember( M.json(200, RemoveTeamMemberResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", 503, "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([503, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsRequestAccessToTeam.ts b/src/funcs/teamsRequestAccessToTeam.ts index 88292024..3b36ac3c 100644 --- a/src/funcs/teamsRequestAccessToTeam.ts +++ b/src/funcs/teamsRequestAccessToTeam.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,10 +84,10 @@ export async function teamsRequestAccessToTeam( const path = pathToFunc("/v1/teams/{teamId}/request")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -150,8 +151,9 @@ export async function teamsRequestAccessToTeam( M.json(200, RequestAccessToTeamResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", 503, "5XX"]), + M.fail([403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([503, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/teamsUpdateTeamMember.ts b/src/funcs/teamsUpdateTeamMember.ts index 3d3c76e5..75aa71d3 100644 --- a/src/funcs/teamsUpdateTeamMember.ts +++ b/src/funcs/teamsUpdateTeamMember.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,10 +88,10 @@ export async function teamsUpdateTeamMember( const path = pathToFunc("/v1/teams/{teamId}/members/{uid}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -154,8 +155,9 @@ export async function teamsUpdateTeamMember( M.json(200, UpdateTeamMemberResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", 500, "5XX"]), + M.fail([402, 403, "4XX"]), M.jsonErr(404, VercelNotFoundError$inboundSchema), + M.fail([500, "5XX"]), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/userGetAuthUser.ts b/src/funcs/userGetAuthUser.ts index c66c7448..40960742 100644 --- a/src/funcs/userGetAuthUser.ts +++ b/src/funcs/userGetAuthUser.ts @@ -4,6 +4,7 @@ import { VercelCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -55,9 +56,9 @@ export async function userGetAuthUser( > { const path = pathToFunc("/v2/user")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -120,7 +121,8 @@ export async function userGetAuthUser( M.nil(302, GetAuthUserResponseBody$inboundSchema.optional()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, 409, "4XX", "5XX"]), + M.fail([403, 409, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/userListUserEvents.ts b/src/funcs/userListUserEvents.ts index 3f1c8e4a..021dbc9b 100644 --- a/src/funcs/userListUserEvents.ts +++ b/src/funcs/userListUserEvents.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -82,9 +83,9 @@ export async function userListUserEvents( "withPayload": payload.withPayload, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -148,7 +149,8 @@ export async function userListUserEvents( M.json(200, ListUserEventsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/userRequestDelete.ts b/src/funcs/userRequestDelete.ts index b4e2100f..52f2a4e6 100644 --- a/src/funcs/userRequestDelete.ts +++ b/src/funcs/userRequestDelete.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -71,10 +72,10 @@ export async function userRequestDelete( const path = pathToFunc("/v1/user")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -137,7 +138,8 @@ export async function userRequestDelete( M.json(202, RequestDeleteResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([402, 403, "4XX", "5XX"]), + M.fail([402, 403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/webhooksCreateWebhook.ts b/src/funcs/webhooksCreateWebhook.ts index ddb55ebf..6cd9c82d 100644 --- a/src/funcs/webhooksCreateWebhook.ts +++ b/src/funcs/webhooksCreateWebhook.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,10 +77,10 @@ export async function webhooksCreateWebhook( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function webhooksCreateWebhook( M.json(200, CreateWebhookResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/webhooksDeleteWebhook.ts b/src/funcs/webhooksDeleteWebhook.ts index 8a879486..df5e2e71 100644 --- a/src/funcs/webhooksDeleteWebhook.ts +++ b/src/funcs/webhooksDeleteWebhook.ts @@ -6,6 +6,7 @@ import * as z from "zod"; import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -82,9 +83,9 @@ export async function webhooksDeleteWebhook( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -148,7 +149,8 @@ export async function webhooksDeleteWebhook( M.nil(204, z.void()), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/webhooksGetWebhook.ts b/src/funcs/webhooksGetWebhook.ts index d1d0398e..11080357 100644 --- a/src/funcs/webhooksGetWebhook.ts +++ b/src/funcs/webhooksGetWebhook.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -83,9 +84,9 @@ export async function webhooksGetWebhook( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -149,7 +150,8 @@ export async function webhooksGetWebhook( M.json(200, GetWebhookResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/funcs/webhooksGetWebhooks.ts b/src/funcs/webhooksGetWebhooks.ts index 5ce12f3c..03e17de5 100644 --- a/src/funcs/webhooksGetWebhooks.ts +++ b/src/funcs/webhooksGetWebhooks.ts @@ -5,6 +5,7 @@ import { VercelCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -77,9 +78,9 @@ export async function webhooksGetWebhooks( "teamId": payload.teamId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.bearerToken); const securityInput = secConfig == null ? {} : { bearerToken: secConfig }; @@ -143,7 +144,8 @@ export async function webhooksGetWebhooks( M.json(200, GetWebhooksResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), - M.fail([403, "4XX", "5XX"]), + M.fail([403, "4XX"]), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { return result; diff --git a/src/lib/config.ts b/src/lib/config.ts index 4ea67d88..6c962267 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -57,7 +57,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "1.2.2", - genVersion: "2.486.6", - userAgent: "speakeasy-sdk/typescript 1.2.2 2.486.6 0.0.1 @vercel/sdk", + sdkVersion: "1.3.0", + genVersion: "2.493.21", + userAgent: "speakeasy-sdk/typescript 1.3.0 2.493.21 0.0.1 @vercel/sdk", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 44fa7284..25c9dcba 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -16,12 +16,16 @@ export function encodeMatrix( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; @@ -29,21 +33,25 @@ export function encodeMatrix( pairs.forEach(([pk, pv]) => { let tmp = ""; - let encValue = ""; + let encValue: string | null | undefined = null; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `,${encodeString(k)},${encodeValue(v)}`; - }).join(""); - encValue = encValue.slice(1); + }); + encValue = mapped?.join("").slice(1); } else { encValue = `${encodeValue(pv)}`; } + if (encValue == null) { + return; + } + const keyPrefix = encodeString(pk); tmp = `${keyPrefix}=${encValue}`; // trim trailing '=' if value was empty @@ -66,36 +74,40 @@ export function encodeLabel( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; const encodeValue = (v: unknown) => encodeString(serializeValue(v)); pairs.forEach(([pk, pv]) => { - let encValue = ""; + let encValue: string | null | undefined = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join("."); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join("."); } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `.${encodeString(k)}.${encodeValue(v)}`; - }).join(""); - encValue = encValue.slice(1); + }); + encValue = mapped?.join("").slice(1); } else { const k = options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; encValue = `${k}${encodeValue(pv)}`; } - out += `.${encValue}`; + out += encValue == null ? "" : `.${encValue}`; }); return out; @@ -105,7 +117,7 @@ type FormEncoder = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) => string; +) => string | undefined; function formEncoder(sep: string): FormEncoder { return ( @@ -118,6 +130,10 @@ function formEncoder(sep: string): FormEncoder { ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; @@ -128,20 +144,24 @@ function formEncoder(sep: string): FormEncoder { pairs.forEach(([pk, pv]) => { let tmp = ""; - let encValue = ""; + let encValue: string | null | undefined = null; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(encodedSep); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(encodedSep); } else if (isPlainObject(pv)) { encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; - }).join(encodedSep); + })?.join(encodedSep); } else { encValue = `${encodeValue(pv)}`; } + if (encValue == null) { + return; + } + tmp = `${encodeString(pk)}=${encValue}`; // If we end up with the nothing then skip forward @@ -180,7 +200,7 @@ export function encodeBodyForm( let tmp = ""; let encValue = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { encValue = JSON.stringify(pv, jsonReplacer); @@ -207,14 +227,14 @@ export function encodeDeepObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (value == null) { - return ""; + return; } if (!isPlainObject(value)) { throw new EncodingError( - `Value of parameter '${key}' which uses deepObject encoding must be an object`, + `Value of parameter '${key}' which uses deepObject encoding must be an object or null`, ); } @@ -225,9 +245,9 @@ export function encodeDeepObjectObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (value == null) { - return ""; + return; } let out = ""; @@ -241,7 +261,7 @@ export function encodeDeepObjectObject( } Object.entries(value).forEach(([ck, cv]) => { - if (cv === undefined) { + if (cv == null) { return; } @@ -250,19 +270,17 @@ export function encodeDeepObjectObject( if (isPlainObject(cv)) { const objOut = encodeDeepObjectObject(pk, cv, options); - out += `&${objOut}`; + out += objOut == null ? "" : `&${objOut}`; return; } const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; - let encoded = ""; - - encoded = mapDefined(pairs, (v) => { + const encoded = mapDefined(pairs, (v) => { return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; - }).join("&"); + })?.join("&"); - out += `&${encoded}`; + out += encoded == null ? "" : `&${encoded}`; }); return out.slice(1); @@ -272,9 +290,9 @@ export function encodeJSON( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (typeof value === "undefined") { - return ""; + return; } const encodeString = (v: string) => { @@ -290,40 +308,39 @@ export const encodeSimple = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string => { +): string | undefined => { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; const encodeValue = (v: unknown) => encodeString(serializeValue(v)); pairs.forEach(([pk, pv]) => { - let tmp = ""; + let tmp: string | null | undefined = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); } else if (isPlainObject(pv)) { - tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `,${encodeString(k)},${encodeValue(v)}`; - }).join(""); - tmp = tmp.slice(1); + }); + tmp = mapped?.join("").slice(1); } else { const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; tmp = `${k}${encodeValue(pv)}`; } - // If we end up with the nothing then skip forward - if (!tmp) { - return; - } - - out += `,${tmp}`; + out += tmp ? `,${tmp}` : ""; }); return out.slice(1); @@ -341,9 +358,7 @@ function explode(key: string, value: unknown): [string, unknown][] { } function serializeValue(value: unknown): string { - if (value === null) { - return "null"; - } else if (typeof value === "undefined") { + if (value == null) { return ""; } else if (value instanceof Date) { return value.toISOString(); @@ -364,14 +379,14 @@ function jsonReplacer(_: string, value: unknown): unknown { } } -function mapDefined(inp: T[], mapper: (v: T) => R): R[] { - return inp.reduce((acc, v) => { - if (v === undefined) { +function mapDefined(inp: T[], mapper: (v: T) => R): R[] | null { + const res = inp.reduce((acc, v) => { + if (v == null) { return acc; } const m = mapper(v); - if (m === undefined) { + if (m == null) { return acc; } @@ -379,30 +394,32 @@ function mapDefined(inp: T[], mapper: (v: T) => R): R[] { return acc; }, []); + + return res.length ? res : null; } function mapDefinedEntries( inp: Iterable<[K, V]>, mapper: (v: [K, V]) => R, -): R[] { +): R[] | null { const acc: R[] = []; for (const [k, v] of inp) { - if (v === undefined) { + if (v == null) { continue; } const m = mapper([k, v]); - if (m === undefined) { + if (m == null) { continue; } acc.push(m); } - return acc; + return acc.length ? acc : null; } -export function queryJoin(...args: string[]): string { +export function queryJoin(...args: (string | undefined)[]): string { return args.filter(Boolean).join("&"); } @@ -415,7 +432,7 @@ type QueryEncoder = ( key: string, value: unknown, options?: QueryEncoderOptions, -) => string; +) => string | undefined; type BulkQueryEncoder = ( values: Record, @@ -447,3 +464,20 @@ export const encodeFormQuery = queryEncoder(encodeForm); export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); + +export function appendForm( + fd: FormData, + key: string, + value: unknown, + fileName?: string, +): void { + if (value == null) { + return; + } else if (value instanceof Blob && fileName) { + fd.append(key, value, fileName); + } else if (value instanceof Blob) { + fd.append(key, value); + } else { + fd.append(key, String(value)); + } +} diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts index 1dc4ee43..ce50b98a 100644 --- a/src/lib/primitives.ts +++ b/src/lib/primitives.ts @@ -120,3 +120,17 @@ export function abortSignalAny(signals: AbortSignal[]): AbortSignal { return result; } + +export function compactMap( + values: Record, +): Record { + const out: Record = {}; + + for (const [k, v] of Object.entries(values)) { + if (typeof v !== "undefined") { + out[k] = v; + } + } + + return out; +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 7a2b2049..ddfbe209 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -131,7 +131,10 @@ export class ClientSDK { const secQuery: string[] = []; for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + const q = encodeForm(k, v, { charEncoding: "percent" }); + if (typeof q !== "undefined") { + secQuery.push(q); + } } if (secQuery.length) { finalQuery += `&${secQuery.join("&")}`; diff --git a/src/models/addbypassipop.ts b/src/models/addbypassipop.ts new file mode 100644 index 00000000..58214b5d --- /dev/null +++ b/src/models/addbypassipop.ts @@ -0,0 +1,779 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +export type AddBypassIpRequestBody2 = { + domain?: string | undefined; + projectScope: boolean; + sourceIp?: string | undefined; + allSources?: boolean | undefined; + note?: string | undefined; +}; + +export type AddBypassIpRequestBody1 = { + domain: string; + projectScope?: boolean | undefined; + sourceIp?: string | undefined; + allSources?: boolean | undefined; + note?: string | undefined; +}; + +export type AddBypassIpRequestBody = + | AddBypassIpRequestBody1 + | AddBypassIpRequestBody2; + +export type AddBypassIpRequest = { + projectId: string; + /** + * The Team identifier to perform the request on behalf of. + */ + teamId?: string | undefined; + /** + * The Team slug to perform the request on behalf of. + */ + slug?: string | undefined; + requestBody?: AddBypassIpRequestBody1 | AddBypassIpRequestBody2 | undefined; +}; + +export const AddBypassIpResponseBodyAction = { + Block: "block", + Bypass: "bypass", +} as const; +export type AddBypassIpResponseBodyAction = ClosedEnum< + typeof AddBypassIpResponseBodyAction +>; + +export type AddBypassIpResponseBodySecurityResult = { + ownerId: string; + id: string; + domain: string; + ip: string; + action?: AddBypassIpResponseBodyAction | undefined; + projectId?: string | undefined; + isProjectRule?: boolean | undefined; + note?: string | undefined; + createdAt: string; + actorId?: string | undefined; + updatedAt: string; + updatedAtHour: string; + deletedAt?: string | undefined; + expiresAt?: number | undefined; +}; + +export type AddBypassIpResponseBody2 = { + ok: boolean; + result?: Array | undefined; +}; + +export type AddBypassIpResponseBodyResult = { + ownerId: string; + id: string; + domain: string; + ip?: string | undefined; + projectId: string; + isProjectRule: boolean; +}; + +export type AddBypassIpResponseBody1 = { + ok: boolean; + result: Array; + pagination?: any | null | undefined; +}; + +export type AddBypassIpResponseBody = + | AddBypassIpResponseBody2 + | AddBypassIpResponseBody1; + +/** @internal */ +export const AddBypassIpRequestBody2$inboundSchema: z.ZodType< + AddBypassIpRequestBody2, + z.ZodTypeDef, + unknown +> = z.object({ + domain: z.string().optional(), + projectScope: z.boolean(), + sourceIp: z.string().optional(), + allSources: z.boolean().optional(), + note: z.string().optional(), +}); + +/** @internal */ +export type AddBypassIpRequestBody2$Outbound = { + domain?: string | undefined; + projectScope: boolean; + sourceIp?: string | undefined; + allSources?: boolean | undefined; + note?: string | undefined; +}; + +/** @internal */ +export const AddBypassIpRequestBody2$outboundSchema: z.ZodType< + AddBypassIpRequestBody2$Outbound, + z.ZodTypeDef, + AddBypassIpRequestBody2 +> = z.object({ + domain: z.string().optional(), + projectScope: z.boolean(), + sourceIp: z.string().optional(), + allSources: z.boolean().optional(), + note: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpRequestBody2$ { + /** @deprecated use `AddBypassIpRequestBody2$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpRequestBody2$inboundSchema; + /** @deprecated use `AddBypassIpRequestBody2$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpRequestBody2$outboundSchema; + /** @deprecated use `AddBypassIpRequestBody2$Outbound` instead. */ + export type Outbound = AddBypassIpRequestBody2$Outbound; +} + +export function addBypassIpRequestBody2ToJSON( + addBypassIpRequestBody2: AddBypassIpRequestBody2, +): string { + return JSON.stringify( + AddBypassIpRequestBody2$outboundSchema.parse(addBypassIpRequestBody2), + ); +} + +export function addBypassIpRequestBody2FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddBypassIpRequestBody2$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpRequestBody2' from JSON`, + ); +} + +/** @internal */ +export const AddBypassIpRequestBody1$inboundSchema: z.ZodType< + AddBypassIpRequestBody1, + z.ZodTypeDef, + unknown +> = z.object({ + domain: z.string(), + projectScope: z.boolean().optional(), + sourceIp: z.string().optional(), + allSources: z.boolean().optional(), + note: z.string().optional(), +}); + +/** @internal */ +export type AddBypassIpRequestBody1$Outbound = { + domain: string; + projectScope?: boolean | undefined; + sourceIp?: string | undefined; + allSources?: boolean | undefined; + note?: string | undefined; +}; + +/** @internal */ +export const AddBypassIpRequestBody1$outboundSchema: z.ZodType< + AddBypassIpRequestBody1$Outbound, + z.ZodTypeDef, + AddBypassIpRequestBody1 +> = z.object({ + domain: z.string(), + projectScope: z.boolean().optional(), + sourceIp: z.string().optional(), + allSources: z.boolean().optional(), + note: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpRequestBody1$ { + /** @deprecated use `AddBypassIpRequestBody1$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpRequestBody1$inboundSchema; + /** @deprecated use `AddBypassIpRequestBody1$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpRequestBody1$outboundSchema; + /** @deprecated use `AddBypassIpRequestBody1$Outbound` instead. */ + export type Outbound = AddBypassIpRequestBody1$Outbound; +} + +export function addBypassIpRequestBody1ToJSON( + addBypassIpRequestBody1: AddBypassIpRequestBody1, +): string { + return JSON.stringify( + AddBypassIpRequestBody1$outboundSchema.parse(addBypassIpRequestBody1), + ); +} + +export function addBypassIpRequestBody1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddBypassIpRequestBody1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpRequestBody1' from JSON`, + ); +} + +/** @internal */ +export const AddBypassIpRequestBody$inboundSchema: z.ZodType< + AddBypassIpRequestBody, + z.ZodTypeDef, + unknown +> = z.union([ + z.lazy(() => AddBypassIpRequestBody1$inboundSchema), + z.lazy(() => AddBypassIpRequestBody2$inboundSchema), +]); + +/** @internal */ +export type AddBypassIpRequestBody$Outbound = + | AddBypassIpRequestBody1$Outbound + | AddBypassIpRequestBody2$Outbound; + +/** @internal */ +export const AddBypassIpRequestBody$outboundSchema: z.ZodType< + AddBypassIpRequestBody$Outbound, + z.ZodTypeDef, + AddBypassIpRequestBody +> = z.union([ + z.lazy(() => AddBypassIpRequestBody1$outboundSchema), + z.lazy(() => AddBypassIpRequestBody2$outboundSchema), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpRequestBody$ { + /** @deprecated use `AddBypassIpRequestBody$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpRequestBody$inboundSchema; + /** @deprecated use `AddBypassIpRequestBody$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpRequestBody$outboundSchema; + /** @deprecated use `AddBypassIpRequestBody$Outbound` instead. */ + export type Outbound = AddBypassIpRequestBody$Outbound; +} + +export function addBypassIpRequestBodyToJSON( + addBypassIpRequestBody: AddBypassIpRequestBody, +): string { + return JSON.stringify( + AddBypassIpRequestBody$outboundSchema.parse(addBypassIpRequestBody), + ); +} + +export function addBypassIpRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddBypassIpRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpRequestBody' from JSON`, + ); +} + +/** @internal */ +export const AddBypassIpRequest$inboundSchema: z.ZodType< + AddBypassIpRequest, + z.ZodTypeDef, + unknown +> = z.object({ + projectId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + RequestBody: z.union([ + z.lazy(() => AddBypassIpRequestBody1$inboundSchema), + z.lazy(() => AddBypassIpRequestBody2$inboundSchema), + ]).optional(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type AddBypassIpRequest$Outbound = { + projectId: string; + teamId?: string | undefined; + slug?: string | undefined; + RequestBody?: + | AddBypassIpRequestBody1$Outbound + | AddBypassIpRequestBody2$Outbound + | undefined; +}; + +/** @internal */ +export const AddBypassIpRequest$outboundSchema: z.ZodType< + AddBypassIpRequest$Outbound, + z.ZodTypeDef, + AddBypassIpRequest +> = z.object({ + projectId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + requestBody: z.union([ + z.lazy(() => AddBypassIpRequestBody1$outboundSchema), + z.lazy(() => AddBypassIpRequestBody2$outboundSchema), + ]).optional(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpRequest$ { + /** @deprecated use `AddBypassIpRequest$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpRequest$inboundSchema; + /** @deprecated use `AddBypassIpRequest$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpRequest$outboundSchema; + /** @deprecated use `AddBypassIpRequest$Outbound` instead. */ + export type Outbound = AddBypassIpRequest$Outbound; +} + +export function addBypassIpRequestToJSON( + addBypassIpRequest: AddBypassIpRequest, +): string { + return JSON.stringify( + AddBypassIpRequest$outboundSchema.parse(addBypassIpRequest), + ); +} + +export function addBypassIpRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddBypassIpRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpRequest' from JSON`, + ); +} + +/** @internal */ +export const AddBypassIpResponseBodyAction$inboundSchema: z.ZodNativeEnum< + typeof AddBypassIpResponseBodyAction +> = z.nativeEnum(AddBypassIpResponseBodyAction); + +/** @internal */ +export const AddBypassIpResponseBodyAction$outboundSchema: z.ZodNativeEnum< + typeof AddBypassIpResponseBodyAction +> = AddBypassIpResponseBodyAction$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpResponseBodyAction$ { + /** @deprecated use `AddBypassIpResponseBodyAction$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpResponseBodyAction$inboundSchema; + /** @deprecated use `AddBypassIpResponseBodyAction$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpResponseBodyAction$outboundSchema; +} + +/** @internal */ +export const AddBypassIpResponseBodySecurityResult$inboundSchema: z.ZodType< + AddBypassIpResponseBodySecurityResult, + z.ZodTypeDef, + unknown +> = z.object({ + OwnerId: z.string(), + Id: z.string(), + Domain: z.string(), + Ip: z.string(), + Action: AddBypassIpResponseBodyAction$inboundSchema.optional(), + ProjectId: z.string().optional(), + IsProjectRule: z.boolean().optional(), + Note: z.string().optional(), + CreatedAt: z.string(), + ActorId: z.string().optional(), + UpdatedAt: z.string(), + UpdatedAtHour: z.string(), + DeletedAt: z.string().optional(), + ExpiresAt: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "OwnerId": "ownerId", + "Id": "id", + "Domain": "domain", + "Ip": "ip", + "Action": "action", + "ProjectId": "projectId", + "IsProjectRule": "isProjectRule", + "Note": "note", + "CreatedAt": "createdAt", + "ActorId": "actorId", + "UpdatedAt": "updatedAt", + "UpdatedAtHour": "updatedAtHour", + "DeletedAt": "deletedAt", + "ExpiresAt": "expiresAt", + }); +}); + +/** @internal */ +export type AddBypassIpResponseBodySecurityResult$Outbound = { + OwnerId: string; + Id: string; + Domain: string; + Ip: string; + Action?: string | undefined; + ProjectId?: string | undefined; + IsProjectRule?: boolean | undefined; + Note?: string | undefined; + CreatedAt: string; + ActorId?: string | undefined; + UpdatedAt: string; + UpdatedAtHour: string; + DeletedAt?: string | undefined; + ExpiresAt?: number | undefined; +}; + +/** @internal */ +export const AddBypassIpResponseBodySecurityResult$outboundSchema: z.ZodType< + AddBypassIpResponseBodySecurityResult$Outbound, + z.ZodTypeDef, + AddBypassIpResponseBodySecurityResult +> = z.object({ + ownerId: z.string(), + id: z.string(), + domain: z.string(), + ip: z.string(), + action: AddBypassIpResponseBodyAction$outboundSchema.optional(), + projectId: z.string().optional(), + isProjectRule: z.boolean().optional(), + note: z.string().optional(), + createdAt: z.string(), + actorId: z.string().optional(), + updatedAt: z.string(), + updatedAtHour: z.string(), + deletedAt: z.string().optional(), + expiresAt: z.number().optional(), +}).transform((v) => { + return remap$(v, { + ownerId: "OwnerId", + id: "Id", + domain: "Domain", + ip: "Ip", + action: "Action", + projectId: "ProjectId", + isProjectRule: "IsProjectRule", + note: "Note", + createdAt: "CreatedAt", + actorId: "ActorId", + updatedAt: "UpdatedAt", + updatedAtHour: "UpdatedAtHour", + deletedAt: "DeletedAt", + expiresAt: "ExpiresAt", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpResponseBodySecurityResult$ { + /** @deprecated use `AddBypassIpResponseBodySecurityResult$inboundSchema` instead. */ + export const inboundSchema = + AddBypassIpResponseBodySecurityResult$inboundSchema; + /** @deprecated use `AddBypassIpResponseBodySecurityResult$outboundSchema` instead. */ + export const outboundSchema = + AddBypassIpResponseBodySecurityResult$outboundSchema; + /** @deprecated use `AddBypassIpResponseBodySecurityResult$Outbound` instead. */ + export type Outbound = AddBypassIpResponseBodySecurityResult$Outbound; +} + +export function addBypassIpResponseBodySecurityResultToJSON( + addBypassIpResponseBodySecurityResult: AddBypassIpResponseBodySecurityResult, +): string { + return JSON.stringify( + AddBypassIpResponseBodySecurityResult$outboundSchema.parse( + addBypassIpResponseBodySecurityResult, + ), + ); +} + +export function addBypassIpResponseBodySecurityResultFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + AddBypassIpResponseBodySecurityResult$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpResponseBodySecurityResult' from JSON`, + ); +} + +/** @internal */ +export const AddBypassIpResponseBody2$inboundSchema: z.ZodType< + AddBypassIpResponseBody2, + z.ZodTypeDef, + unknown +> = z.object({ + ok: z.boolean(), + result: z.array( + z.lazy(() => AddBypassIpResponseBodySecurityResult$inboundSchema), + ).optional(), +}); + +/** @internal */ +export type AddBypassIpResponseBody2$Outbound = { + ok: boolean; + result?: Array | undefined; +}; + +/** @internal */ +export const AddBypassIpResponseBody2$outboundSchema: z.ZodType< + AddBypassIpResponseBody2$Outbound, + z.ZodTypeDef, + AddBypassIpResponseBody2 +> = z.object({ + ok: z.boolean(), + result: z.array( + z.lazy(() => AddBypassIpResponseBodySecurityResult$outboundSchema), + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpResponseBody2$ { + /** @deprecated use `AddBypassIpResponseBody2$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpResponseBody2$inboundSchema; + /** @deprecated use `AddBypassIpResponseBody2$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpResponseBody2$outboundSchema; + /** @deprecated use `AddBypassIpResponseBody2$Outbound` instead. */ + export type Outbound = AddBypassIpResponseBody2$Outbound; +} + +export function addBypassIpResponseBody2ToJSON( + addBypassIpResponseBody2: AddBypassIpResponseBody2, +): string { + return JSON.stringify( + AddBypassIpResponseBody2$outboundSchema.parse(addBypassIpResponseBody2), + ); +} + +export function addBypassIpResponseBody2FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddBypassIpResponseBody2$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpResponseBody2' from JSON`, + ); +} + +/** @internal */ +export const AddBypassIpResponseBodyResult$inboundSchema: z.ZodType< + AddBypassIpResponseBodyResult, + z.ZodTypeDef, + unknown +> = z.object({ + OwnerId: z.string(), + Id: z.string(), + Domain: z.string(), + Ip: z.string().optional(), + ProjectId: z.string(), + IsProjectRule: z.boolean(), +}).transform((v) => { + return remap$(v, { + "OwnerId": "ownerId", + "Id": "id", + "Domain": "domain", + "Ip": "ip", + "ProjectId": "projectId", + "IsProjectRule": "isProjectRule", + }); +}); + +/** @internal */ +export type AddBypassIpResponseBodyResult$Outbound = { + OwnerId: string; + Id: string; + Domain: string; + Ip?: string | undefined; + ProjectId: string; + IsProjectRule: boolean; +}; + +/** @internal */ +export const AddBypassIpResponseBodyResult$outboundSchema: z.ZodType< + AddBypassIpResponseBodyResult$Outbound, + z.ZodTypeDef, + AddBypassIpResponseBodyResult +> = z.object({ + ownerId: z.string(), + id: z.string(), + domain: z.string(), + ip: z.string().optional(), + projectId: z.string(), + isProjectRule: z.boolean(), +}).transform((v) => { + return remap$(v, { + ownerId: "OwnerId", + id: "Id", + domain: "Domain", + ip: "Ip", + projectId: "ProjectId", + isProjectRule: "IsProjectRule", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpResponseBodyResult$ { + /** @deprecated use `AddBypassIpResponseBodyResult$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpResponseBodyResult$inboundSchema; + /** @deprecated use `AddBypassIpResponseBodyResult$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpResponseBodyResult$outboundSchema; + /** @deprecated use `AddBypassIpResponseBodyResult$Outbound` instead. */ + export type Outbound = AddBypassIpResponseBodyResult$Outbound; +} + +export function addBypassIpResponseBodyResultToJSON( + addBypassIpResponseBodyResult: AddBypassIpResponseBodyResult, +): string { + return JSON.stringify( + AddBypassIpResponseBodyResult$outboundSchema.parse( + addBypassIpResponseBodyResult, + ), + ); +} + +export function addBypassIpResponseBodyResultFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddBypassIpResponseBodyResult$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpResponseBodyResult' from JSON`, + ); +} + +/** @internal */ +export const AddBypassIpResponseBody1$inboundSchema: z.ZodType< + AddBypassIpResponseBody1, + z.ZodTypeDef, + unknown +> = z.object({ + ok: z.boolean(), + result: z.array(z.lazy(() => AddBypassIpResponseBodyResult$inboundSchema)), + pagination: z.nullable(z.any()).optional(), +}); + +/** @internal */ +export type AddBypassIpResponseBody1$Outbound = { + ok: boolean; + result: Array; + pagination?: any | null | undefined; +}; + +/** @internal */ +export const AddBypassIpResponseBody1$outboundSchema: z.ZodType< + AddBypassIpResponseBody1$Outbound, + z.ZodTypeDef, + AddBypassIpResponseBody1 +> = z.object({ + ok: z.boolean(), + result: z.array(z.lazy(() => AddBypassIpResponseBodyResult$outboundSchema)), + pagination: z.nullable(z.any()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpResponseBody1$ { + /** @deprecated use `AddBypassIpResponseBody1$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpResponseBody1$inboundSchema; + /** @deprecated use `AddBypassIpResponseBody1$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpResponseBody1$outboundSchema; + /** @deprecated use `AddBypassIpResponseBody1$Outbound` instead. */ + export type Outbound = AddBypassIpResponseBody1$Outbound; +} + +export function addBypassIpResponseBody1ToJSON( + addBypassIpResponseBody1: AddBypassIpResponseBody1, +): string { + return JSON.stringify( + AddBypassIpResponseBody1$outboundSchema.parse(addBypassIpResponseBody1), + ); +} + +export function addBypassIpResponseBody1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddBypassIpResponseBody1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpResponseBody1' from JSON`, + ); +} + +/** @internal */ +export const AddBypassIpResponseBody$inboundSchema: z.ZodType< + AddBypassIpResponseBody, + z.ZodTypeDef, + unknown +> = z.union([ + z.lazy(() => AddBypassIpResponseBody2$inboundSchema), + z.lazy(() => AddBypassIpResponseBody1$inboundSchema), +]); + +/** @internal */ +export type AddBypassIpResponseBody$Outbound = + | AddBypassIpResponseBody2$Outbound + | AddBypassIpResponseBody1$Outbound; + +/** @internal */ +export const AddBypassIpResponseBody$outboundSchema: z.ZodType< + AddBypassIpResponseBody$Outbound, + z.ZodTypeDef, + AddBypassIpResponseBody +> = z.union([ + z.lazy(() => AddBypassIpResponseBody2$outboundSchema), + z.lazy(() => AddBypassIpResponseBody1$outboundSchema), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AddBypassIpResponseBody$ { + /** @deprecated use `AddBypassIpResponseBody$inboundSchema` instead. */ + export const inboundSchema = AddBypassIpResponseBody$inboundSchema; + /** @deprecated use `AddBypassIpResponseBody$outboundSchema` instead. */ + export const outboundSchema = AddBypassIpResponseBody$outboundSchema; + /** @deprecated use `AddBypassIpResponseBody$Outbound` instead. */ + export type Outbound = AddBypassIpResponseBody$Outbound; +} + +export function addBypassIpResponseBodyToJSON( + addBypassIpResponseBody: AddBypassIpResponseBody, +): string { + return JSON.stringify( + AddBypassIpResponseBody$outboundSchema.parse(addBypassIpResponseBody), + ); +} + +export function addBypassIpResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddBypassIpResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddBypassIpResponseBody' from JSON`, + ); +} diff --git a/src/models/authuser.ts b/src/models/authuser.ts index 557819f4..d9fe1bfc 100644 --- a/src/models/authuser.ts +++ b/src/models/authuser.ts @@ -188,9 +188,9 @@ export type RecentsViewPreference = ClosedEnum; */ export type ActiveDashboardViews = { scopeId: string; - viewPreference?: ViewPreference | undefined; - favoritesViewPreference?: FavoritesViewPreference | undefined; - recentsViewPreference?: RecentsViewPreference | undefined; + viewPreference?: ViewPreference | null | undefined; + favoritesViewPreference?: FavoritesViewPreference | null | undefined; + recentsViewPreference?: RecentsViewPreference | null | undefined; }; export type ImportFlowGitNamespace = string | number; @@ -303,13 +303,13 @@ export type NorthstarMigration = { }; /** - * The user's version. Will either be unset or `northstar`. + * The user's version. Will always be `northstar`. */ export const Version = { Northstar: "northstar", } as const; /** - * The user's version. Will either be unset or `northstar`. + * The user's version. Will always be `northstar`. */ export type Version = ClosedEnum; @@ -343,7 +343,7 @@ export type AuthUser = { activeDashboardViews?: Array | undefined; importFlowGitNamespace?: string | number | null | undefined; importFlowGitNamespaceId?: string | number | null | undefined; - importFlowGitProvider?: ImportFlowGitProvider | undefined; + importFlowGitProvider?: ImportFlowGitProvider | null | undefined; preferredScopesAndGitNamespaces?: | Array | undefined; @@ -393,13 +393,13 @@ export type AuthUser = { */ avatar: string | null; /** - * The user's default team. Only applies if the user's `version` is `'northstar'`. + * The user's default team. */ defaultTeamId: string | null; /** - * The user's version. Will either be unset or `northstar`. + * The user's version. Will always be `northstar`. */ - version: Version | null; + version: Version; }; /** @internal */ @@ -713,17 +713,19 @@ export const ActiveDashboardViews$inboundSchema: z.ZodType< unknown > = z.object({ scopeId: z.string(), - viewPreference: ViewPreference$inboundSchema.optional(), - favoritesViewPreference: FavoritesViewPreference$inboundSchema.optional(), - recentsViewPreference: RecentsViewPreference$inboundSchema.optional(), + viewPreference: z.nullable(ViewPreference$inboundSchema).optional(), + favoritesViewPreference: z.nullable(FavoritesViewPreference$inboundSchema) + .optional(), + recentsViewPreference: z.nullable(RecentsViewPreference$inboundSchema) + .optional(), }); /** @internal */ export type ActiveDashboardViews$Outbound = { scopeId: string; - viewPreference?: string | undefined; - favoritesViewPreference?: string | undefined; - recentsViewPreference?: string | undefined; + viewPreference?: string | null | undefined; + favoritesViewPreference?: string | null | undefined; + recentsViewPreference?: string | null | undefined; }; /** @internal */ @@ -733,9 +735,11 @@ export const ActiveDashboardViews$outboundSchema: z.ZodType< ActiveDashboardViews > = z.object({ scopeId: z.string(), - viewPreference: ViewPreference$outboundSchema.optional(), - favoritesViewPreference: FavoritesViewPreference$outboundSchema.optional(), - recentsViewPreference: RecentsViewPreference$outboundSchema.optional(), + viewPreference: z.nullable(ViewPreference$outboundSchema).optional(), + favoritesViewPreference: z.nullable(FavoritesViewPreference$outboundSchema) + .optional(), + recentsViewPreference: z.nullable(RecentsViewPreference$outboundSchema) + .optional(), }); /** @@ -1563,7 +1567,8 @@ export const AuthUser$inboundSchema: z.ZodType< .optional(), importFlowGitNamespaceId: z.nullable(z.union([z.string(), z.number()])) .optional(), - importFlowGitProvider: ImportFlowGitProvider$inboundSchema.optional(), + importFlowGitProvider: z.nullable(ImportFlowGitProvider$inboundSchema) + .optional(), preferredScopesAndGitNamespaces: z.array( z.lazy(() => PreferredScopesAndGitNamespaces$inboundSchema), ).optional(), @@ -1583,7 +1588,7 @@ export const AuthUser$inboundSchema: z.ZodType< username: z.string(), avatar: z.nullable(z.string()), defaultTeamId: z.nullable(z.string()), - version: z.nullable(Version$inboundSchema), + version: Version$inboundSchema, }); /** @internal */ @@ -1596,7 +1601,7 @@ export type AuthUser$Outbound = { activeDashboardViews?: Array | undefined; importFlowGitNamespace?: string | number | null | undefined; importFlowGitNamespaceId?: string | number | null | undefined; - importFlowGitProvider?: string | undefined; + importFlowGitProvider?: string | null | undefined; preferredScopesAndGitNamespaces?: | Array | undefined; @@ -1613,7 +1618,7 @@ export type AuthUser$Outbound = { username: string; avatar: string | null; defaultTeamId: string | null; - version: string | null; + version: string; }; /** @internal */ @@ -1634,7 +1639,8 @@ export const AuthUser$outboundSchema: z.ZodType< .optional(), importFlowGitNamespaceId: z.nullable(z.union([z.string(), z.number()])) .optional(), - importFlowGitProvider: ImportFlowGitProvider$outboundSchema.optional(), + importFlowGitProvider: z.nullable(ImportFlowGitProvider$outboundSchema) + .optional(), preferredScopesAndGitNamespaces: z.array( z.lazy(() => PreferredScopesAndGitNamespaces$outboundSchema), ).optional(), @@ -1658,7 +1664,7 @@ export const AuthUser$outboundSchema: z.ZodType< username: z.string(), avatar: z.nullable(z.string()), defaultTeamId: z.nullable(z.string()), - version: z.nullable(Version$outboundSchema), + version: Version$outboundSchema, }); /** diff --git a/src/models/authuserlimited.ts b/src/models/authuserlimited.ts index 70d38b5d..270315b5 100644 --- a/src/models/authuserlimited.ts +++ b/src/models/authuserlimited.ts @@ -9,13 +9,13 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; /** - * The user's version. Will either be unset or `northstar`. + * The user's version. Will always be `northstar`. */ export const AuthUserLimitedVersion = { Northstar: "northstar", } as const; /** - * The user's version. Will either be unset or `northstar`. + * The user's version. Will always be `northstar`. */ export type AuthUserLimitedVersion = ClosedEnum; @@ -48,13 +48,13 @@ export type AuthUserLimited = { */ avatar: string | null; /** - * The user's default team. Only applies if the user's `version` is `'northstar'`. + * The user's default team. */ defaultTeamId: string | null; /** - * The user's version. Will either be unset or `northstar`. + * The user's version. Will always be `northstar`. */ - version: AuthUserLimitedVersion | null; + version: AuthUserLimitedVersion; }; /** @internal */ @@ -91,7 +91,7 @@ export const AuthUserLimited$inboundSchema: z.ZodType< username: z.string(), avatar: z.nullable(z.string()), defaultTeamId: z.nullable(z.string()), - version: z.nullable(AuthUserLimitedVersion$inboundSchema), + version: AuthUserLimitedVersion$inboundSchema, }); /** @internal */ @@ -103,7 +103,7 @@ export type AuthUserLimited$Outbound = { username: string; avatar: string | null; defaultTeamId: string | null; - version: string | null; + version: string; }; /** @internal */ @@ -119,7 +119,7 @@ export const AuthUserLimited$outboundSchema: z.ZodType< username: z.string(), avatar: z.nullable(z.string()), defaultTeamId: z.nullable(z.string()), - version: z.nullable(AuthUserLimitedVersion$outboundSchema), + version: AuthUserLimitedVersion$outboundSchema, }); /** diff --git a/src/models/createdeploymentop.ts b/src/models/createdeploymentop.ts index a51f1352..895838c1 100644 --- a/src/models/createdeploymentop.ts +++ b/src/models/createdeploymentop.ts @@ -335,6 +335,10 @@ export const Target = { export type Target = ClosedEnum; export type CreateDeploymentRequestBody = { + /** + * Deploy to a custom environment, which will override the default environment + */ + customEnvironmentSlugOrId?: string | undefined; /** * An deployment id for an existing deployment to redeploy */ @@ -2274,6 +2278,7 @@ export const CreateDeploymentRequestBody$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + customEnvironmentSlugOrId: z.string().optional(), deploymentId: z.string().optional(), files: z.array( z.union([ @@ -2300,6 +2305,7 @@ export const CreateDeploymentRequestBody$inboundSchema: z.ZodType< /** @internal */ export type CreateDeploymentRequestBody$Outbound = { + customEnvironmentSlugOrId?: string | undefined; deploymentId?: string | undefined; files?: Array | undefined; gitMetadata?: GitMetadata$Outbound | undefined; @@ -2325,6 +2331,7 @@ export const CreateDeploymentRequestBody$outboundSchema: z.ZodType< z.ZodTypeDef, CreateDeploymentRequestBody > = z.object({ + customEnvironmentSlugOrId: z.string().optional(), deploymentId: z.string().optional(), files: z.array( z.union([ diff --git a/src/models/createprojectop.ts b/src/models/createprojectop.ts index fb0fa85e..172defee 100644 --- a/src/models/createprojectop.ts +++ b/src/models/createprojectop.ts @@ -1003,10 +1003,12 @@ export type CreateProjectFunctionDefaultMemoryType = ClosedEnum< >; export type CreateProjectResourceConfig = { + functionDefaultRegion?: string | undefined; functionDefaultTimeout?: number | undefined; functionDefaultMemoryType?: | CreateProjectFunctionDefaultMemoryType | undefined; + functionZeroConfigFailover?: boolean | undefined; allowServerlessConcurrency?: boolean | undefined; elasticConcurrencyEnabled?: boolean | undefined; }; @@ -6084,17 +6086,21 @@ export const CreateProjectResourceConfig$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + functionDefaultRegion: z.string().optional(), functionDefaultTimeout: z.number().optional(), functionDefaultMemoryType: CreateProjectFunctionDefaultMemoryType$inboundSchema.optional(), + functionZeroConfigFailover: z.boolean().optional(), allowServerlessConcurrency: z.boolean().optional(), elasticConcurrencyEnabled: z.boolean().optional(), }); /** @internal */ export type CreateProjectResourceConfig$Outbound = { + functionDefaultRegion?: string | undefined; functionDefaultTimeout?: number | undefined; functionDefaultMemoryType?: string | undefined; + functionZeroConfigFailover?: boolean | undefined; allowServerlessConcurrency?: boolean | undefined; elasticConcurrencyEnabled?: boolean | undefined; }; @@ -6105,9 +6111,11 @@ export const CreateProjectResourceConfig$outboundSchema: z.ZodType< z.ZodTypeDef, CreateProjectResourceConfig > = z.object({ + functionDefaultRegion: z.string().optional(), functionDefaultTimeout: z.number().optional(), functionDefaultMemoryType: CreateProjectFunctionDefaultMemoryType$outboundSchema.optional(), + functionZeroConfigFailover: z.boolean().optional(), allowServerlessConcurrency: z.boolean().optional(), elasticConcurrencyEnabled: z.boolean().optional(), }); diff --git a/src/models/createwebhookop.ts b/src/models/createwebhookop.ts index d392065e..c6fa9451 100644 --- a/src/models/createwebhookop.ts +++ b/src/models/createwebhookop.ts @@ -32,6 +32,9 @@ export const Events = { IntegrationConfigurationRemoved: "integration-configuration.removed", IntegrationConfigurationScopeChangeConfirmed: "integration-configuration.scope-change-confirmed", + IntegrationResourceProjectConnected: "integration-resource.project-connected", + IntegrationResourceProjectDisconnected: + "integration-resource.project-disconnected", ProjectCreated: "project.created", ProjectRemoved: "project.removed", DeploymentChecksCompletedLegacy: "deployment-checks-completed", @@ -53,8 +56,8 @@ export const Events = { MarketplaceInvoicePaid: "marketplace.invoice.paid", MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid", MarketplaceInvoiceRefunded: "marketplace.invoice.refunded", - TestWebhook: "observability.anomaly", - undefined: "test-webhook", + ObservabilityAnomaly: "observability.anomaly", + TestWebhook: "test-webhook", } as const; export type Events = ClosedEnum; @@ -102,6 +105,9 @@ export const CreateWebhookEvents = { IntegrationConfigurationRemoved: "integration-configuration.removed", IntegrationConfigurationScopeChangeConfirmed: "integration-configuration.scope-change-confirmed", + IntegrationResourceProjectConnected: "integration-resource.project-connected", + IntegrationResourceProjectDisconnected: + "integration-resource.project-disconnected", ProjectCreated: "project.created", ProjectRemoved: "project.removed", DeploymentChecksCompletedLegacy: "deployment-checks-completed", @@ -123,8 +129,8 @@ export const CreateWebhookEvents = { MarketplaceInvoicePaid: "marketplace.invoice.paid", MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid", MarketplaceInvoiceRefunded: "marketplace.invoice.refunded", - TestWebhook: "observability.anomaly", - undefined: "test-webhook", + ObservabilityAnomaly: "observability.anomaly", + TestWebhook: "test-webhook", } as const; /** * The webhooks events diff --git a/src/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.ts b/src/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.ts new file mode 100644 index 00000000..4a8f2399 --- /dev/null +++ b/src/models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.ts @@ -0,0 +1,270 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +export type DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody = + { + /** + * Delete Environment Variables that are not assigned to any environments. + */ + deleteUnassignedEnvironmentVariables?: boolean | undefined; + }; + +export type DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest = + { + /** + * The unique project identifier or the project name + */ + idOrName: string; + /** + * The unique custom environment identifier within the project + */ + environmentSlugOrId: string; + /** + * The Team identifier to perform the request on behalf of. + */ + teamId?: string | undefined; + /** + * The Team slug to perform the request on behalf of. + */ + slug?: string | undefined; + requestBody?: + | DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody + | undefined; + }; + +export type DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody = + {}; + +/** @internal */ +export const DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema: + z.ZodType< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody, + z.ZodTypeDef, + unknown + > = z.object({ + deleteUnassignedEnvironmentVariables: z.boolean().optional(), + }); + +/** @internal */ +export type DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound = + { + deleteUnassignedEnvironmentVariables?: boolean | undefined; + }; + +/** @internal */ +export const DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema: + z.ZodType< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound, + z.ZodTypeDef, + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody + > = z.object({ + deleteUnassignedEnvironmentVariables: z.boolean().optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$ { + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema` instead. */ + export const inboundSchema = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema; + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema` instead. */ + export const outboundSchema = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema; + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound` instead. */ + export type Outbound = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound; +} + +export function deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBodyToJSON( + deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody: + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody, +): string { + return JSON.stringify( + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema + .parse( + deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody, + ), + ); +} + +export function deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody' from JSON`, + ); +} + +/** @internal */ +export const DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema: + z.ZodType< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + z.ZodTypeDef, + unknown + > = z.object({ + idOrName: z.string(), + environmentSlugOrId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + RequestBody: z.lazy(() => + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema + ).optional(), + }).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); + }); + +/** @internal */ +export type DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound = + { + idOrName: string; + environmentSlugOrId: string; + teamId?: string | undefined; + slug?: string | undefined; + RequestBody?: + | DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound + | undefined; + }; + +/** @internal */ +export const DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema: + z.ZodType< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound, + z.ZodTypeDef, + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest + > = z.object({ + idOrName: z.string(), + environmentSlugOrId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + requestBody: z.lazy(() => + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema + ).optional(), + }).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$ { + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema` instead. */ + export const inboundSchema = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema; + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema` instead. */ + export const outboundSchema = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema; + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound` instead. */ + export type Outbound = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound; +} + +export function deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestToJSON( + deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest: + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, +): string { + return JSON.stringify( + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema + .parse( + deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + ), + ); +} + +export function deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestFromJSON( + jsonString: string, +): SafeParseResult< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema: + z.ZodType< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound = + {}; + +/** @internal */ +export const DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema: + z.ZodType< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound, + z.ZodTypeDef, + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$ { + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema; + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema; + /** @deprecated use `DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound` instead. */ + export type Outbound = + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound; +} + +export function deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBodyToJSON( + deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody: + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, +): string { + return JSON.stringify( + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema + .parse( + deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + ), + ); +} + +export function deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody' from JSON`, + ); +} diff --git a/src/models/filterprojectenvsop.ts b/src/models/filterprojectenvsop.ts index c13549b0..9873ee70 100644 --- a/src/models/filterprojectenvsop.ts +++ b/src/models/filterprojectenvsop.ts @@ -47,6 +47,14 @@ export type FilterProjectEnvsRequest = { * The source that is calling the endpoint. */ source?: string | undefined; + /** + * The unique custom environment identifier within the project + */ + customEnvironmentId?: string | undefined; + /** + * The custom environment slug (name) within the project + */ + customEnvironmentSlug?: string | undefined; /** * The Team identifier to perform the request on behalf of. */ @@ -1141,6 +1149,8 @@ export const FilterProjectEnvsRequest$inboundSchema: z.ZodType< gitBranch: z.string().optional(), decrypt: Decrypt$inboundSchema.optional(), source: z.string().optional(), + customEnvironmentId: z.string().optional(), + customEnvironmentSlug: z.string().optional(), teamId: z.string().optional(), slug: z.string().optional(), }); @@ -1151,6 +1161,8 @@ export type FilterProjectEnvsRequest$Outbound = { gitBranch?: string | undefined; decrypt?: string | undefined; source?: string | undefined; + customEnvironmentId?: string | undefined; + customEnvironmentSlug?: string | undefined; teamId?: string | undefined; slug?: string | undefined; }; @@ -1165,6 +1177,8 @@ export const FilterProjectEnvsRequest$outboundSchema: z.ZodType< gitBranch: z.string().optional(), decrypt: Decrypt$outboundSchema.optional(), source: z.string().optional(), + customEnvironmentId: z.string().optional(), + customEnvironmentSlug: z.string().optional(), teamId: z.string().optional(), slug: z.string().optional(), }); diff --git a/src/models/getbypassipop.ts b/src/models/getbypassipop.ts new file mode 100644 index 00000000..ae411faf --- /dev/null +++ b/src/models/getbypassipop.ts @@ -0,0 +1,646 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +export type GetBypassIpRequest = { + projectId: string; + limit?: number | undefined; + /** + * Filter by source IP + */ + sourceIp?: string | undefined; + /** + * Filter by domain + */ + domain?: string | undefined; + /** + * Filter by project scoped rules + */ + projectScope?: boolean | undefined; + /** + * Used for pagination. Retrieves results after the provided id + */ + offset?: string | undefined; + /** + * The Team identifier to perform the request on behalf of. + */ + teamId?: string | undefined; + /** + * The Team slug to perform the request on behalf of. + */ + slug?: string | undefined; +}; + +export const ResponseBodyAction = { + Block: "block", + Bypass: "bypass", +} as const; +export type ResponseBodyAction = ClosedEnum; + +export type GetBypassIpResponseBodyResult = { + ownerId: string; + id: string; + domain: string; + ip: string; + action?: ResponseBodyAction | undefined; + projectId?: string | undefined; + isProjectRule?: boolean | undefined; + note?: string | undefined; + createdAt: string; + actorId?: string | undefined; + updatedAt: string; + updatedAtHour: string; + deletedAt?: string | undefined; + expiresAt?: number | undefined; +}; + +export type GetBypassIpResponseBodyPagination = { + ownerId: string; + id: string; +}; + +export type GetBypassIpResponseBody2 = { + result?: Array | undefined; + pagination?: GetBypassIpResponseBodyPagination | undefined; +}; + +export type ResponseBodyResult = { + ownerId: string; + id: string; + domain: string; + ip: string; + projectId: string; + isProjectRule: boolean; +}; + +export type GetBypassIpResponseBody1 = { + result: Array; + pagination?: any | null | undefined; +}; + +export type GetBypassIpResponseBody = + | GetBypassIpResponseBody1 + | GetBypassIpResponseBody2; + +/** @internal */ +export const GetBypassIpRequest$inboundSchema: z.ZodType< + GetBypassIpRequest, + z.ZodTypeDef, + unknown +> = z.object({ + projectId: z.string(), + limit: z.number().optional(), + sourceIp: z.string().optional(), + domain: z.string().optional(), + projectScope: z.boolean().optional(), + offset: z.string().optional(), + teamId: z.string().optional(), + slug: z.string().optional(), +}); + +/** @internal */ +export type GetBypassIpRequest$Outbound = { + projectId: string; + limit?: number | undefined; + sourceIp?: string | undefined; + domain?: string | undefined; + projectScope?: boolean | undefined; + offset?: string | undefined; + teamId?: string | undefined; + slug?: string | undefined; +}; + +/** @internal */ +export const GetBypassIpRequest$outboundSchema: z.ZodType< + GetBypassIpRequest$Outbound, + z.ZodTypeDef, + GetBypassIpRequest +> = z.object({ + projectId: z.string(), + limit: z.number().optional(), + sourceIp: z.string().optional(), + domain: z.string().optional(), + projectScope: z.boolean().optional(), + offset: z.string().optional(), + teamId: z.string().optional(), + slug: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetBypassIpRequest$ { + /** @deprecated use `GetBypassIpRequest$inboundSchema` instead. */ + export const inboundSchema = GetBypassIpRequest$inboundSchema; + /** @deprecated use `GetBypassIpRequest$outboundSchema` instead. */ + export const outboundSchema = GetBypassIpRequest$outboundSchema; + /** @deprecated use `GetBypassIpRequest$Outbound` instead. */ + export type Outbound = GetBypassIpRequest$Outbound; +} + +export function getBypassIpRequestToJSON( + getBypassIpRequest: GetBypassIpRequest, +): string { + return JSON.stringify( + GetBypassIpRequest$outboundSchema.parse(getBypassIpRequest), + ); +} + +export function getBypassIpRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetBypassIpRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetBypassIpRequest' from JSON`, + ); +} + +/** @internal */ +export const ResponseBodyAction$inboundSchema: z.ZodNativeEnum< + typeof ResponseBodyAction +> = z.nativeEnum(ResponseBodyAction); + +/** @internal */ +export const ResponseBodyAction$outboundSchema: z.ZodNativeEnum< + typeof ResponseBodyAction +> = ResponseBodyAction$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ResponseBodyAction$ { + /** @deprecated use `ResponseBodyAction$inboundSchema` instead. */ + export const inboundSchema = ResponseBodyAction$inboundSchema; + /** @deprecated use `ResponseBodyAction$outboundSchema` instead. */ + export const outboundSchema = ResponseBodyAction$outboundSchema; +} + +/** @internal */ +export const GetBypassIpResponseBodyResult$inboundSchema: z.ZodType< + GetBypassIpResponseBodyResult, + z.ZodTypeDef, + unknown +> = z.object({ + OwnerId: z.string(), + Id: z.string(), + Domain: z.string(), + Ip: z.string(), + Action: ResponseBodyAction$inboundSchema.optional(), + ProjectId: z.string().optional(), + IsProjectRule: z.boolean().optional(), + Note: z.string().optional(), + CreatedAt: z.string(), + ActorId: z.string().optional(), + UpdatedAt: z.string(), + UpdatedAtHour: z.string(), + DeletedAt: z.string().optional(), + ExpiresAt: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "OwnerId": "ownerId", + "Id": "id", + "Domain": "domain", + "Ip": "ip", + "Action": "action", + "ProjectId": "projectId", + "IsProjectRule": "isProjectRule", + "Note": "note", + "CreatedAt": "createdAt", + "ActorId": "actorId", + "UpdatedAt": "updatedAt", + "UpdatedAtHour": "updatedAtHour", + "DeletedAt": "deletedAt", + "ExpiresAt": "expiresAt", + }); +}); + +/** @internal */ +export type GetBypassIpResponseBodyResult$Outbound = { + OwnerId: string; + Id: string; + Domain: string; + Ip: string; + Action?: string | undefined; + ProjectId?: string | undefined; + IsProjectRule?: boolean | undefined; + Note?: string | undefined; + CreatedAt: string; + ActorId?: string | undefined; + UpdatedAt: string; + UpdatedAtHour: string; + DeletedAt?: string | undefined; + ExpiresAt?: number | undefined; +}; + +/** @internal */ +export const GetBypassIpResponseBodyResult$outboundSchema: z.ZodType< + GetBypassIpResponseBodyResult$Outbound, + z.ZodTypeDef, + GetBypassIpResponseBodyResult +> = z.object({ + ownerId: z.string(), + id: z.string(), + domain: z.string(), + ip: z.string(), + action: ResponseBodyAction$outboundSchema.optional(), + projectId: z.string().optional(), + isProjectRule: z.boolean().optional(), + note: z.string().optional(), + createdAt: z.string(), + actorId: z.string().optional(), + updatedAt: z.string(), + updatedAtHour: z.string(), + deletedAt: z.string().optional(), + expiresAt: z.number().optional(), +}).transform((v) => { + return remap$(v, { + ownerId: "OwnerId", + id: "Id", + domain: "Domain", + ip: "Ip", + action: "Action", + projectId: "ProjectId", + isProjectRule: "IsProjectRule", + note: "Note", + createdAt: "CreatedAt", + actorId: "ActorId", + updatedAt: "UpdatedAt", + updatedAtHour: "UpdatedAtHour", + deletedAt: "DeletedAt", + expiresAt: "ExpiresAt", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetBypassIpResponseBodyResult$ { + /** @deprecated use `GetBypassIpResponseBodyResult$inboundSchema` instead. */ + export const inboundSchema = GetBypassIpResponseBodyResult$inboundSchema; + /** @deprecated use `GetBypassIpResponseBodyResult$outboundSchema` instead. */ + export const outboundSchema = GetBypassIpResponseBodyResult$outboundSchema; + /** @deprecated use `GetBypassIpResponseBodyResult$Outbound` instead. */ + export type Outbound = GetBypassIpResponseBodyResult$Outbound; +} + +export function getBypassIpResponseBodyResultToJSON( + getBypassIpResponseBodyResult: GetBypassIpResponseBodyResult, +): string { + return JSON.stringify( + GetBypassIpResponseBodyResult$outboundSchema.parse( + getBypassIpResponseBodyResult, + ), + ); +} + +export function getBypassIpResponseBodyResultFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetBypassIpResponseBodyResult$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetBypassIpResponseBodyResult' from JSON`, + ); +} + +/** @internal */ +export const GetBypassIpResponseBodyPagination$inboundSchema: z.ZodType< + GetBypassIpResponseBodyPagination, + z.ZodTypeDef, + unknown +> = z.object({ + OwnerId: z.string(), + Id: z.string(), +}).transform((v) => { + return remap$(v, { + "OwnerId": "ownerId", + "Id": "id", + }); +}); + +/** @internal */ +export type GetBypassIpResponseBodyPagination$Outbound = { + OwnerId: string; + Id: string; +}; + +/** @internal */ +export const GetBypassIpResponseBodyPagination$outboundSchema: z.ZodType< + GetBypassIpResponseBodyPagination$Outbound, + z.ZodTypeDef, + GetBypassIpResponseBodyPagination +> = z.object({ + ownerId: z.string(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + ownerId: "OwnerId", + id: "Id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetBypassIpResponseBodyPagination$ { + /** @deprecated use `GetBypassIpResponseBodyPagination$inboundSchema` instead. */ + export const inboundSchema = GetBypassIpResponseBodyPagination$inboundSchema; + /** @deprecated use `GetBypassIpResponseBodyPagination$outboundSchema` instead. */ + export const outboundSchema = + GetBypassIpResponseBodyPagination$outboundSchema; + /** @deprecated use `GetBypassIpResponseBodyPagination$Outbound` instead. */ + export type Outbound = GetBypassIpResponseBodyPagination$Outbound; +} + +export function getBypassIpResponseBodyPaginationToJSON( + getBypassIpResponseBodyPagination: GetBypassIpResponseBodyPagination, +): string { + return JSON.stringify( + GetBypassIpResponseBodyPagination$outboundSchema.parse( + getBypassIpResponseBodyPagination, + ), + ); +} + +export function getBypassIpResponseBodyPaginationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetBypassIpResponseBodyPagination$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetBypassIpResponseBodyPagination' from JSON`, + ); +} + +/** @internal */ +export const GetBypassIpResponseBody2$inboundSchema: z.ZodType< + GetBypassIpResponseBody2, + z.ZodTypeDef, + unknown +> = z.object({ + result: z.array(z.lazy(() => GetBypassIpResponseBodyResult$inboundSchema)) + .optional(), + pagination: z.lazy(() => GetBypassIpResponseBodyPagination$inboundSchema) + .optional(), +}); + +/** @internal */ +export type GetBypassIpResponseBody2$Outbound = { + result?: Array | undefined; + pagination?: GetBypassIpResponseBodyPagination$Outbound | undefined; +}; + +/** @internal */ +export const GetBypassIpResponseBody2$outboundSchema: z.ZodType< + GetBypassIpResponseBody2$Outbound, + z.ZodTypeDef, + GetBypassIpResponseBody2 +> = z.object({ + result: z.array(z.lazy(() => GetBypassIpResponseBodyResult$outboundSchema)) + .optional(), + pagination: z.lazy(() => GetBypassIpResponseBodyPagination$outboundSchema) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetBypassIpResponseBody2$ { + /** @deprecated use `GetBypassIpResponseBody2$inboundSchema` instead. */ + export const inboundSchema = GetBypassIpResponseBody2$inboundSchema; + /** @deprecated use `GetBypassIpResponseBody2$outboundSchema` instead. */ + export const outboundSchema = GetBypassIpResponseBody2$outboundSchema; + /** @deprecated use `GetBypassIpResponseBody2$Outbound` instead. */ + export type Outbound = GetBypassIpResponseBody2$Outbound; +} + +export function getBypassIpResponseBody2ToJSON( + getBypassIpResponseBody2: GetBypassIpResponseBody2, +): string { + return JSON.stringify( + GetBypassIpResponseBody2$outboundSchema.parse(getBypassIpResponseBody2), + ); +} + +export function getBypassIpResponseBody2FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetBypassIpResponseBody2$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetBypassIpResponseBody2' from JSON`, + ); +} + +/** @internal */ +export const ResponseBodyResult$inboundSchema: z.ZodType< + ResponseBodyResult, + z.ZodTypeDef, + unknown +> = z.object({ + OwnerId: z.string(), + Id: z.string(), + Domain: z.string(), + Ip: z.string(), + ProjectId: z.string(), + IsProjectRule: z.boolean(), +}).transform((v) => { + return remap$(v, { + "OwnerId": "ownerId", + "Id": "id", + "Domain": "domain", + "Ip": "ip", + "ProjectId": "projectId", + "IsProjectRule": "isProjectRule", + }); +}); + +/** @internal */ +export type ResponseBodyResult$Outbound = { + OwnerId: string; + Id: string; + Domain: string; + Ip: string; + ProjectId: string; + IsProjectRule: boolean; +}; + +/** @internal */ +export const ResponseBodyResult$outboundSchema: z.ZodType< + ResponseBodyResult$Outbound, + z.ZodTypeDef, + ResponseBodyResult +> = z.object({ + ownerId: z.string(), + id: z.string(), + domain: z.string(), + ip: z.string(), + projectId: z.string(), + isProjectRule: z.boolean(), +}).transform((v) => { + return remap$(v, { + ownerId: "OwnerId", + id: "Id", + domain: "Domain", + ip: "Ip", + projectId: "ProjectId", + isProjectRule: "IsProjectRule", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ResponseBodyResult$ { + /** @deprecated use `ResponseBodyResult$inboundSchema` instead. */ + export const inboundSchema = ResponseBodyResult$inboundSchema; + /** @deprecated use `ResponseBodyResult$outboundSchema` instead. */ + export const outboundSchema = ResponseBodyResult$outboundSchema; + /** @deprecated use `ResponseBodyResult$Outbound` instead. */ + export type Outbound = ResponseBodyResult$Outbound; +} + +export function responseBodyResultToJSON( + responseBodyResult: ResponseBodyResult, +): string { + return JSON.stringify( + ResponseBodyResult$outboundSchema.parse(responseBodyResult), + ); +} + +export function responseBodyResultFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ResponseBodyResult$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ResponseBodyResult' from JSON`, + ); +} + +/** @internal */ +export const GetBypassIpResponseBody1$inboundSchema: z.ZodType< + GetBypassIpResponseBody1, + z.ZodTypeDef, + unknown +> = z.object({ + result: z.array(z.lazy(() => ResponseBodyResult$inboundSchema)), + pagination: z.nullable(z.any()).optional(), +}); + +/** @internal */ +export type GetBypassIpResponseBody1$Outbound = { + result: Array; + pagination?: any | null | undefined; +}; + +/** @internal */ +export const GetBypassIpResponseBody1$outboundSchema: z.ZodType< + GetBypassIpResponseBody1$Outbound, + z.ZodTypeDef, + GetBypassIpResponseBody1 +> = z.object({ + result: z.array(z.lazy(() => ResponseBodyResult$outboundSchema)), + pagination: z.nullable(z.any()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetBypassIpResponseBody1$ { + /** @deprecated use `GetBypassIpResponseBody1$inboundSchema` instead. */ + export const inboundSchema = GetBypassIpResponseBody1$inboundSchema; + /** @deprecated use `GetBypassIpResponseBody1$outboundSchema` instead. */ + export const outboundSchema = GetBypassIpResponseBody1$outboundSchema; + /** @deprecated use `GetBypassIpResponseBody1$Outbound` instead. */ + export type Outbound = GetBypassIpResponseBody1$Outbound; +} + +export function getBypassIpResponseBody1ToJSON( + getBypassIpResponseBody1: GetBypassIpResponseBody1, +): string { + return JSON.stringify( + GetBypassIpResponseBody1$outboundSchema.parse(getBypassIpResponseBody1), + ); +} + +export function getBypassIpResponseBody1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetBypassIpResponseBody1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetBypassIpResponseBody1' from JSON`, + ); +} + +/** @internal */ +export const GetBypassIpResponseBody$inboundSchema: z.ZodType< + GetBypassIpResponseBody, + z.ZodTypeDef, + unknown +> = z.union([ + z.lazy(() => GetBypassIpResponseBody1$inboundSchema), + z.lazy(() => GetBypassIpResponseBody2$inboundSchema), +]); + +/** @internal */ +export type GetBypassIpResponseBody$Outbound = + | GetBypassIpResponseBody1$Outbound + | GetBypassIpResponseBody2$Outbound; + +/** @internal */ +export const GetBypassIpResponseBody$outboundSchema: z.ZodType< + GetBypassIpResponseBody$Outbound, + z.ZodTypeDef, + GetBypassIpResponseBody +> = z.union([ + z.lazy(() => GetBypassIpResponseBody1$outboundSchema), + z.lazy(() => GetBypassIpResponseBody2$outboundSchema), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetBypassIpResponseBody$ { + /** @deprecated use `GetBypassIpResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetBypassIpResponseBody$inboundSchema; + /** @deprecated use `GetBypassIpResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetBypassIpResponseBody$outboundSchema; + /** @deprecated use `GetBypassIpResponseBody$Outbound` instead. */ + export type Outbound = GetBypassIpResponseBody$Outbound; +} + +export function getBypassIpResponseBodyToJSON( + getBypassIpResponseBody: GetBypassIpResponseBody, +): string { + return JSON.stringify( + GetBypassIpResponseBody$outboundSchema.parse(getBypassIpResponseBody), + ); +} + +export function getBypassIpResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetBypassIpResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetBypassIpResponseBody' from JSON`, + ); +} diff --git a/src/models/getconfigurationsop.ts b/src/models/getconfigurationsop.ts index 5302a765..a1693334 100644 --- a/src/models/getconfigurationsop.ts +++ b/src/models/getconfigurationsop.ts @@ -37,6 +37,29 @@ export type GetConfigurationsRequest = { slug?: string | undefined; }; +export const TagIds = { + TagAi: "tag_ai", + TagAnalytics: "tag_analytics", + TagAuthentication: "tag_authentication", + TagCms: "tag_cms", + TagCodeRepository: "tag_code_repository", + TagCommerce: "tag_commerce", + TagDatabases: "tag_databases", + TagDevTools: "tag_dev_tools", + TagExperiments: "tag_experiments", + TagLogging: "tag_logging", + TagMessaging: "tag_messaging", + TagMonitoring: "tag_monitoring", + TagObservability: "tag_observability", + TagPerformance: "tag_performance", + TagProductivity: "tag_productivity", + TagSearching: "tag_searching", + TagSecurity: "tag_security", + TagTesting: "tag_testing", + TagVideo: "tag_video", +} as const; +export type TagIds = ClosedEnum; + export type Integration = { name: string; icon: string; @@ -44,6 +67,7 @@ export type Integration = { isLegacy: boolean; flags?: Array | undefined; assignedBetaLabelAt?: number | undefined; + tagIds?: Array | undefined; }; /** @@ -495,6 +519,25 @@ export function getConfigurationsRequestFromJSON( ); } +/** @internal */ +export const TagIds$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(TagIds); + +/** @internal */ +export const TagIds$outboundSchema: z.ZodNativeEnum = + TagIds$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TagIds$ { + /** @deprecated use `TagIds$inboundSchema` instead. */ + export const inboundSchema = TagIds$inboundSchema; + /** @deprecated use `TagIds$outboundSchema` instead. */ + export const outboundSchema = TagIds$outboundSchema; +} + /** @internal */ export const Integration$inboundSchema: z.ZodType< Integration, @@ -507,6 +550,7 @@ export const Integration$inboundSchema: z.ZodType< isLegacy: z.boolean(), flags: z.array(z.string()).optional(), assignedBetaLabelAt: z.number().optional(), + tagIds: z.array(TagIds$inboundSchema).optional(), }); /** @internal */ @@ -517,6 +561,7 @@ export type Integration$Outbound = { isLegacy: boolean; flags?: Array | undefined; assignedBetaLabelAt?: number | undefined; + tagIds?: Array | undefined; }; /** @internal */ @@ -531,6 +576,7 @@ export const Integration$outboundSchema: z.ZodType< isLegacy: z.boolean(), flags: z.array(z.string()).optional(), assignedBetaLabelAt: z.number().optional(), + tagIds: z.array(TagIds$outboundSchema).optional(), }); /** diff --git a/src/models/getprojectdomainsop.ts b/src/models/getprojectdomainsop.ts index 59dedc61..5db231d3 100644 --- a/src/models/getprojectdomainsop.ts +++ b/src/models/getprojectdomainsop.ts @@ -87,6 +87,10 @@ export type GetProjectDomainsRequest = { * Filters on the target of the domain. Can be either \"production\", \"preview\" */ target?: QueryParamTarget | undefined; + /** + * The unique custom environment identifier within the project + */ + customEnvironmentId?: string | undefined; /** * Filters domains based on specific branch. */ @@ -277,6 +281,7 @@ export const GetProjectDomainsRequest$inboundSchema: z.ZodType< idOrName: z.string(), production: Production$inboundSchema.default("false"), target: QueryParamTarget$inboundSchema.optional(), + customEnvironmentId: z.string().optional(), gitBranch: z.string().optional(), redirects: Redirects$inboundSchema.default("true"), redirect: z.string().optional(), @@ -294,6 +299,7 @@ export type GetProjectDomainsRequest$Outbound = { idOrName: string; production: string; target?: string | undefined; + customEnvironmentId?: string | undefined; gitBranch?: string | undefined; redirects: string; redirect?: string | undefined; @@ -315,6 +321,7 @@ export const GetProjectDomainsRequest$outboundSchema: z.ZodType< idOrName: z.string(), production: Production$outboundSchema.default("false"), target: QueryParamTarget$outboundSchema.optional(), + customEnvironmentId: z.string().optional(), gitBranch: z.string().optional(), redirects: Redirects$outboundSchema.default("true"), redirect: z.string().optional(), diff --git a/src/models/getprojectsop.ts b/src/models/getprojectsop.ts index 9f299800..78dea236 100644 --- a/src/models/getprojectsop.ts +++ b/src/models/getprojectsop.ts @@ -823,8 +823,10 @@ export type GetProjectsFunctionDefaultMemoryType = ClosedEnum< >; export type GetProjectsResourceConfig = { + functionDefaultRegion?: string | undefined; functionDefaultTimeout?: number | undefined; functionDefaultMemoryType?: GetProjectsFunctionDefaultMemoryType | undefined; + functionZeroConfigFailover?: boolean | undefined; allowServerlessConcurrency?: boolean | undefined; elasticConcurrencyEnabled?: boolean | undefined; }; @@ -5521,17 +5523,21 @@ export const GetProjectsResourceConfig$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + functionDefaultRegion: z.string().optional(), functionDefaultTimeout: z.number().optional(), functionDefaultMemoryType: GetProjectsFunctionDefaultMemoryType$inboundSchema .optional(), + functionZeroConfigFailover: z.boolean().optional(), allowServerlessConcurrency: z.boolean().optional(), elasticConcurrencyEnabled: z.boolean().optional(), }); /** @internal */ export type GetProjectsResourceConfig$Outbound = { + functionDefaultRegion?: string | undefined; functionDefaultTimeout?: number | undefined; functionDefaultMemoryType?: string | undefined; + functionZeroConfigFailover?: boolean | undefined; allowServerlessConcurrency?: boolean | undefined; elasticConcurrencyEnabled?: boolean | undefined; }; @@ -5542,9 +5548,11 @@ export const GetProjectsResourceConfig$outboundSchema: z.ZodType< z.ZodTypeDef, GetProjectsResourceConfig > = z.object({ + functionDefaultRegion: z.string().optional(), functionDefaultTimeout: z.number().optional(), functionDefaultMemoryType: GetProjectsFunctionDefaultMemoryType$outboundSchema .optional(), + functionZeroConfigFailover: z.boolean().optional(), allowServerlessConcurrency: z.boolean().optional(), elasticConcurrencyEnabled: z.boolean().optional(), }); diff --git a/src/models/getteammembersop.ts b/src/models/getteammembersop.ts index b5815e87..89e8901d 100644 --- a/src/models/getteammembersop.ts +++ b/src/models/getteammembersop.ts @@ -177,6 +177,10 @@ export type GetTeamMembersMembers = { * Role of this user in the team. */ role: GetTeamMembersRole; + /** + * Permissions that this user has in addition to their role. + */ + additionalRoles?: Array | undefined; /** * The ID of this user. */ @@ -788,6 +792,7 @@ export const GetTeamMembersMembers$inboundSchema: z.ZodType< gitlab: z.lazy(() => GetTeamMembersGitlab$inboundSchema).optional(), bitbucket: z.lazy(() => GetTeamMembersBitbucket$inboundSchema).optional(), role: GetTeamMembersRole$inboundSchema, + additionalRoles: z.array(z.string()).optional(), uid: z.string(), username: z.string(), name: z.string().optional(), @@ -807,6 +812,7 @@ export type GetTeamMembersMembers$Outbound = { gitlab?: GetTeamMembersGitlab$Outbound | undefined; bitbucket?: GetTeamMembersBitbucket$Outbound | undefined; role: string; + additionalRoles?: Array | undefined; uid: string; username: string; name?: string | undefined; @@ -829,6 +835,7 @@ export const GetTeamMembersMembers$outboundSchema: z.ZodType< gitlab: z.lazy(() => GetTeamMembersGitlab$outboundSchema).optional(), bitbucket: z.lazy(() => GetTeamMembersBitbucket$outboundSchema).optional(), role: GetTeamMembersRole$outboundSchema, + additionalRoles: z.array(z.string()).optional(), uid: z.string(), username: z.string(), name: z.string().optional(), diff --git a/src/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridop.ts b/src/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridop.ts new file mode 100644 index 00000000..eac4f79f --- /dev/null +++ b/src/models/getv9projectsidornamecustomenvironmentsenvironmentslugoridop.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +export type GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest = + { + /** + * The unique project identifier or the project name + */ + idOrName: string; + /** + * The unique custom environment identifier within the project + */ + environmentSlugOrId: string; + /** + * The Team identifier to perform the request on behalf of. + */ + teamId?: string | undefined; + /** + * The Team slug to perform the request on behalf of. + */ + slug?: string | undefined; + }; + +export type GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody = + {}; + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + z.ZodTypeDef, + unknown + > = z.object({ + idOrName: z.string(), + environmentSlugOrId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + }); + +/** @internal */ +export type GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound = + { + idOrName: string; + environmentSlugOrId: string; + teamId?: string | undefined; + slug?: string | undefined; + }; + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound, + z.ZodTypeDef, + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest + > = z.object({ + idOrName: z.string(), + environmentSlugOrId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$ { + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema` instead. */ + export const inboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema` instead. */ + export const outboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound` instead. */ + export type Outbound = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound; +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestToJSON( + getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest: + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, +): string { + return JSON.stringify( + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema + .parse(getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest), + ); +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestFromJSON( + jsonString: string, +): SafeParseResult< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest' from JSON`, + ); +} + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound = + {}; + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound, + z.ZodTypeDef, + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$ { + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound` instead. */ + export type Outbound = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound; +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBodyToJSON( + getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody: + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, +): string { + return JSON.stringify( + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema + .parse( + getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + ), + ); +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody' from JSON`, + ); +} diff --git a/src/models/getv9projectsidornamecustomenvironmentsop.ts b/src/models/getv9projectsidornamecustomenvironmentsop.ts new file mode 100644 index 00000000..aba1b2da --- /dev/null +++ b/src/models/getv9projectsidornamecustomenvironmentsop.ts @@ -0,0 +1,250 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +export type GetV9ProjectsIdOrNameCustomEnvironmentsRequest = { + /** + * The unique project identifier or the project name + */ + idOrName: string; + /** + * Fetch custom environments for a specific git branch + */ + gitBranch?: string | undefined; + /** + * The Team identifier to perform the request on behalf of. + */ + teamId?: string | undefined; + /** + * The Team slug to perform the request on behalf of. + */ + slug?: string | undefined; +}; + +export type GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments = {}; + +export type GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody = { + environments: Array; +}; + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsRequest$inboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsRequest, + z.ZodTypeDef, + unknown + > = z.object({ + idOrName: z.string(), + gitBranch: z.string().optional(), + teamId: z.string().optional(), + slug: z.string().optional(), + }); + +/** @internal */ +export type GetV9ProjectsIdOrNameCustomEnvironmentsRequest$Outbound = { + idOrName: string; + gitBranch?: string | undefined; + teamId?: string | undefined; + slug?: string | undefined; +}; + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsRequest$Outbound, + z.ZodTypeDef, + GetV9ProjectsIdOrNameCustomEnvironmentsRequest + > = z.object({ + idOrName: z.string(), + gitBranch: z.string().optional(), + teamId: z.string().optional(), + slug: z.string().optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV9ProjectsIdOrNameCustomEnvironmentsRequest$ { + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsRequest$inboundSchema` instead. */ + export const inboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsRequest$inboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema` instead. */ + export const outboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsRequest$Outbound` instead. */ + export type Outbound = + GetV9ProjectsIdOrNameCustomEnvironmentsRequest$Outbound; +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsRequestToJSON( + getV9ProjectsIdOrNameCustomEnvironmentsRequest: + GetV9ProjectsIdOrNameCustomEnvironmentsRequest, +): string { + return JSON.stringify( + GetV9ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema.parse( + getV9ProjectsIdOrNameCustomEnvironmentsRequest, + ), + ); +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsRequestFromJSON( + jsonString: string, +): SafeParseResult< + GetV9ProjectsIdOrNameCustomEnvironmentsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetV9ProjectsIdOrNameCustomEnvironmentsRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'GetV9ProjectsIdOrNameCustomEnvironmentsRequest' from JSON`, + ); +} + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$inboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$Outbound = {}; + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$outboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$Outbound, + z.ZodTypeDef, + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$ { + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$inboundSchema` instead. */ + export const inboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$inboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$outboundSchema` instead. */ + export const outboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$outboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$Outbound` instead. */ + export type Outbound = + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$Outbound; +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentsToJSON( + getV9ProjectsIdOrNameCustomEnvironmentsEnvironments: + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments, +): string { + return JSON.stringify( + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$outboundSchema.parse( + getV9ProjectsIdOrNameCustomEnvironmentsEnvironments, + ), + ); +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentsFromJSON( + jsonString: string, +): SafeParseResult< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments' from JSON`, + ); +} + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody, + z.ZodTypeDef, + unknown + > = z.object({ + environments: z.array( + z.lazy(() => + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$inboundSchema + ), + ), + }); + +/** @internal */ +export type GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$Outbound = { + environments: Array< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$Outbound + >; +}; + +/** @internal */ +export const GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$outboundSchema: + z.ZodType< + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$Outbound, + z.ZodTypeDef, + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody + > = z.object({ + environments: z.array( + z.lazy(() => + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironments$outboundSchema + ), + ), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$ { + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema` instead. */ + export const inboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$outboundSchema; + /** @deprecated use `GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$Outbound` instead. */ + export type Outbound = + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$Outbound; +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsResponseBodyToJSON( + getV9ProjectsIdOrNameCustomEnvironmentsResponseBody: + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody, +): string { + return JSON.stringify( + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$outboundSchema.parse( + getV9ProjectsIdOrNameCustomEnvironmentsResponseBody, + ), + ); +} + +export function getV9ProjectsIdOrNameCustomEnvironmentsResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody' from JSON`, + ); +} diff --git a/src/models/getwebhookop.ts b/src/models/getwebhookop.ts index 6589be3d..705f8515 100644 --- a/src/models/getwebhookop.ts +++ b/src/models/getwebhookop.ts @@ -46,6 +46,9 @@ export const GetWebhookEvents = { IntegrationConfigurationRemoved: "integration-configuration.removed", IntegrationConfigurationScopeChangeConfirmed: "integration-configuration.scope-change-confirmed", + IntegrationResourceProjectConnected: "integration-resource.project-connected", + IntegrationResourceProjectDisconnected: + "integration-resource.project-disconnected", ProjectCreated: "project.created", ProjectRemoved: "project.removed", DeploymentChecksCompletedLegacy: "deployment-checks-completed", @@ -67,8 +70,8 @@ export const GetWebhookEvents = { MarketplaceInvoicePaid: "marketplace.invoice.paid", MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid", MarketplaceInvoiceRefunded: "marketplace.invoice.refunded", - TestWebhook: "observability.anomaly", - undefined: "test-webhook", + ObservabilityAnomaly: "observability.anomaly", + TestWebhook: "test-webhook", } as const; /** * The webhooks events diff --git a/src/models/getwebhooksop.ts b/src/models/getwebhooksop.ts index 56ad2442..70e17c77 100644 --- a/src/models/getwebhooksop.ts +++ b/src/models/getwebhooksop.ts @@ -46,6 +46,9 @@ export const GetWebhooksResponseBodyEvents = { IntegrationConfigurationRemoved: "integration-configuration.removed", IntegrationConfigurationScopeChangeConfirmed: "integration-configuration.scope-change-confirmed", + IntegrationResourceProjectConnected: "integration-resource.project-connected", + IntegrationResourceProjectDisconnected: + "integration-resource.project-disconnected", ProjectCreated: "project.created", ProjectRemoved: "project.removed", DeploymentChecksCompletedLegacy: "deployment-checks-completed", @@ -67,8 +70,8 @@ export const GetWebhooksResponseBodyEvents = { MarketplaceInvoicePaid: "marketplace.invoice.paid", MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid", MarketplaceInvoiceRefunded: "marketplace.invoice.refunded", - TestWebhook: "observability.anomaly", - undefined: "test-webhook", + ObservabilityAnomaly: "observability.anomaly", + TestWebhook: "test-webhook", } as const; /** * The webhooks events @@ -192,6 +195,9 @@ export const ResponseBodyEvents = { IntegrationConfigurationRemoved: "integration-configuration.removed", IntegrationConfigurationScopeChangeConfirmed: "integration-configuration.scope-change-confirmed", + IntegrationResourceProjectConnected: "integration-resource.project-connected", + IntegrationResourceProjectDisconnected: + "integration-resource.project-disconnected", ProjectCreated: "project.created", ProjectRemoved: "project.removed", DeploymentChecksCompletedLegacy: "deployment-checks-completed", @@ -213,8 +219,8 @@ export const ResponseBodyEvents = { MarketplaceInvoicePaid: "marketplace.invoice.paid", MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid", MarketplaceInvoiceRefunded: "marketplace.invoice.refunded", - TestWebhook: "observability.anomaly", - undefined: "test-webhook", + ObservabilityAnomaly: "observability.anomaly", + TestWebhook: "test-webhook", } as const; /** * The webhooks events diff --git a/src/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.ts b/src/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.ts new file mode 100644 index 00000000..769fcb78 --- /dev/null +++ b/src/models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.ts @@ -0,0 +1,433 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +/** + * Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType = + { + Equals: "equals", + StartsWith: "startsWith", + EndsWith: "endsWith", + } as const; +/** + * Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + */ +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType = + ClosedEnum< + typeof PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType + >; + +/** + * How we want to determine a matching branch. This is optional. + */ +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher = + { + /** + * Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + */ + type: PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType; + /** + * Git branch name or portion thereof. + */ + pattern: string; + }; + +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody = + { + /** + * The slug of the custom environment. + */ + slug?: string | undefined; + /** + * Description of the custom environment. This is optional. + */ + description?: string | undefined; + /** + * How we want to determine a matching branch. This is optional. + */ + branchMatcher?: + | PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher + | null + | undefined; + }; + +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest = + { + /** + * The unique project identifier or the project name + */ + idOrName: string; + /** + * The unique custom environment identifier within the project + */ + environmentSlugOrId: string; + /** + * The Team identifier to perform the request on behalf of. + */ + teamId?: string | undefined; + /** + * The Team slug to perform the request on behalf of. + */ + slug?: string | undefined; + requestBody?: + | PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody + | undefined; + }; + +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody = + {}; + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$inboundSchema: + z.ZodNativeEnum< + typeof PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType + > = z.nativeEnum( + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType, + ); + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$outboundSchema: + z.ZodNativeEnum< + typeof PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType + > = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$ { + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$inboundSchema` instead. */ + export const inboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$inboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$outboundSchema` instead. */ + export const outboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$outboundSchema; +} + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$inboundSchema: + z.ZodType< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher, + z.ZodTypeDef, + unknown + > = z.object({ + type: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$inboundSchema, + pattern: z.string(), + }); + +/** @internal */ +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$Outbound = + { + type: string; + pattern: string; + }; + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$outboundSchema: + z.ZodType< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$Outbound, + z.ZodTypeDef, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher + > = z.object({ + type: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdType$outboundSchema, + pattern: z.string(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$ { + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$inboundSchema` instead. */ + export const inboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$inboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$outboundSchema` instead. */ + export const outboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$outboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$Outbound` instead. */ + export type Outbound = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$Outbound; +} + +export function patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcherToJSON( + patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher, +): string { + return JSON.stringify( + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$outboundSchema + .parse( + patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher, + ), + ); +} + +export function patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcherFromJSON( + jsonString: string, +): SafeParseResult< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher' from JSON`, + ); +} + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema: + z.ZodType< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody, + z.ZodTypeDef, + unknown + > = z.object({ + slug: z.string().optional(), + description: z.string().optional(), + branchMatcher: z.nullable( + z.lazy(() => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$inboundSchema + ), + ).optional(), + }); + +/** @internal */ +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound = + { + slug?: string | undefined; + description?: string | undefined; + branchMatcher?: + | PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$Outbound + | null + | undefined; + }; + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema: + z.ZodType< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound, + z.ZodTypeDef, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody + > = z.object({ + slug: z.string().optional(), + description: z.string().optional(), + branchMatcher: z.nullable( + z.lazy(() => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdBranchMatcher$outboundSchema + ), + ).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$ { + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema` instead. */ + export const inboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema` instead. */ + export const outboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound` instead. */ + export type Outbound = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound; +} + +export function patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBodyToJSON( + patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody, +): string { + return JSON.stringify( + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema + .parse( + patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody, + ), + ); +} + +export function patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody' from JSON`, + ); +} + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema: + z.ZodType< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + z.ZodTypeDef, + unknown + > = z.object({ + idOrName: z.string(), + environmentSlugOrId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + RequestBody: z.lazy(() => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$inboundSchema + ).optional(), + }).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); + }); + +/** @internal */ +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound = + { + idOrName: string; + environmentSlugOrId: string; + teamId?: string | undefined; + slug?: string | undefined; + RequestBody?: + | PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$Outbound + | undefined; + }; + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema: + z.ZodType< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound, + z.ZodTypeDef, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest + > = z.object({ + idOrName: z.string(), + environmentSlugOrId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + requestBody: z.lazy(() => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestBody$outboundSchema + ).optional(), + }).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$ { + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema` instead. */ + export const inboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema` instead. */ + export const outboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound` instead. */ + export type Outbound = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$Outbound; +} + +export function patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestToJSON( + patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, +): string { + return JSON.stringify( + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$outboundSchema + .parse( + patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + ), + ); +} + +export function patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequestFromJSON( + jsonString: string, +): SafeParseResult< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest' from JSON`, + ); +} + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema: + z.ZodType< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound = + {}; + +/** @internal */ +export const PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema: + z.ZodType< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound, + z.ZodTypeDef, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$ { + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema; + /** @deprecated use `PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound` instead. */ + export type Outbound = + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$Outbound; +} + +export function patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBodyToJSON( + patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, +): string { + return JSON.stringify( + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$outboundSchema + .parse( + patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + ), + ); +} + +export function patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody' from JSON`, + ); +} diff --git a/src/models/postv1projectsidornamecustomenvironmentsop.ts b/src/models/postv1projectsidornamecustomenvironmentsop.ts new file mode 100644 index 00000000..0931c2ee --- /dev/null +++ b/src/models/postv1projectsidornamecustomenvironmentsop.ts @@ -0,0 +1,382 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +/** + * Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsType = { + Equals: "equals", + StartsWith: "startsWith", + EndsWith: "endsWith", +} as const; +/** + * Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + */ +export type PostV1ProjectsIdOrNameCustomEnvironmentsType = ClosedEnum< + typeof PostV1ProjectsIdOrNameCustomEnvironmentsType +>; + +/** + * How we want to determine a matching branch. This is optional. + */ +export type BranchMatcher = { + /** + * Type of matcher. One of \"equals\", \"startsWith\", or \"endsWith\". + */ + type: PostV1ProjectsIdOrNameCustomEnvironmentsType; + /** + * Git branch name or portion thereof. + */ + pattern: string; +}; + +export type PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody = { + /** + * The slug of the custom environment to create. + */ + slug?: string | undefined; + /** + * Description of the custom environment. This is optional. + */ + description?: string | undefined; + /** + * How we want to determine a matching branch. This is optional. + */ + branchMatcher?: BranchMatcher | undefined; + /** + * Where to copy environment variables from. This is optional. + */ + copyEnvVarsFrom?: string | undefined; +}; + +export type PostV1ProjectsIdOrNameCustomEnvironmentsRequest = { + /** + * The unique project identifier or the project name + */ + idOrName: string; + /** + * The Team identifier to perform the request on behalf of. + */ + teamId?: string | undefined; + /** + * The Team slug to perform the request on behalf of. + */ + slug?: string | undefined; + requestBody?: PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody | undefined; +}; + +export type PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody = {}; + +/** @internal */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PostV1ProjectsIdOrNameCustomEnvironmentsType); + +/** @internal */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsType$outboundSchema: + z.ZodNativeEnum = + PostV1ProjectsIdOrNameCustomEnvironmentsType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostV1ProjectsIdOrNameCustomEnvironmentsType$ { + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsType$inboundSchema` instead. */ + export const inboundSchema = + PostV1ProjectsIdOrNameCustomEnvironmentsType$inboundSchema; + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsType$outboundSchema` instead. */ + export const outboundSchema = + PostV1ProjectsIdOrNameCustomEnvironmentsType$outboundSchema; +} + +/** @internal */ +export const BranchMatcher$inboundSchema: z.ZodType< + BranchMatcher, + z.ZodTypeDef, + unknown +> = z.object({ + type: PostV1ProjectsIdOrNameCustomEnvironmentsType$inboundSchema, + pattern: z.string(), +}); + +/** @internal */ +export type BranchMatcher$Outbound = { + type: string; + pattern: string; +}; + +/** @internal */ +export const BranchMatcher$outboundSchema: z.ZodType< + BranchMatcher$Outbound, + z.ZodTypeDef, + BranchMatcher +> = z.object({ + type: PostV1ProjectsIdOrNameCustomEnvironmentsType$outboundSchema, + pattern: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BranchMatcher$ { + /** @deprecated use `BranchMatcher$inboundSchema` instead. */ + export const inboundSchema = BranchMatcher$inboundSchema; + /** @deprecated use `BranchMatcher$outboundSchema` instead. */ + export const outboundSchema = BranchMatcher$outboundSchema; + /** @deprecated use `BranchMatcher$Outbound` instead. */ + export type Outbound = BranchMatcher$Outbound; +} + +export function branchMatcherToJSON(branchMatcher: BranchMatcher): string { + return JSON.stringify(BranchMatcher$outboundSchema.parse(branchMatcher)); +} + +export function branchMatcherFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BranchMatcher$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BranchMatcher' from JSON`, + ); +} + +/** @internal */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$inboundSchema: + z.ZodType< + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody, + z.ZodTypeDef, + unknown + > = z.object({ + slug: z.string().optional(), + description: z.string().optional(), + branchMatcher: z.lazy(() => BranchMatcher$inboundSchema).optional(), + copyEnvVarsFrom: z.string().optional(), + }); + +/** @internal */ +export type PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$Outbound = { + slug?: string | undefined; + description?: string | undefined; + branchMatcher?: BranchMatcher$Outbound | undefined; + copyEnvVarsFrom?: string | undefined; +}; + +/** @internal */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$outboundSchema: + z.ZodType< + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$Outbound, + z.ZodTypeDef, + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody + > = z.object({ + slug: z.string().optional(), + description: z.string().optional(), + branchMatcher: z.lazy(() => BranchMatcher$outboundSchema).optional(), + copyEnvVarsFrom: z.string().optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$ { + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$inboundSchema` instead. */ + export const inboundSchema = + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$inboundSchema; + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$outboundSchema` instead. */ + export const outboundSchema = + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$outboundSchema; + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$Outbound` instead. */ + export type Outbound = + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$Outbound; +} + +export function postV1ProjectsIdOrNameCustomEnvironmentsRequestBodyToJSON( + postV1ProjectsIdOrNameCustomEnvironmentsRequestBody: + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody, +): string { + return JSON.stringify( + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$outboundSchema.parse( + postV1ProjectsIdOrNameCustomEnvironmentsRequestBody, + ), + ); +} + +export function postV1ProjectsIdOrNameCustomEnvironmentsRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody' from JSON`, + ); +} + +/** @internal */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsRequest$inboundSchema: + z.ZodType< + PostV1ProjectsIdOrNameCustomEnvironmentsRequest, + z.ZodTypeDef, + unknown + > = z.object({ + idOrName: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + RequestBody: z.lazy(() => + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$inboundSchema + ).optional(), + }).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); + }); + +/** @internal */ +export type PostV1ProjectsIdOrNameCustomEnvironmentsRequest$Outbound = { + idOrName: string; + teamId?: string | undefined; + slug?: string | undefined; + RequestBody?: + | PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$Outbound + | undefined; +}; + +/** @internal */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema: + z.ZodType< + PostV1ProjectsIdOrNameCustomEnvironmentsRequest$Outbound, + z.ZodTypeDef, + PostV1ProjectsIdOrNameCustomEnvironmentsRequest + > = z.object({ + idOrName: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + requestBody: z.lazy(() => + PostV1ProjectsIdOrNameCustomEnvironmentsRequestBody$outboundSchema + ).optional(), + }).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostV1ProjectsIdOrNameCustomEnvironmentsRequest$ { + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsRequest$inboundSchema` instead. */ + export const inboundSchema = + PostV1ProjectsIdOrNameCustomEnvironmentsRequest$inboundSchema; + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema` instead. */ + export const outboundSchema = + PostV1ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema; + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsRequest$Outbound` instead. */ + export type Outbound = + PostV1ProjectsIdOrNameCustomEnvironmentsRequest$Outbound; +} + +export function postV1ProjectsIdOrNameCustomEnvironmentsRequestToJSON( + postV1ProjectsIdOrNameCustomEnvironmentsRequest: + PostV1ProjectsIdOrNameCustomEnvironmentsRequest, +): string { + return JSON.stringify( + PostV1ProjectsIdOrNameCustomEnvironmentsRequest$outboundSchema.parse( + postV1ProjectsIdOrNameCustomEnvironmentsRequest, + ), + ); +} + +export function postV1ProjectsIdOrNameCustomEnvironmentsRequestFromJSON( + jsonString: string, +): SafeParseResult< + PostV1ProjectsIdOrNameCustomEnvironmentsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PostV1ProjectsIdOrNameCustomEnvironmentsRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'PostV1ProjectsIdOrNameCustomEnvironmentsRequest' from JSON`, + ); +} + +/** @internal */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema: + z.ZodType< + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$Outbound = {}; + +/** @internal */ +export const PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$outboundSchema: + z.ZodType< + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$Outbound, + z.ZodTypeDef, + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$ { + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema` instead. */ + export const inboundSchema = + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema; + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$outboundSchema` instead. */ + export const outboundSchema = + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$outboundSchema; + /** @deprecated use `PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$Outbound` instead. */ + export type Outbound = + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$Outbound; +} + +export function postV1ProjectsIdOrNameCustomEnvironmentsResponseBodyToJSON( + postV1ProjectsIdOrNameCustomEnvironmentsResponseBody: + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody, +): string { + return JSON.stringify( + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$outboundSchema.parse( + postV1ProjectsIdOrNameCustomEnvironmentsResponseBody, + ), + ); +} + +export function postV1ProjectsIdOrNameCustomEnvironmentsResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody' from JSON`, + ); +} diff --git a/src/models/removebypassipop.ts b/src/models/removebypassipop.ts new file mode 100644 index 00000000..3377ea0d --- /dev/null +++ b/src/models/removebypassipop.ts @@ -0,0 +1,371 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +export type RemoveBypassIpRequestBody2 = { + domain?: string | undefined; + projectScope: boolean; + sourceIp?: string | undefined; + allSources?: boolean | undefined; + note?: string | undefined; +}; + +export type RemoveBypassIpRequestBody1 = { + domain: string; + projectScope?: boolean | undefined; + sourceIp?: string | undefined; + allSources?: boolean | undefined; + note?: string | undefined; +}; + +export type RemoveBypassIpRequestBody = + | RemoveBypassIpRequestBody1 + | RemoveBypassIpRequestBody2; + +export type RemoveBypassIpRequest = { + projectId: string; + /** + * The Team identifier to perform the request on behalf of. + */ + teamId?: string | undefined; + /** + * The Team slug to perform the request on behalf of. + */ + slug?: string | undefined; + requestBody?: + | RemoveBypassIpRequestBody1 + | RemoveBypassIpRequestBody2 + | undefined; +}; + +export type RemoveBypassIpResponseBody = { + ok: boolean; +}; + +/** @internal */ +export const RemoveBypassIpRequestBody2$inboundSchema: z.ZodType< + RemoveBypassIpRequestBody2, + z.ZodTypeDef, + unknown +> = z.object({ + domain: z.string().optional(), + projectScope: z.boolean(), + sourceIp: z.string().optional(), + allSources: z.boolean().optional(), + note: z.string().optional(), +}); + +/** @internal */ +export type RemoveBypassIpRequestBody2$Outbound = { + domain?: string | undefined; + projectScope: boolean; + sourceIp?: string | undefined; + allSources?: boolean | undefined; + note?: string | undefined; +}; + +/** @internal */ +export const RemoveBypassIpRequestBody2$outboundSchema: z.ZodType< + RemoveBypassIpRequestBody2$Outbound, + z.ZodTypeDef, + RemoveBypassIpRequestBody2 +> = z.object({ + domain: z.string().optional(), + projectScope: z.boolean(), + sourceIp: z.string().optional(), + allSources: z.boolean().optional(), + note: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RemoveBypassIpRequestBody2$ { + /** @deprecated use `RemoveBypassIpRequestBody2$inboundSchema` instead. */ + export const inboundSchema = RemoveBypassIpRequestBody2$inboundSchema; + /** @deprecated use `RemoveBypassIpRequestBody2$outboundSchema` instead. */ + export const outboundSchema = RemoveBypassIpRequestBody2$outboundSchema; + /** @deprecated use `RemoveBypassIpRequestBody2$Outbound` instead. */ + export type Outbound = RemoveBypassIpRequestBody2$Outbound; +} + +export function removeBypassIpRequestBody2ToJSON( + removeBypassIpRequestBody2: RemoveBypassIpRequestBody2, +): string { + return JSON.stringify( + RemoveBypassIpRequestBody2$outboundSchema.parse(removeBypassIpRequestBody2), + ); +} + +export function removeBypassIpRequestBody2FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RemoveBypassIpRequestBody2$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RemoveBypassIpRequestBody2' from JSON`, + ); +} + +/** @internal */ +export const RemoveBypassIpRequestBody1$inboundSchema: z.ZodType< + RemoveBypassIpRequestBody1, + z.ZodTypeDef, + unknown +> = z.object({ + domain: z.string(), + projectScope: z.boolean().optional(), + sourceIp: z.string().optional(), + allSources: z.boolean().optional(), + note: z.string().optional(), +}); + +/** @internal */ +export type RemoveBypassIpRequestBody1$Outbound = { + domain: string; + projectScope?: boolean | undefined; + sourceIp?: string | undefined; + allSources?: boolean | undefined; + note?: string | undefined; +}; + +/** @internal */ +export const RemoveBypassIpRequestBody1$outboundSchema: z.ZodType< + RemoveBypassIpRequestBody1$Outbound, + z.ZodTypeDef, + RemoveBypassIpRequestBody1 +> = z.object({ + domain: z.string(), + projectScope: z.boolean().optional(), + sourceIp: z.string().optional(), + allSources: z.boolean().optional(), + note: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RemoveBypassIpRequestBody1$ { + /** @deprecated use `RemoveBypassIpRequestBody1$inboundSchema` instead. */ + export const inboundSchema = RemoveBypassIpRequestBody1$inboundSchema; + /** @deprecated use `RemoveBypassIpRequestBody1$outboundSchema` instead. */ + export const outboundSchema = RemoveBypassIpRequestBody1$outboundSchema; + /** @deprecated use `RemoveBypassIpRequestBody1$Outbound` instead. */ + export type Outbound = RemoveBypassIpRequestBody1$Outbound; +} + +export function removeBypassIpRequestBody1ToJSON( + removeBypassIpRequestBody1: RemoveBypassIpRequestBody1, +): string { + return JSON.stringify( + RemoveBypassIpRequestBody1$outboundSchema.parse(removeBypassIpRequestBody1), + ); +} + +export function removeBypassIpRequestBody1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RemoveBypassIpRequestBody1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RemoveBypassIpRequestBody1' from JSON`, + ); +} + +/** @internal */ +export const RemoveBypassIpRequestBody$inboundSchema: z.ZodType< + RemoveBypassIpRequestBody, + z.ZodTypeDef, + unknown +> = z.union([ + z.lazy(() => RemoveBypassIpRequestBody1$inboundSchema), + z.lazy(() => RemoveBypassIpRequestBody2$inboundSchema), +]); + +/** @internal */ +export type RemoveBypassIpRequestBody$Outbound = + | RemoveBypassIpRequestBody1$Outbound + | RemoveBypassIpRequestBody2$Outbound; + +/** @internal */ +export const RemoveBypassIpRequestBody$outboundSchema: z.ZodType< + RemoveBypassIpRequestBody$Outbound, + z.ZodTypeDef, + RemoveBypassIpRequestBody +> = z.union([ + z.lazy(() => RemoveBypassIpRequestBody1$outboundSchema), + z.lazy(() => RemoveBypassIpRequestBody2$outboundSchema), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RemoveBypassIpRequestBody$ { + /** @deprecated use `RemoveBypassIpRequestBody$inboundSchema` instead. */ + export const inboundSchema = RemoveBypassIpRequestBody$inboundSchema; + /** @deprecated use `RemoveBypassIpRequestBody$outboundSchema` instead. */ + export const outboundSchema = RemoveBypassIpRequestBody$outboundSchema; + /** @deprecated use `RemoveBypassIpRequestBody$Outbound` instead. */ + export type Outbound = RemoveBypassIpRequestBody$Outbound; +} + +export function removeBypassIpRequestBodyToJSON( + removeBypassIpRequestBody: RemoveBypassIpRequestBody, +): string { + return JSON.stringify( + RemoveBypassIpRequestBody$outboundSchema.parse(removeBypassIpRequestBody), + ); +} + +export function removeBypassIpRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RemoveBypassIpRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RemoveBypassIpRequestBody' from JSON`, + ); +} + +/** @internal */ +export const RemoveBypassIpRequest$inboundSchema: z.ZodType< + RemoveBypassIpRequest, + z.ZodTypeDef, + unknown +> = z.object({ + projectId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + RequestBody: z.union([ + z.lazy(() => RemoveBypassIpRequestBody1$inboundSchema), + z.lazy(() => RemoveBypassIpRequestBody2$inboundSchema), + ]).optional(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type RemoveBypassIpRequest$Outbound = { + projectId: string; + teamId?: string | undefined; + slug?: string | undefined; + RequestBody?: + | RemoveBypassIpRequestBody1$Outbound + | RemoveBypassIpRequestBody2$Outbound + | undefined; +}; + +/** @internal */ +export const RemoveBypassIpRequest$outboundSchema: z.ZodType< + RemoveBypassIpRequest$Outbound, + z.ZodTypeDef, + RemoveBypassIpRequest +> = z.object({ + projectId: z.string(), + teamId: z.string().optional(), + slug: z.string().optional(), + requestBody: z.union([ + z.lazy(() => RemoveBypassIpRequestBody1$outboundSchema), + z.lazy(() => RemoveBypassIpRequestBody2$outboundSchema), + ]).optional(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RemoveBypassIpRequest$ { + /** @deprecated use `RemoveBypassIpRequest$inboundSchema` instead. */ + export const inboundSchema = RemoveBypassIpRequest$inboundSchema; + /** @deprecated use `RemoveBypassIpRequest$outboundSchema` instead. */ + export const outboundSchema = RemoveBypassIpRequest$outboundSchema; + /** @deprecated use `RemoveBypassIpRequest$Outbound` instead. */ + export type Outbound = RemoveBypassIpRequest$Outbound; +} + +export function removeBypassIpRequestToJSON( + removeBypassIpRequest: RemoveBypassIpRequest, +): string { + return JSON.stringify( + RemoveBypassIpRequest$outboundSchema.parse(removeBypassIpRequest), + ); +} + +export function removeBypassIpRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RemoveBypassIpRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RemoveBypassIpRequest' from JSON`, + ); +} + +/** @internal */ +export const RemoveBypassIpResponseBody$inboundSchema: z.ZodType< + RemoveBypassIpResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + ok: z.boolean(), +}); + +/** @internal */ +export type RemoveBypassIpResponseBody$Outbound = { + ok: boolean; +}; + +/** @internal */ +export const RemoveBypassIpResponseBody$outboundSchema: z.ZodType< + RemoveBypassIpResponseBody$Outbound, + z.ZodTypeDef, + RemoveBypassIpResponseBody +> = z.object({ + ok: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RemoveBypassIpResponseBody$ { + /** @deprecated use `RemoveBypassIpResponseBody$inboundSchema` instead. */ + export const inboundSchema = RemoveBypassIpResponseBody$inboundSchema; + /** @deprecated use `RemoveBypassIpResponseBody$outboundSchema` instead. */ + export const outboundSchema = RemoveBypassIpResponseBody$outboundSchema; + /** @deprecated use `RemoveBypassIpResponseBody$Outbound` instead. */ + export type Outbound = RemoveBypassIpResponseBody$Outbound; +} + +export function removeBypassIpResponseBodyToJSON( + removeBypassIpResponseBody: RemoveBypassIpResponseBody, +): string { + return JSON.stringify( + RemoveBypassIpResponseBody$outboundSchema.parse(removeBypassIpResponseBody), + ); +} + +export function removeBypassIpResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RemoveBypassIpResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RemoveBypassIpResponseBody' from JSON`, + ); +} diff --git a/src/models/removeprojectenvop.ts b/src/models/removeprojectenvop.ts index 07ad1a5a..744e30cd 100644 --- a/src/models/removeprojectenvop.ts +++ b/src/models/removeprojectenvop.ts @@ -17,6 +17,10 @@ export type RemoveProjectEnvRequest = { * The unique environment variable identifier */ id: string; + /** + * The unique custom environment identifier within the project + */ + customEnvironmentId?: string | undefined; /** * The Team identifier to perform the request on behalf of. */ @@ -1085,6 +1089,7 @@ export const RemoveProjectEnvRequest$inboundSchema: z.ZodType< > = z.object({ idOrName: z.string(), id: z.string(), + customEnvironmentId: z.string().optional(), teamId: z.string().optional(), slug: z.string().optional(), }); @@ -1093,6 +1098,7 @@ export const RemoveProjectEnvRequest$inboundSchema: z.ZodType< export type RemoveProjectEnvRequest$Outbound = { idOrName: string; id: string; + customEnvironmentId?: string | undefined; teamId?: string | undefined; slug?: string | undefined; }; @@ -1105,6 +1111,7 @@ export const RemoveProjectEnvRequest$outboundSchema: z.ZodType< > = z.object({ idOrName: z.string(), id: z.string(), + customEnvironmentId: z.string().optional(), teamId: z.string().optional(), slug: z.string().optional(), }); diff --git a/src/models/teamlimited.ts b/src/models/teamlimited.ts index 1a519ffa..3ebee87d 100644 --- a/src/models/teamlimited.ts +++ b/src/models/teamlimited.ts @@ -88,6 +88,12 @@ export const Role = { } as const; export type Role = ClosedEnum; +export const AdditionalRoles = { + CreateProject: "CreateProject", + FullProductionDeployment: "FullProductionDeployment", +} as const; +export type AdditionalRoles = ClosedEnum; + export const Origin = { Link: "link", Saml: "saml", @@ -129,6 +135,7 @@ export type Membership = { confirmedAt: number; accessRequestedAt?: number | undefined; role: Role; + additionalRoles?: Array | undefined; teamId?: string | undefined; createdAt: number; created: number; @@ -418,6 +425,27 @@ export namespace Role$ { export const outboundSchema = Role$outboundSchema; } +/** @internal */ +export const AdditionalRoles$inboundSchema: z.ZodNativeEnum< + typeof AdditionalRoles +> = z.nativeEnum(AdditionalRoles); + +/** @internal */ +export const AdditionalRoles$outboundSchema: z.ZodNativeEnum< + typeof AdditionalRoles +> = AdditionalRoles$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AdditionalRoles$ { + /** @deprecated use `AdditionalRoles$inboundSchema` instead. */ + export const inboundSchema = AdditionalRoles$inboundSchema; + /** @deprecated use `AdditionalRoles$outboundSchema` instead. */ + export const outboundSchema = AdditionalRoles$outboundSchema; +} + /** @internal */ export const Origin$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Origin); @@ -573,6 +601,7 @@ export const Membership$inboundSchema: z.ZodType< confirmedAt: z.number(), accessRequestedAt: z.number().optional(), role: Role$inboundSchema, + additionalRoles: z.array(AdditionalRoles$inboundSchema).optional(), teamId: z.string().optional(), createdAt: z.number(), created: z.number(), @@ -587,6 +616,7 @@ export type Membership$Outbound = { confirmedAt: number; accessRequestedAt?: number | undefined; role: string; + additionalRoles?: Array | undefined; teamId?: string | undefined; createdAt: number; created: number; @@ -605,6 +635,7 @@ export const Membership$outboundSchema: z.ZodType< confirmedAt: z.number(), accessRequestedAt: z.number().optional(), role: Role$outboundSchema, + additionalRoles: z.array(AdditionalRoles$outboundSchema).optional(), teamId: z.string().optional(), createdAt: z.number(), created: z.number(), diff --git a/src/models/updateprojectdatacacheop.ts b/src/models/updateprojectdatacacheop.ts index 09d90ff0..41355146 100644 --- a/src/models/updateprojectdatacacheop.ts +++ b/src/models/updateprojectdatacacheop.ts @@ -509,7 +509,7 @@ export type UpdateProjectDataCacheProjectsResponse200ApplicationJSONType = typeof UpdateProjectDataCacheProjectsResponse200ApplicationJSONType >; -export type BranchMatcher = { +export type UpdateProjectDataCacheProjectsBranchMatcher = { type: UpdateProjectDataCacheProjectsResponse200ApplicationJSONType; pattern: string; }; @@ -602,7 +602,7 @@ export type LatestDeployments = { aliasError?: UpdateProjectDataCacheProjectsAliasError | null | undefined; aliasFinal?: string | null | undefined; automaticAliases?: Array | undefined; - branchMatcher?: BranchMatcher | undefined; + branchMatcher?: UpdateProjectDataCacheProjectsBranchMatcher | undefined; buildingAt?: number | undefined; builds?: Array | undefined; checksConclusion?: UpdateProjectDataCacheProjectsChecksConclusion | undefined; @@ -790,8 +790,10 @@ export type FunctionDefaultMemoryType = ClosedEnum< >; export type UpdateProjectDataCacheResourceConfig = { + functionDefaultRegion?: string | undefined; functionDefaultTimeout?: number | undefined; functionDefaultMemoryType?: FunctionDefaultMemoryType | undefined; + functionZeroConfigFailover?: boolean | undefined; allowServerlessConcurrency?: boolean | undefined; elasticConcurrencyEnabled?: boolean | undefined; }; @@ -3972,57 +3974,74 @@ export namespace UpdateProjectDataCacheProjectsResponse200ApplicationJSONType$ { } /** @internal */ -export const BranchMatcher$inboundSchema: z.ZodType< - BranchMatcher, - z.ZodTypeDef, - unknown -> = z.object({ - type: - UpdateProjectDataCacheProjectsResponse200ApplicationJSONType$inboundSchema, - pattern: z.string(), -}); +export const UpdateProjectDataCacheProjectsBranchMatcher$inboundSchema: + z.ZodType< + UpdateProjectDataCacheProjectsBranchMatcher, + z.ZodTypeDef, + unknown + > = z.object({ + type: + UpdateProjectDataCacheProjectsResponse200ApplicationJSONType$inboundSchema, + pattern: z.string(), + }); /** @internal */ -export type BranchMatcher$Outbound = { +export type UpdateProjectDataCacheProjectsBranchMatcher$Outbound = { type: string; pattern: string; }; /** @internal */ -export const BranchMatcher$outboundSchema: z.ZodType< - BranchMatcher$Outbound, - z.ZodTypeDef, - BranchMatcher -> = z.object({ - type: - UpdateProjectDataCacheProjectsResponse200ApplicationJSONType$outboundSchema, - pattern: z.string(), -}); +export const UpdateProjectDataCacheProjectsBranchMatcher$outboundSchema: + z.ZodType< + UpdateProjectDataCacheProjectsBranchMatcher$Outbound, + z.ZodTypeDef, + UpdateProjectDataCacheProjectsBranchMatcher + > = z.object({ + type: + UpdateProjectDataCacheProjectsResponse200ApplicationJSONType$outboundSchema, + pattern: z.string(), + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace BranchMatcher$ { - /** @deprecated use `BranchMatcher$inboundSchema` instead. */ - export const inboundSchema = BranchMatcher$inboundSchema; - /** @deprecated use `BranchMatcher$outboundSchema` instead. */ - export const outboundSchema = BranchMatcher$outboundSchema; - /** @deprecated use `BranchMatcher$Outbound` instead. */ - export type Outbound = BranchMatcher$Outbound; +export namespace UpdateProjectDataCacheProjectsBranchMatcher$ { + /** @deprecated use `UpdateProjectDataCacheProjectsBranchMatcher$inboundSchema` instead. */ + export const inboundSchema = + UpdateProjectDataCacheProjectsBranchMatcher$inboundSchema; + /** @deprecated use `UpdateProjectDataCacheProjectsBranchMatcher$outboundSchema` instead. */ + export const outboundSchema = + UpdateProjectDataCacheProjectsBranchMatcher$outboundSchema; + /** @deprecated use `UpdateProjectDataCacheProjectsBranchMatcher$Outbound` instead. */ + export type Outbound = UpdateProjectDataCacheProjectsBranchMatcher$Outbound; } -export function branchMatcherToJSON(branchMatcher: BranchMatcher): string { - return JSON.stringify(BranchMatcher$outboundSchema.parse(branchMatcher)); +export function updateProjectDataCacheProjectsBranchMatcherToJSON( + updateProjectDataCacheProjectsBranchMatcher: + UpdateProjectDataCacheProjectsBranchMatcher, +): string { + return JSON.stringify( + UpdateProjectDataCacheProjectsBranchMatcher$outboundSchema.parse( + updateProjectDataCacheProjectsBranchMatcher, + ), + ); } -export function branchMatcherFromJSON( +export function updateProjectDataCacheProjectsBranchMatcherFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult< + UpdateProjectDataCacheProjectsBranchMatcher, + SDKValidationError +> { return safeParse( jsonString, - (x) => BranchMatcher$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BranchMatcher' from JSON`, + (x) => + UpdateProjectDataCacheProjectsBranchMatcher$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateProjectDataCacheProjectsBranchMatcher' from JSON`, ); } @@ -4412,7 +4431,9 @@ export const LatestDeployments$inboundSchema: z.ZodType< ).optional(), aliasFinal: z.nullable(z.string()).optional(), automaticAliases: z.array(z.string()).optional(), - branchMatcher: z.lazy(() => BranchMatcher$inboundSchema).optional(), + branchMatcher: z.lazy(() => + UpdateProjectDataCacheProjectsBranchMatcher$inboundSchema + ).optional(), buildingAt: z.number().optional(), builds: z.array( z.lazy(() => UpdateProjectDataCacheProjectsBuilds$inboundSchema), @@ -4464,7 +4485,9 @@ export type LatestDeployments$Outbound = { | undefined; aliasFinal?: string | null | undefined; automaticAliases?: Array | undefined; - branchMatcher?: BranchMatcher$Outbound | undefined; + branchMatcher?: + | UpdateProjectDataCacheProjectsBranchMatcher$Outbound + | undefined; buildingAt?: number | undefined; builds?: Array | undefined; checksConclusion?: string | undefined; @@ -4512,7 +4535,9 @@ export const LatestDeployments$outboundSchema: z.ZodType< ).optional(), aliasFinal: z.nullable(z.string()).optional(), automaticAliases: z.array(z.string()).optional(), - branchMatcher: z.lazy(() => BranchMatcher$outboundSchema).optional(), + branchMatcher: z.lazy(() => + UpdateProjectDataCacheProjectsBranchMatcher$outboundSchema + ).optional(), buildingAt: z.number().optional(), builds: z.array( z.lazy(() => UpdateProjectDataCacheProjectsBuilds$outboundSchema), @@ -5421,16 +5446,20 @@ export const UpdateProjectDataCacheResourceConfig$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + functionDefaultRegion: z.string().optional(), functionDefaultTimeout: z.number().optional(), functionDefaultMemoryType: FunctionDefaultMemoryType$inboundSchema.optional(), + functionZeroConfigFailover: z.boolean().optional(), allowServerlessConcurrency: z.boolean().optional(), elasticConcurrencyEnabled: z.boolean().optional(), }); /** @internal */ export type UpdateProjectDataCacheResourceConfig$Outbound = { + functionDefaultRegion?: string | undefined; functionDefaultTimeout?: number | undefined; functionDefaultMemoryType?: string | undefined; + functionZeroConfigFailover?: boolean | undefined; allowServerlessConcurrency?: boolean | undefined; elasticConcurrencyEnabled?: boolean | undefined; }; @@ -5441,9 +5470,11 @@ export const UpdateProjectDataCacheResourceConfig$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateProjectDataCacheResourceConfig > = z.object({ + functionDefaultRegion: z.string().optional(), functionDefaultTimeout: z.number().optional(), functionDefaultMemoryType: FunctionDefaultMemoryType$outboundSchema .optional(), + functionZeroConfigFailover: z.boolean().optional(), allowServerlessConcurrency: z.boolean().optional(), elasticConcurrencyEnabled: z.boolean().optional(), }); diff --git a/src/models/updateprojectop.ts b/src/models/updateprojectop.ts index 5055aca7..f6f2a641 100644 --- a/src/models/updateprojectop.ts +++ b/src/models/updateprojectop.ts @@ -1101,10 +1101,12 @@ export type UpdateProjectFunctionDefaultMemoryType = ClosedEnum< >; export type UpdateProjectResourceConfig = { + functionDefaultRegion?: string | undefined; functionDefaultTimeout?: number | undefined; functionDefaultMemoryType?: | UpdateProjectFunctionDefaultMemoryType | undefined; + functionZeroConfigFailover?: boolean | undefined; allowServerlessConcurrency?: boolean | undefined; elasticConcurrencyEnabled?: boolean | undefined; }; @@ -6432,17 +6434,21 @@ export const UpdateProjectResourceConfig$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + functionDefaultRegion: z.string().optional(), functionDefaultTimeout: z.number().optional(), functionDefaultMemoryType: UpdateProjectFunctionDefaultMemoryType$inboundSchema.optional(), + functionZeroConfigFailover: z.boolean().optional(), allowServerlessConcurrency: z.boolean().optional(), elasticConcurrencyEnabled: z.boolean().optional(), }); /** @internal */ export type UpdateProjectResourceConfig$Outbound = { + functionDefaultRegion?: string | undefined; functionDefaultTimeout?: number | undefined; functionDefaultMemoryType?: string | undefined; + functionZeroConfigFailover?: boolean | undefined; allowServerlessConcurrency?: boolean | undefined; elasticConcurrencyEnabled?: boolean | undefined; }; @@ -6453,9 +6459,11 @@ export const UpdateProjectResourceConfig$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateProjectResourceConfig > = z.object({ + functionDefaultRegion: z.string().optional(), functionDefaultTimeout: z.number().optional(), functionDefaultMemoryType: UpdateProjectFunctionDefaultMemoryType$outboundSchema.optional(), + functionZeroConfigFailover: z.boolean().optional(), allowServerlessConcurrency: z.boolean().optional(), elasticConcurrencyEnabled: z.boolean().optional(), }); diff --git a/src/models/updateresourcesecretsbyidop.ts b/src/models/updateresourcesecretsbyidop.ts new file mode 100644 index 00000000..81faea0a --- /dev/null +++ b/src/models/updateresourcesecretsbyidop.ts @@ -0,0 +1,222 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; + +export type UpdateResourceSecretsByIdSecrets = { + name: string; + value: string; + prefix?: string | undefined; +}; + +export type UpdateResourceSecretsByIdRequestBody = { + secrets: Array; +}; + +export type UpdateResourceSecretsByIdRequest = { + integrationConfigurationId: string; + resourceId: string; + requestBody?: UpdateResourceSecretsByIdRequestBody | undefined; +}; + +/** @internal */ +export const UpdateResourceSecretsByIdSecrets$inboundSchema: z.ZodType< + UpdateResourceSecretsByIdSecrets, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + value: z.string(), + prefix: z.string().optional(), +}); + +/** @internal */ +export type UpdateResourceSecretsByIdSecrets$Outbound = { + name: string; + value: string; + prefix?: string | undefined; +}; + +/** @internal */ +export const UpdateResourceSecretsByIdSecrets$outboundSchema: z.ZodType< + UpdateResourceSecretsByIdSecrets$Outbound, + z.ZodTypeDef, + UpdateResourceSecretsByIdSecrets +> = z.object({ + name: z.string(), + value: z.string(), + prefix: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateResourceSecretsByIdSecrets$ { + /** @deprecated use `UpdateResourceSecretsByIdSecrets$inboundSchema` instead. */ + export const inboundSchema = UpdateResourceSecretsByIdSecrets$inboundSchema; + /** @deprecated use `UpdateResourceSecretsByIdSecrets$outboundSchema` instead. */ + export const outboundSchema = UpdateResourceSecretsByIdSecrets$outboundSchema; + /** @deprecated use `UpdateResourceSecretsByIdSecrets$Outbound` instead. */ + export type Outbound = UpdateResourceSecretsByIdSecrets$Outbound; +} + +export function updateResourceSecretsByIdSecretsToJSON( + updateResourceSecretsByIdSecrets: UpdateResourceSecretsByIdSecrets, +): string { + return JSON.stringify( + UpdateResourceSecretsByIdSecrets$outboundSchema.parse( + updateResourceSecretsByIdSecrets, + ), + ); +} + +export function updateResourceSecretsByIdSecretsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateResourceSecretsByIdSecrets$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateResourceSecretsByIdSecrets' from JSON`, + ); +} + +/** @internal */ +export const UpdateResourceSecretsByIdRequestBody$inboundSchema: z.ZodType< + UpdateResourceSecretsByIdRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + secrets: z.array( + z.lazy(() => UpdateResourceSecretsByIdSecrets$inboundSchema), + ), +}); + +/** @internal */ +export type UpdateResourceSecretsByIdRequestBody$Outbound = { + secrets: Array; +}; + +/** @internal */ +export const UpdateResourceSecretsByIdRequestBody$outboundSchema: z.ZodType< + UpdateResourceSecretsByIdRequestBody$Outbound, + z.ZodTypeDef, + UpdateResourceSecretsByIdRequestBody +> = z.object({ + secrets: z.array( + z.lazy(() => UpdateResourceSecretsByIdSecrets$outboundSchema), + ), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateResourceSecretsByIdRequestBody$ { + /** @deprecated use `UpdateResourceSecretsByIdRequestBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateResourceSecretsByIdRequestBody$inboundSchema; + /** @deprecated use `UpdateResourceSecretsByIdRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateResourceSecretsByIdRequestBody$outboundSchema; + /** @deprecated use `UpdateResourceSecretsByIdRequestBody$Outbound` instead. */ + export type Outbound = UpdateResourceSecretsByIdRequestBody$Outbound; +} + +export function updateResourceSecretsByIdRequestBodyToJSON( + updateResourceSecretsByIdRequestBody: UpdateResourceSecretsByIdRequestBody, +): string { + return JSON.stringify( + UpdateResourceSecretsByIdRequestBody$outboundSchema.parse( + updateResourceSecretsByIdRequestBody, + ), + ); +} + +export function updateResourceSecretsByIdRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateResourceSecretsByIdRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateResourceSecretsByIdRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateResourceSecretsByIdRequest$inboundSchema: z.ZodType< + UpdateResourceSecretsByIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + integrationConfigurationId: z.string(), + resourceId: z.string(), + RequestBody: z.lazy(() => UpdateResourceSecretsByIdRequestBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateResourceSecretsByIdRequest$Outbound = { + integrationConfigurationId: string; + resourceId: string; + RequestBody?: UpdateResourceSecretsByIdRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const UpdateResourceSecretsByIdRequest$outboundSchema: z.ZodType< + UpdateResourceSecretsByIdRequest$Outbound, + z.ZodTypeDef, + UpdateResourceSecretsByIdRequest +> = z.object({ + integrationConfigurationId: z.string(), + resourceId: z.string(), + requestBody: z.lazy(() => UpdateResourceSecretsByIdRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateResourceSecretsByIdRequest$ { + /** @deprecated use `UpdateResourceSecretsByIdRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateResourceSecretsByIdRequest$inboundSchema; + /** @deprecated use `UpdateResourceSecretsByIdRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateResourceSecretsByIdRequest$outboundSchema; + /** @deprecated use `UpdateResourceSecretsByIdRequest$Outbound` instead. */ + export type Outbound = UpdateResourceSecretsByIdRequest$Outbound; +} + +export function updateResourceSecretsByIdRequestToJSON( + updateResourceSecretsByIdRequest: UpdateResourceSecretsByIdRequest, +): string { + return JSON.stringify( + UpdateResourceSecretsByIdRequest$outboundSchema.parse( + updateResourceSecretsByIdRequest, + ), + ); +} + +export function updateResourceSecretsByIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateResourceSecretsByIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateResourceSecretsByIdRequest' from JSON`, + ); +} diff --git a/src/sdk/environment.ts b/src/sdk/environment.ts new file mode 100644 index 00000000..88fef3e6 --- /dev/null +++ b/src/sdk/environment.ts @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "../funcs/environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js"; +import { environmentGetV9ProjectsIdOrNameCustomEnvironments } from "../funcs/environmentGetV9ProjectsIdOrNameCustomEnvironments.js"; +import { environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "../funcs/environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js"; +import { environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "../funcs/environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js"; +import { environmentPostV1ProjectsIdOrNameCustomEnvironments } from "../funcs/environmentPostV1ProjectsIdOrNameCustomEnvironments.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import { + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, +} from "../models/deletev9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; +import { + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, +} from "../models/getv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; +import { + GetV9ProjectsIdOrNameCustomEnvironmentsRequest, + GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody, +} from "../models/getv9projectsidornamecustomenvironmentsop.js"; +import { + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody, +} from "../models/patchv9projectsidornamecustomenvironmentsenvironmentslugoridop.js"; +import { + PostV1ProjectsIdOrNameCustomEnvironmentsRequest, + PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody, +} from "../models/postv1projectsidornamecustomenvironmentsop.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Environment extends ClientSDK { + /** + * Create a custom environment for the current project. + * + * @remarks + * Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'. + */ + async postV1ProjectsIdOrNameCustomEnvironments( + request: PostV1ProjectsIdOrNameCustomEnvironmentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(environmentPostV1ProjectsIdOrNameCustomEnvironments( + this, + request, + options, + )); + } + + /** + * Retrieve custom environments + * + * @remarks + * Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'. + */ + async getV9ProjectsIdOrNameCustomEnvironments( + request: GetV9ProjectsIdOrNameCustomEnvironmentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(environmentGetV9ProjectsIdOrNameCustomEnvironments( + this, + request, + options, + )); + } + + /** + * Retrieve a custom environment + * + * @remarks + * Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'. + */ + async getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + request: GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + options?: RequestOptions, + ): Promise< + GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + > { + return unwrapAsync( + environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + this, + request, + options, + ), + ); + } + + /** + * Update a custom environment + * + * @remarks + * Update a custom environment for the project. Must not be named 'Production' or 'Preview'. + */ + async patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + request: + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + options?: RequestOptions, + ): Promise< + PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + > { + return unwrapAsync( + environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + this, + request, + options, + ), + ); + } + + /** + * Remove a custom environment + * + * @remarks + * Remove a custom environment for the project. Must not be named 'Production' or 'Preview'. + */ + async deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + request: + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest, + options?: RequestOptions, + ): Promise< + DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody + > { + return unwrapAsync( + environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId( + this, + request, + options, + ), + ); + } +} diff --git a/src/sdk/marketplace.ts b/src/sdk/marketplace.ts index a0c134ec..2e8826d8 100644 --- a/src/sdk/marketplace.ts +++ b/src/sdk/marketplace.ts @@ -11,6 +11,7 @@ import { marketplaceSubmitBillingData } from "../funcs/marketplaceSubmitBillingD import { marketplaceSubmitInvoice } from "../funcs/marketplaceSubmitInvoice.js"; import { marketplaceUpdateInvoice } from "../funcs/marketplaceUpdateInvoice.js"; import { marketplaceUpdateResourceSecrets } from "../funcs/marketplaceUpdateResourceSecrets.js"; +import { marketplaceUpdateResourceSecretsById } from "../funcs/marketplaceUpdateResourceSecretsById.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { CreateEventRequest } from "../models/createeventop.js"; import { @@ -35,6 +36,7 @@ import { SubmitInvoiceResponseBody, } from "../models/submitinvoiceop.js"; import { UpdateInvoiceRequest } from "../models/updateinvoiceop.js"; +import { UpdateResourceSecretsByIdRequest } from "../models/updateresourcesecretsbyidop.js"; import { UpdateResourceSecretsRequest } from "../models/updateresourcesecretsop.js"; import { unwrapAsync } from "../types/fp.js"; @@ -159,10 +161,10 @@ export class Marketplace extends ClientSDK { } /** - * Update Resource Secrets + * Update Resource Secrets (Deprecated) * * @remarks - * This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
+ * This endpoint is deprecated and replaced with the endpoint [Update Resource Secrets](#update-resource-secrets).
This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
*/ async updateResourceSecrets( request: UpdateResourceSecretsRequest, @@ -175,6 +177,23 @@ export class Marketplace extends ClientSDK { )); } + /** + * Update Resource Secrets + * + * @remarks + * This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
+ */ + async updateResourceSecretsById( + request: UpdateResourceSecretsByIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(marketplaceUpdateResourceSecretsById( + this, + request, + options, + )); + } + /** * SSO Token Exchange * diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 9a2ab7fa..96af7c7b 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -13,6 +13,7 @@ import { Deployments } from "./deployments.js"; import { Dns } from "./dns.js"; import { Domains } from "./domains.js"; import { EdgeConfig } from "./edgeconfig.js"; +import { Environment } from "./environment.js"; import { Integrations } from "./integrations.js"; import { LogDrains } from "./logdrains.js"; import { Marketplace } from "./marketplace.js"; @@ -94,6 +95,11 @@ export class Vercel extends ClientSDK { return (this._projectMembers ??= new ProjectMembers(this._options)); } + private _environment?: Environment; + get environment(): Environment { + return (this._environment ??= new Environment(this._options)); + } + private _security?: Security; get security(): Security { return (this._security ??= new Security(this._options)); diff --git a/src/sdk/security.ts b/src/sdk/security.ts index 39cdbba1..0b5ee4f8 100644 --- a/src/sdk/security.ts +++ b/src/sdk/security.ts @@ -2,11 +2,22 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { securityAddBypassIp } from "../funcs/securityAddBypassIp.js"; +import { securityGetBypassIp } from "../funcs/securityGetBypassIp.js"; import { securityGetFirewallConfig } from "../funcs/securityGetFirewallConfig.js"; import { securityPutFirewallConfig } from "../funcs/securityPutFirewallConfig.js"; +import { securityRemoveBypassIp } from "../funcs/securityRemoveBypassIp.js"; import { securityUpdateAttackChallengeMode } from "../funcs/securityUpdateAttackChallengeMode.js"; import { securityUpdateFirewallConfig } from "../funcs/securityUpdateFirewallConfig.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import { + AddBypassIpRequest, + AddBypassIpResponseBody, +} from "../models/addbypassipop.js"; +import { + GetBypassIpRequest, + GetBypassIpResponseBody, +} from "../models/getbypassipop.js"; import { GetFirewallConfigRequest, GetFirewallConfigResponseBody, @@ -15,6 +26,10 @@ import { PutFirewallConfigRequest, PutFirewallConfigResponseBody, } from "../models/putfirewallconfigop.js"; +import { + RemoveBypassIpRequest, + RemoveBypassIpResponseBody, +} from "../models/removebypassipop.js"; import { UpdateAttackChallengeModeRequest, UpdateAttackChallengeModeResponseBody, @@ -93,4 +108,55 @@ export class Security extends ClientSDK { options, )); } + + /** + * Read System Bypass + * + * @remarks + * Retrieve the system bypass rules configured for the specified project + */ + async getBypassIp( + request: GetBypassIpRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(securityGetBypassIp( + this, + request, + options, + )); + } + + /** + * Create System Bypass Rule + * + * @remarks + * Create new system bypass rules + */ + async addBypassIp( + request: AddBypassIpRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(securityAddBypassIp( + this, + request, + options, + )); + } + + /** + * Remove System Bypass Rule + * + * @remarks + * Remove system bypass rules + */ + async removeBypassIp( + request: RemoveBypassIpRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(securityRemoveBypassIp( + this, + request, + options, + )); + } } diff --git a/vercel-spec.json b/vercel-spec.json index 144f9415..75c27f85 100644 --- a/vercel-spec.json +++ b/vercel-spec.json @@ -32,6 +32,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -110,6 +111,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -122,6 +124,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -184,6 +187,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -258,6 +262,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -270,6 +275,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -394,7 +400,9 @@ "access-groups" ], "responses": { - "200": {}, + "200": { + "description": "" + }, "400": { "description": "One of the provided values in the request query is invalid.", "content": { @@ -406,6 +414,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -418,6 +427,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -472,6 +482,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -556,6 +567,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -568,6 +580,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -658,6 +671,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -780,6 +794,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -792,6 +807,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -901,6 +917,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -962,6 +979,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -974,6 +992,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -1084,6 +1103,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -1172,6 +1192,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -1184,6 +1205,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -1264,6 +1286,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -1316,6 +1339,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -1328,6 +1352,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -1415,6 +1440,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -1467,6 +1493,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -1479,6 +1506,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -1550,6 +1578,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -1602,6 +1631,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -1614,6 +1644,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -1710,7 +1741,9 @@ "access-groups" ], "responses": { - "200": {}, + "200": { + "description": "" + }, "400": { "description": "One of the provided values in the request query is invalid.", "content": { @@ -1722,6 +1755,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -1734,6 +1768,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -1820,6 +1855,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -1947,6 +1983,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -1970,6 +2007,7 @@ } }, "400": { + "description": "", "content": { "application/json": { "schema": { @@ -1979,6 +2017,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -2066,6 +2105,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -2180,7 +2220,8 @@ } }, "required": true - } + }, + "x-speakeasy-test": false }, "get": { "description": "Downloads a cache artifact indentified by its `hash` specified on the request path. The artifact is downloaded as an octet-stream. The client should verify the content-length header and response body.", @@ -2218,6 +2259,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -2325,6 +2367,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -2398,6 +2441,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -2459,6 +2503,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -2537,6 +2582,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -2757,6 +2803,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -2873,6 +2920,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -3089,6 +3137,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -3159,6 +3208,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -3374,6 +3424,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -3453,6 +3504,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -3668,6 +3720,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -3954,6 +4007,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -3973,6 +4027,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -4054,6 +4109,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -5365,6 +5421,9 @@ }, "resourceConfig": { "properties": { + "functionDefaultRegion": { + "type": "string" + }, "functionDefaultTimeout": { "type": "number" }, @@ -5376,6 +5435,9 @@ "performance" ] }, + "functionZeroConfigFailover": { + "type": "boolean" + }, "allowServerlessConcurrency": { "type": "boolean" }, @@ -7413,6 +7475,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -7425,6 +7488,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -7509,6 +7573,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -7520,7 +7585,9 @@ "403": { "description": "You do not have permission to access this resource." }, - "500": {} + "500": { + "description": "" + } }, "parameters": [ { @@ -11822,6 +11889,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -11837,6 +11905,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -11899,6 +11968,10 @@ "schema": { "additionalProperties": false, "properties": { + "customEnvironmentSlugOrId": { + "description": "Deploy to a custom environment, which will override the default environment", + "type": "string" + }, "deploymentId": { "description": "An deployment id for an existing deployment to redeploy", "type": "string", @@ -12366,6 +12439,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -14028,6 +14102,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -14040,6 +14115,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -14097,6 +14173,7 @@ ], "responses": { "201": { + "description": "", "content": { "application/json": { "schema": { @@ -14141,6 +14218,7 @@ } }, "202": { + "description": "", "content": { "application/json": { "schema": { @@ -14195,6 +14273,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -14206,8 +14285,11 @@ "403": { "description": "You do not have permission to access this resource." }, - "409": {}, + "409": { + "description": "" + }, "429": { + "description": "", "content": { "application/json": { "schema": { @@ -14381,6 +14463,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -14443,6 +14526,95 @@ ] } }, + "/v4/domains/status": { + "get": { + "description": "Check if a domain name is available for purchase.", + "operationId": "checkDomainStatus", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Check a Domain Availability", + "tags": [ + "domains" + ], + "responses": { + "200": { + "description": "Successful response checking if a Domain's name is available.", + "content": { + "application/json": { + "schema": { + "properties": { + "available": { + "type": "boolean" + } + }, + "required": [ + "available" + ], + "type": "object" + } + } + } + }, + "400": { + "description": "One of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + } + }, + "parameters": [ + { + "name": "name", + "description": "The name of the domain for which we would like to check the status.", + "in": "query", + "required": true, + "schema": { + "description": "The name of the domain for which we would like to check the status.", + "type": "string", + "example": "example.com" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ] + } + }, "/v4/domains/{domain}/records": { "get": { "description": "Retrieves a list of DNS records created for a domain name. By default it returns 20 records if no limit is provided. The rest can be retrieved using the pagination options.", @@ -14647,6 +14819,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -14659,6 +14832,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -14729,7 +14903,8 @@ "example": "my-team-url-slug" } } - ] + ], + "x-speakeasy-test": false } }, "/v2/domains/{domain}/records": { @@ -14796,6 +14971,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -14811,6 +14987,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -14819,7 +14996,9 @@ } } }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -15371,6 +15550,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -15448,6 +15628,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -15463,6 +15644,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -15471,7 +15653,9 @@ } } }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -15564,19 +15748,23 @@ "properties": { "target": { "type": "string", + "description": "", "example": "example2.com.", "maxLength": 255, "nullable": true }, "weight": { + "description": "", "type": "integer", "nullable": true }, "port": { + "description": "", "type": "integer", "nullable": true }, "priority": { + "description": "", "type": "integer", "nullable": true } @@ -15592,16 +15780,19 @@ ], "properties": { "priority": { + "description": "", "type": "integer", "nullable": true }, "target": { "type": "string", + "description": "", "example": "example2.com.", "maxLength": 255, "nullable": true }, "params": { + "description": "", "type": "string", "nullable": true } @@ -15659,6 +15850,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -15671,6 +15863,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -15720,94 +15913,6 @@ ] } }, - "/v4/domains/status": { - "get": { - "description": "Check if a domain name is available for purchase.", - "operationId": "checkDomainStatus", - "security": [ - { - "bearerToken": [] - } - ], - "summary": "Check a Domain Availability", - "tags": [ - "domains" - ], - "responses": { - "200": { - "description": "Successful response checking if a Domain's name is available.", - "content": { - "application/json": { - "schema": { - "properties": { - "available": { - "type": "boolean" - } - }, - "required": [ - "available" - ], - "type": "object" - } - } - } - }, - "400": { - "description": "One of the provided values in the request query is invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VercelBadRequestError" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VercelForbiddenError" - } - } - } - }, - "403": { - "description": "You do not have permission to access this resource." - } - }, - "parameters": [ - { - "name": "name", - "description": "The name of the domain for which we would like to check the status.", - "in": "query", - "required": true, - "schema": { - "description": "The name of the domain for which we would like to check the status.", - "type": "string", - "example": "example.com" - } - }, - { - "description": "The Team identifier to perform the request on behalf of.", - "in": "query", - "name": "teamId", - "schema": { - "type": "string", - "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" - } - }, - { - "description": "The Team slug to perform the request on behalf of.", - "in": "query", - "name": "slug", - "schema": { - "type": "string", - "example": "my-team-url-slug" - } - } - ] - } - }, "/v1/domains/{domain}/registry": { "get": { "description": "Fetch domain transfer availability or transfer status if a transfer is in progress.", @@ -15823,6 +15928,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -15873,6 +15979,7 @@ } }, "400": { + "description": "", "content": { "application/json": { "schema": { @@ -15882,6 +15989,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -15940,6 +16048,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -15991,6 +16100,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -16002,7 +16112,9 @@ "403": { "description": "You do not have permission to access this resource." }, - "500": {} + "500": { + "description": "" + } }, "parameters": [ { @@ -16248,6 +16360,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -16260,6 +16373,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -16503,6 +16617,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -16514,7 +16629,9 @@ "403": { "description": "You do not have permission to access this resource." }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -16581,6 +16698,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -16759,6 +16877,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -16774,6 +16893,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -16782,8 +16902,12 @@ } } }, - "409": {}, - "500": {} + "409": { + "description": "" + }, + "500": { + "description": "" + } }, "parameters": [ { @@ -16925,6 +17049,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -16988,6 +17113,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -17000,6 +17126,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -17008,7 +17135,9 @@ } } }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -17062,6 +17191,7 @@ "type": "string" }, "maxItems": 4, + "minItems": 0, "type": "array", "uniqueItems": true }, @@ -17091,7 +17221,8 @@ } }, "required": true - } + }, + "x-speakeasy-test": false } }, "/v6/domains/{domain}": { @@ -17139,6 +17270,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -17151,6 +17283,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -17159,7 +17292,9 @@ } } }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -17305,6 +17440,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -17352,6 +17488,7 @@ ], "responses": { "201": { + "description": "", "content": { "application/json": { "schema": { @@ -17445,6 +17582,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -17656,6 +17794,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -17668,6 +17807,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -17720,6 +17860,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -17813,6 +17954,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -17828,6 +17970,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -17899,92 +18042,8 @@ "edge-config" ], "responses": { - "204": {}, - "400": { - "description": "One of the provided values in the request query is invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VercelBadRequestError" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VercelForbiddenError" - } - } - } - }, - "403": { - "description": "You do not have permission to access this resource." - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VercelNotFoundError" - } - } - } - } - }, - "parameters": [ - { - "name": "edgeConfigId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The Team identifier to perform the request on behalf of.", - "in": "query", - "name": "teamId", - "schema": { - "type": "string", - "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" - } - }, - { - "description": "The Team slug to perform the request on behalf of.", - "in": "query", - "name": "slug", - "schema": { - "type": "string", - "example": "my-team-url-slug" - } - } - ] - } - }, - "/v1/edge-config/{edgeConfigId}/items": { - "get": { - "description": "Returns all items of an Edge Config.", - "operationId": "getEdgeConfigItems", - "security": [ - { - "bearerToken": [] - } - ], - "summary": "Get Edge Config items", - "tags": [ - "edge-config" - ], - "responses": { - "200": { - "description": "The EdgeConfig.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeConfigItem" - } - } - } + "204": { + "description": "" }, "400": { "description": "One of the provided values in the request query is invalid.", @@ -17997,6 +18056,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18009,6 +18069,95 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelNotFoundError" + } + } + } + } + }, + "parameters": [ + { + "name": "edgeConfigId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ] + } + }, + "/v1/edge-config/{edgeConfigId}/items": { + "get": { + "description": "Returns all items of an Edge Config.", + "operationId": "getEdgeConfigItems", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Get Edge Config items", + "tags": [ + "edge-config" + ], + "responses": { + "200": { + "description": "The EdgeConfig.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeConfigItem" + } + } + } + }, + "400": { + "description": "One of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18062,6 +18211,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -18089,6 +18239,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18104,6 +18255,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18112,7 +18264,9 @@ } } }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -18352,6 +18506,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18364,6 +18519,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18416,6 +18572,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -18437,6 +18594,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18452,6 +18610,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18528,7 +18687,9 @@ "edge-config" ], "responses": { - "204": {}, + "204": { + "description": "" + }, "400": { "description": "One of the provided values in the request query is invalid.", "content": { @@ -18540,6 +18701,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18555,6 +18717,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18629,6 +18792,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18641,6 +18805,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18724,6 +18889,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18736,6 +18902,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18787,7 +18954,9 @@ "edge-config" ], "responses": { - "204": {}, + "204": { + "description": "" + }, "400": { "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", "content": { @@ -18799,6 +18968,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18814,6 +18984,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18910,6 +19081,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -18922,6 +19094,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -18984,6 +19157,7 @@ ], "responses": { "201": { + "description": "", "content": { "application/json": { "schema": { @@ -19015,6 +19189,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -19030,6 +19205,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -19104,6 +19280,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -19336,6 +19513,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -19348,6 +19526,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -19392,7 +19571,8 @@ "example": "my-team-url-slug" } } - ] + ], + "x-speakeasy-test": false } }, "/v1/edge-config/{edgeConfigId}/backups": { @@ -19410,6 +19590,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -19484,6 +19665,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -19496,6 +19678,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -19609,6 +19792,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -19718,6 +19902,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -19764,6 +19949,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -19803,6 +19989,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -19838,6 +20025,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -19850,6 +20038,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -19893,7 +20082,9 @@ "marketplace" ], "responses": { - "201": {}, + "201": { + "description": "" + }, "400": { "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", "content": { @@ -19905,6 +20096,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -20007,7 +20199,9 @@ "marketplace" ], "responses": { - "201": {}, + "201": { + "description": "" + }, "400": { "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", "content": { @@ -20019,6 +20213,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -20335,6 +20530,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -20368,6 +20564,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -20570,6 +20767,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -20742,6 +20940,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -20754,6 +20953,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -20797,7 +20997,9 @@ "marketplace" ], "responses": { - "204": {}, + "204": { + "description": "" + }, "400": { "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", "content": { @@ -20809,6 +21011,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -20821,6 +21024,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -20885,19 +21089,21 @@ }, "/v1/installations/{integrationConfigurationId}/products/{integrationProductIdOrSlug}/resources/{resourceId}/secrets": { "put": { - "description": "This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.\u003cbr/\u003e \u003cbr/\u003e Use cases for this endpoint:\u003cbr/\u003e \u003cbr/\u003e - Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.\u003cbr/\u003e", + "description": "This endpoint is deprecated and replaced with the endpoint [Update Resource Secrets](#update-resource-secrets). \u003cbr/\u003e This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.\u003cbr/\u003e \u003cbr/\u003e Use cases for this endpoint:\u003cbr/\u003e \u003cbr/\u003e - Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.\u003cbr/\u003e", "operationId": "update-resource-secrets", "security": [ { "bearerToken": [] } ], - "summary": "Update Resource Secrets", + "summary": "Update Resource Secrets (Deprecated)", "tags": [ "marketplace" ], "responses": { - "201": {}, + "201": { + "description": "" + }, "400": { "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", "content": { @@ -20909,6 +21115,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -20921,6 +21128,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -20996,6 +21204,114 @@ } } }, + "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/secrets": { + "put": { + "description": "This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.\u003cbr/\u003e \u003cbr/\u003e Use cases for this endpoint:\u003cbr/\u003e \u003cbr/\u003e - Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.\u003cbr/\u003e", + "operationId": "update-resource-secrets-by-id", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Update Resource Secrets", + "tags": [ + "marketplace" + ], + "responses": { + "201": { + "description": "" + }, + "400": { + "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelNotFoundError" + } + } + } + } + }, + "parameters": [ + { + "name": "integrationConfigurationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "secrets" + ], + "properties": { + "secrets": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "prefix": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + } + } + } + } + }, "/v1/integrations/configurations": { "get": { "description": "Allows to retrieve all configurations for an authenticated integration. When the `project` view is used, configurations generated for the authorization flow will be filtered out of the results.", @@ -21277,6 +21593,33 @@ }, "assignedBetaLabelAt": { "type": "number" + }, + "tagIds": { + "items": { + "type": "string", + "enum": [ + "tag_ai", + "tag_analytics", + "tag_authentication", + "tag_cms", + "tag_code_repository", + "tag_commerce", + "tag_databases", + "tag_dev_tools", + "tag_experiments", + "tag_logging", + "tag_messaging", + "tag_monitoring", + "tag_observability", + "tag_performance", + "tag_productivity", + "tag_searching", + "tag_security", + "tag_testing", + "tag_video" + ] + }, + "type": "array" } }, "required": [ @@ -21546,6 +21889,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -21611,7 +21955,8 @@ "example": "my-team-url-slug" } } - ] + ], + "x-speakeasy-test": false } }, "/v1/integrations/configuration/{id}": { @@ -22041,6 +22386,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -22122,6 +22468,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -22186,6 +22533,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -22221,6 +22569,7 @@ } }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -22229,8 +22578,11 @@ } } }, - "500": {} + "500": { + "description": "" + } }, + "parameters": [], "requestBody": { "content": { "application/json": { @@ -22435,6 +22787,7 @@ } }, "400": { + "description": "", "content": { "application/json": { "schema": { @@ -22444,6 +22797,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -22648,6 +23002,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -22800,6 +23155,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -22869,6 +23225,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -22930,6 +23287,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -22983,6 +23341,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -23225,6 +23584,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -23375,6 +23735,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -23387,6 +23748,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -23438,7 +23800,9 @@ "logDrains" ], "responses": { - "204": {}, + "204": { + "description": "" + }, "400": { "description": "One of the provided values in the request query is invalid.", "content": { @@ -23450,6 +23814,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -23462,6 +23827,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -23516,6 +23882,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -23669,6 +24036,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -23724,6 +24092,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -23874,6 +24243,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -24159,6 +24529,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -24246,94 +24617,98 @@ "example": "my-team-url-slug" } } - ] - }, - "post": { - "description": "Adds a new member to the project.", - "operationId": "addProjectMember", - "security": [ - { - "bearerToken": [] - } - ], - "summary": "Adds a new member to a project.", - "tags": [ - "projectMembers" - ], - "responses": { - "200": { - "description": "Responds with the project ID on success.", - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "description": "Responds with the project ID on success." - } - } - } - }, - "400": { - "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VercelBadRequestError" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VercelForbiddenError" - } - } - } - }, - "403": { - "description": "You do not have permission to access this resource." - }, - "500": {} - }, - "parameters": [ - { - "name": "idOrName", - "description": "The ID or name of the Project.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The ID or name of the Project.", - "example": "prj_pavWOn1iLObbXLRiwVvzmPrTWyTf" - } - }, - { - "description": "The Team identifier to perform the request on behalf of.", - "in": "query", - "name": "teamId", - "schema": { - "type": "string", - "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" - } - }, - { - "description": "The Team slug to perform the request on behalf of.", - "in": "query", - "name": "slug", - "schema": { - "type": "string", - "example": "my-team-url-slug" - } - } + ], + "x-speakeasy-test": false + }, + "post": { + "description": "Adds a new member to the project.", + "operationId": "addProjectMember", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Adds a new member to a project.", + "tags": [ + "projectMembers" + ], + "responses": { + "200": { + "description": "Responds with the project ID on success.", + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "description": "Responds with the project ID on success." + } + } + } + }, + "400": { + "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "500": { + "description": "" + } + }, + "parameters": [ + { + "name": "idOrName", + "description": "The ID or name of the Project.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The ID or name of the Project.", + "example": "prj_pavWOn1iLObbXLRiwVvzmPrTWyTf" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } ], "requestBody": { "content": { @@ -24413,6 +24788,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -24440,6 +24816,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -25828,6 +26205,9 @@ }, "resourceConfig": { "properties": { + "functionDefaultRegion": { + "type": "string" + }, "functionDefaultTimeout": { "type": "number" }, @@ -25839,6 +26219,9 @@ "performance" ] }, + "functionZeroConfigFailover": { + "type": "boolean" + }, "allowServerlessConcurrency": { "type": "boolean" }, @@ -27889,6 +28272,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -29348,6 +29732,9 @@ }, "resourceConfig": { "properties": { + "functionDefaultRegion": { + "type": "string" + }, "functionDefaultTimeout": { "type": "number" }, @@ -29359,6 +29746,9 @@ "performance" ] }, + "functionZeroConfigFailover": { + "type": "boolean" + }, "allowServerlessConcurrency": { "type": "boolean" }, @@ -31396,6 +31786,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -33007,6 +33398,9 @@ }, "resourceConfig": { "properties": { + "functionDefaultRegion": { + "type": "string" + }, "functionDefaultTimeout": { "type": "number" }, @@ -33018,6 +33412,9 @@ "performance" ] }, + "functionZeroConfigFailover": { + "type": "boolean" + }, "allowServerlessConcurrency": { "type": "boolean" }, @@ -35055,6 +35452,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -36426,6 +36824,9 @@ }, "resourceConfig": { "properties": { + "functionDefaultRegion": { + "type": "string" + }, "functionDefaultTimeout": { "type": "number" }, @@ -36437,6 +36838,9 @@ "performance" ] }, + "functionZeroConfigFailover": { + "type": "boolean" + }, "allowServerlessConcurrency": { "type": "boolean" }, @@ -38474,6 +38878,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -38482,7 +38887,9 @@ } } }, - "402": {}, + "402": { + "description": "" + }, "403": { "description": "You do not have permission to access this resource." }, @@ -38911,6 +39318,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -38922,7 +39330,9 @@ "403": { "description": "You do not have permission to access this resource." }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -38957,116 +39367,170 @@ ] } }, - "/v9/projects/{idOrName}/domains": { + "/v1/projects/{idOrName}/custom-environments": { + "post": { + "description": "Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'.", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Create a custom environment for the current project.", + "tags": [ + "environment" + ], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "402": { + "description": "The account was soft-blocked for an unhandled reason.\nThe account is missing a payment so payment method must be updated" + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "500": { + "description": "" + } + }, + "parameters": [ + { + "name": "idOrName", + "description": "The unique project identifier or the project name", + "in": "path", + "required": true, + "schema": { + "description": "The unique project identifier or the project name", + "type": "string" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "slug": { + "description": "The slug of the custom environment to create.", + "type": "string", + "maxLength": 32, + "errorMessage": "Slug must be 32 characters or less." + }, + "description": { + "description": "Description of the custom environment. This is optional.", + "type": "string", + "maxLength": 256, + "errorMessage": "Description must be 256 characters or less." + }, + "branchMatcher": { + "required": [ + "type", + "pattern" + ], + "description": "How we want to determine a matching branch. This is optional.", + "type": "object", + "properties": { + "type": { + "description": "Type of matcher. One of \\\"equals\\\", \\\"startsWith\\\", or \\\"endsWith\\\".", + "enum": [ + "equals", + "startsWith", + "endsWith" + ] + }, + "pattern": { + "description": "Git branch name or portion thereof.", + "type": "string", + "maxLength": 100, + "errorMessage": "Branch matcher pattern must be 100 characters or less." + } + } + }, + "copyEnvVarsFrom": { + "description": "Where to copy environment variables from. This is optional.", + "type": "string" + } + } + } + } + } + } + } + }, + "/v9/projects/{idOrName}/custom-environments": { "get": { - "description": "Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.", - "operationId": "getProjectDomains", + "description": "Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'.", "security": [ { "bearerToken": [] } ], - "summary": "Retrieve project domains by project by id or name", + "summary": "Retrieve custom environments", "tags": [ - "projects" + "environment" ], "responses": { "200": { - "description": "Successful response retrieving a list of domains", + "description": "", "content": { "application/json": { "schema": { "properties": { - "domains": { + "environments": { "items": { - "properties": { - "name": { - "type": "string" - }, - "apexName": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "redirect": { - "nullable": true, - "type": "string" - }, - "redirectStatusCode": { - "nullable": true, - "type": "number", - "enum": [ - 307, - 301, - 302, - 308 - ] - }, - "gitBranch": { - "nullable": true, - "type": "string" - }, - "customEnvironmentId": { - "nullable": true, - "type": "string" - }, - "updatedAt": { - "type": "number" - }, - "createdAt": { - "type": "number" - }, - "verified": { - "type": "boolean", - "description": "`true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed." - }, - "verification": { - "items": { - "properties": { - "type": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "value": { - "type": "string" - }, - "reason": { - "type": "string" - } - }, - "required": [ - "type", - "domain", - "value", - "reason" - ], - "type": "object", - "description": "A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`." - }, - "type": "array", - "description": "A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`." - } - }, - "required": [ - "name", - "apexName", - "projectId", - "verified" - ], "type": "object" }, "type": "array" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" } }, "required": [ - "domains", - "pagination" + "environments" ], "type": "object" } @@ -39084,6 +39548,531 @@ } }, "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + } + }, + "parameters": [ + { + "name": "idOrName", + "description": "The unique project identifier or the project name", + "in": "path", + "required": true, + "schema": { + "description": "The unique project identifier or the project name", + "type": "string" + } + }, + { + "name": "gitBranch", + "description": "Fetch custom environments for a specific git branch", + "in": "query", + "required": false, + "schema": { + "description": "Fetch custom environments for a specific git branch", + "type": "string" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ] + } + }, + "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}": { + "get": { + "description": "Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'.", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Retrieve a custom environment", + "tags": [ + "environment" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "One of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelNotFoundError" + } + } + } + } + }, + "parameters": [ + { + "name": "idOrName", + "description": "The unique project identifier or the project name", + "in": "path", + "required": true, + "schema": { + "description": "The unique project identifier or the project name", + "type": "string" + } + }, + { + "name": "environmentSlugOrId", + "description": "The unique custom environment identifier within the project", + "in": "path", + "required": true, + "schema": { + "description": "The unique custom environment identifier within the project", + "type": "string" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ] + }, + "patch": { + "description": "Update a custom environment for the project. Must not be named 'Production' or 'Preview'.", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Update a custom environment", + "tags": [ + "environment" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "402": { + "description": "The account was soft-blocked for an unhandled reason.\nThe account is missing a payment so payment method must be updated" + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "500": { + "description": "" + } + }, + "parameters": [ + { + "name": "idOrName", + "description": "The unique project identifier or the project name", + "in": "path", + "required": true, + "schema": { + "description": "The unique project identifier or the project name", + "type": "string" + } + }, + { + "name": "environmentSlugOrId", + "description": "The unique custom environment identifier within the project", + "in": "path", + "required": true, + "schema": { + "description": "The unique custom environment identifier within the project", + "type": "string" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "slug": { + "description": "The slug of the custom environment.", + "type": "string", + "maxLength": 32, + "errorMessage": "Slug must be 32 characters or less." + }, + "description": { + "description": "Description of the custom environment. This is optional.", + "type": "string", + "maxLength": 256, + "errorMessage": "Description must be 256 characters or less." + }, + "branchMatcher": { + "required": [ + "type", + "pattern" + ], + "description": "How we want to determine a matching branch. This is optional.", + "type": "object", + "properties": { + "type": { + "description": "Type of matcher. One of \\\"equals\\\", \\\"startsWith\\\", or \\\"endsWith\\\".", + "enum": [ + "equals", + "startsWith", + "endsWith" + ] + }, + "pattern": { + "description": "Git branch name or portion thereof.", + "type": "string", + "maxLength": 100, + "errorMessage": "Branch matcher pattern must be 100 characters or less." + } + }, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "description": "Remove a custom environment for the project. Must not be named 'Production' or 'Preview'.", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Remove a custom environment", + "tags": [ + "environment" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + } + }, + "parameters": [ + { + "name": "idOrName", + "description": "The unique project identifier or the project name", + "in": "path", + "required": true, + "schema": { + "description": "The unique project identifier or the project name", + "type": "string" + } + }, + { + "name": "environmentSlugOrId", + "description": "The unique custom environment identifier within the project", + "in": "path", + "required": true, + "schema": { + "description": "The unique custom environment identifier within the project", + "type": "string" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleteUnassignedEnvironmentVariables": { + "description": "Delete Environment Variables that are not assigned to any environments.", + "type": "boolean" + } + } + } + } + } + } + } + }, + "/v9/projects/{idOrName}/domains": { + "get": { + "description": "Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.", + "operationId": "getProjectDomains", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Retrieve project domains by project by id or name", + "tags": [ + "projects" + ], + "responses": { + "200": { + "description": "Successful response retrieving a list of domains", + "content": { + "application/json": { + "schema": { + "properties": { + "domains": { + "items": { + "properties": { + "name": { + "type": "string" + }, + "apexName": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "redirect": { + "nullable": true, + "type": "string" + }, + "redirectStatusCode": { + "nullable": true, + "type": "number", + "enum": [ + 307, + 301, + 302, + 308 + ] + }, + "gitBranch": { + "nullable": true, + "type": "string" + }, + "customEnvironmentId": { + "nullable": true, + "type": "string" + }, + "updatedAt": { + "type": "number" + }, + "createdAt": { + "type": "number" + }, + "verified": { + "type": "boolean", + "description": "`true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed." + }, + "verification": { + "items": { + "properties": { + "type": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "value": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "type", + "domain", + "value", + "reason" + ], + "type": "object", + "description": "A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`." + }, + "type": "array", + "description": "A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`." + } + }, + "required": [ + "name", + "apexName", + "projectId", + "verified" + ], + "type": "object" + }, + "type": "array" + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "domains", + "pagination" + ], + "type": "object" + } + } + } + }, + "400": { + "description": "One of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", "content": { "application/json": { "schema": { @@ -39139,6 +40128,17 @@ "type": "string" } }, + { + "name": "customEnvironmentId", + "description": "The unique custom environment identifier within the project", + "in": "query", + "required": false, + "schema": { + "description": "The unique custom environment identifier within the project", + "type": "string", + "example": "env_123abc4567" + } + }, { "name": "gitBranch", "description": "Filters domains based on specific branch.", @@ -39270,6 +40270,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -39366,6 +40367,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -39531,6 +40533,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -39660,6 +40663,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -39672,6 +40676,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -39839,6 +40844,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -40019,6 +41025,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -41356,6 +42363,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -41419,6 +42427,28 @@ "example": "vercel-cli:pull" } }, + { + "name": "customEnvironmentId", + "description": "The unique custom environment identifier within the project", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "The unique custom environment identifier within the project", + "example": "env_123abc4567" + } + }, + { + "name": "customEnvironmentSlug", + "description": "The custom environment slug (name) within the project", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "The custom environment slug (name) within the project", + "example": "my-custom-env" + } + }, { "description": "The Team identifier to perform the request on behalf of.", "in": "query", @@ -41437,7 +42467,8 @@ "example": "my-team-url-slug" } } - ] + ], + "x-speakeasy-test": false } }, "/v1/projects/{idOrName}/env/{id}": { @@ -41455,6 +42486,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -42692,6 +43724,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -43694,6 +44727,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -45187,6 +46221,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -45199,6 +46234,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -45234,6 +46270,17 @@ "example": "XMbOEya1gUUO1ir4" } }, + { + "name": "customEnvironmentId", + "description": "The unique custom environment identifier within the project", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "The unique custom environment identifier within the project", + "example": "env_123abc4567" + } + }, { "description": "The Team identifier to perform the request on behalf of.", "in": "query", @@ -45693,6 +46740,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -45818,7 +46866,8 @@ } }, "required": true - } + }, + "x-speakeasy-test": false } }, "/v1/projects/{idOrName}/protection-bypass": { @@ -45836,6 +46885,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -45882,6 +46932,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -45894,6 +46945,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -45902,7 +46954,9 @@ } } }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -45992,7 +47046,9 @@ "projects" ], "responses": { - "201": {}, + "201": { + "description": "" + }, "400": { "description": "One of the provided values in the request query is invalid.", "content": { @@ -46004,6 +47060,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -46015,7 +47072,9 @@ "403": { "description": "You do not have permission to access this resource." }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -46070,6 +47129,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -46127,6 +47187,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -46139,6 +47200,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -46237,6 +47299,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -46268,6 +47331,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -46280,6 +47344,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -46352,6 +47417,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -46939,6 +48005,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -46947,11 +48014,14 @@ } } }, - "402": {}, + "402": { + "description": "" + }, "403": { "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -46960,7 +48030,9 @@ } } }, - "500": {} + "500": { + "description": "" + } }, "parameters": [ { @@ -47546,6 +48618,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -47565,6 +48638,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -47573,11 +48647,14 @@ } } }, - "402": {}, + "402": { + "description": "" + }, "403": { "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -47586,7 +48663,9 @@ } } }, - "500": {} + "500": { + "description": "" + } }, "parameters": [ { @@ -49015,6 +50094,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -49027,6 +50107,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -49064,15 +50145,684 @@ } }, { - "description": "The deployed configVersion for the firewall configuration", - "in": "path", - "name": "configVersion", + "description": "The deployed configVersion for the firewall configuration", + "in": "path", + "name": "configVersion", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/v1/security/firewall/bypass": { + "get": { + "description": "Retrieve the system bypass rules configured for the specified project", + "operationId": "getBypassIp", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Read System Bypass", + "tags": [ + "security" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "properties": { + "result": { + "items": { + "properties": { + "OwnerId": { + "type": "string" + }, + "Id": { + "type": "string" + }, + "Domain": { + "type": "string" + }, + "Ip": { + "type": "string" + }, + "ProjectId": { + "type": "string" + }, + "IsProjectRule": { + "type": "boolean" + } + }, + "required": [ + "OwnerId", + "Id", + "Domain", + "Ip", + "ProjectId", + "IsProjectRule" + ], + "type": "object" + }, + "type": "array" + }, + "pagination": { + "nullable": true + } + }, + "required": [ + "result", + "pagination" + ], + "type": "object" + }, + { + "properties": { + "result": { + "items": { + "properties": { + "OwnerId": { + "type": "string" + }, + "Id": { + "type": "string" + }, + "Domain": { + "type": "string" + }, + "Ip": { + "type": "string" + }, + "Action": { + "type": "string", + "enum": [ + "block", + "bypass" + ] + }, + "ProjectId": { + "type": "string" + }, + "IsProjectRule": { + "type": "boolean" + }, + "Note": { + "type": "string" + }, + "CreatedAt": { + "type": "string" + }, + "ActorId": { + "type": "string" + }, + "UpdatedAt": { + "type": "string" + }, + "UpdatedAtHour": { + "type": "string" + }, + "DeletedAt": { + "type": "string" + }, + "ExpiresAt": { + "type": "number" + } + }, + "required": [ + "OwnerId", + "Id", + "Domain", + "Ip", + "CreatedAt", + "UpdatedAt", + "UpdatedAtHour" + ], + "type": "object" + }, + "type": "array" + }, + "pagination": { + "properties": { + "OwnerId": { + "type": "string" + }, + "Id": { + "type": "string" + } + }, + "required": [ + "OwnerId", + "Id" + ], + "type": "object" + } + }, + "type": "object" + } + ] + } + } + } + }, + "400": { + "description": "One of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelNotFoundError" + } + } + } + }, + "500": { + "description": "" + } + }, + "parameters": [ + { + "name": "projectId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "number", + "example": 10, + "maximum": 128 + } + }, + { + "name": "sourceIp", + "description": "Filter by source IP", + "in": "query", + "required": false, + "schema": { + "description": "Filter by source IP", + "type": "string", + "maxLength": 49 + } + }, + { + "name": "domain", + "description": "Filter by domain", + "in": "query", + "required": false, + "schema": { + "description": "Filter by domain", + "type": "string", + "pattern": "([a-z]+[a-z.]+)$", + "maxLength": 2544 + } + }, + { + "name": "projectScope", + "description": "Filter by project scoped rules", + "in": "query", + "required": false, + "schema": { + "description": "Filter by project scoped rules", + "type": "boolean" + } + }, + { + "name": "offset", + "description": "Used for pagination. Retrieves results after the provided id", + "in": "query", + "required": false, + "schema": { + "description": "Used for pagination. Retrieves results after the provided id", + "type": "string", + "maxLength": 2560 + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ] + }, + "post": { + "description": "Create new system bypass rules", + "operationId": "addBypassIp", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Create System Bypass Rule", + "tags": [ + "security" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "properties": { + "ok": { + "type": "boolean" + }, + "result": { + "items": { + "properties": { + "OwnerId": { + "type": "string" + }, + "Id": { + "type": "string" + }, + "Domain": { + "type": "string" + }, + "Ip": { + "type": "string" + }, + "ProjectId": { + "type": "string" + }, + "IsProjectRule": { + "type": "boolean" + } + }, + "required": [ + "OwnerId", + "Id", + "Domain", + "ProjectId", + "IsProjectRule" + ], + "type": "object" + }, + "type": "array" + }, + "pagination": { + "nullable": true + } + }, + "required": [ + "ok", + "result", + "pagination" + ], + "type": "object" + }, + { + "properties": { + "ok": { + "type": "boolean" + }, + "result": { + "items": { + "properties": { + "OwnerId": { + "type": "string" + }, + "Id": { + "type": "string" + }, + "Domain": { + "type": "string" + }, + "Ip": { + "type": "string" + }, + "Action": { + "type": "string", + "enum": [ + "block", + "bypass" + ] + }, + "ProjectId": { + "type": "string" + }, + "IsProjectRule": { + "type": "boolean" + }, + "Note": { + "type": "string" + }, + "CreatedAt": { + "type": "string" + }, + "ActorId": { + "type": "string" + }, + "UpdatedAt": { + "type": "string" + }, + "UpdatedAtHour": { + "type": "string" + }, + "DeletedAt": { + "type": "string" + }, + "ExpiresAt": { + "type": "number" + } + }, + "required": [ + "OwnerId", + "Id", + "Domain", + "Ip", + "CreatedAt", + "UpdatedAt", + "UpdatedAtHour" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "ok" + ], + "type": "object" + } + ] + } + } + } + }, + "400": { + "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelNotFoundError" + } + } + } + }, + "500": { + "description": "" + } + }, + "parameters": [ + { + "name": "projectId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "domain" + ] + }, + { + "required": [ + "projectScope" + ] + } + ], + "properties": { + "domain": { + "type": "string", + "pattern": "([a-z]+[a-z.]+)$", + "maxLength": 2544 + }, + "projectScope": { + "type": "boolean" + }, + "sourceIp": { + "type": "string" + }, + "allSources": { + "type": "boolean" + }, + "note": { + "type": "string", + "maxLength": 500 + } + } + } + } + } + } + }, + "delete": { + "description": "Remove system bypass rules", + "operationId": "removeBypassIp", + "security": [ + { + "bearerToken": [] + } + ], + "summary": "Remove System Bypass Rule", + "tags": [ + "security" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "ok": { + "type": "boolean" + } + }, + "required": [ + "ok" + ], + "type": "object" + } + } + } + }, + "400": { + "description": "One of the provided values in the request body is invalid.\nOne of the provided values in the request query is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelBadRequestError" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelForbiddenError" + } + } + } + }, + "403": { + "description": "You do not have permission to access this resource." + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VercelNotFoundError" + } + } + } + }, + "500": { + "description": "" + } + }, + "parameters": [ + { + "name": "projectId", + "in": "query", "required": true, "schema": { "type": "string" } + }, + { + "description": "The Team identifier to perform the request on behalf of.", + "in": "query", + "name": "teamId", + "schema": { + "type": "string", + "example": "team_1a2b3c4d5e6f7g8h9i0j1k2l" + } + }, + { + "description": "The Team slug to perform the request on behalf of.", + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "example": "my-team-url-slug" + } } - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "domain" + ] + }, + { + "required": [ + "projectScope" + ] + } + ], + "properties": { + "domain": { + "type": "string", + "pattern": "([a-z]+[a-z.]+)$", + "maxLength": 2544 + }, + "projectScope": { + "type": "boolean" + }, + "sourceIp": { + "type": "string" + }, + "allSources": { + "type": "boolean" + }, + "note": { + "type": "string", + "maxLength": 500 + } + } + } + } + } + } } }, "/v2/teams/{teamId}/members": { @@ -49090,6 +50840,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -49152,6 +50903,14 @@ "description": "Role of this user in the team.", "example": "OWNER" }, + "additionalRoles": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Permissions that this user has in addition to their role.", + "example": "['createProjects']" + }, "uid": { "type": "string", "description": "The ID of this user.", @@ -49389,6 +51148,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -49610,6 +51370,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -49631,7 +51392,9 @@ } } }, - "503": {} + "503": { + "description": "" + } }, "parameters": [ { @@ -49713,7 +51476,8 @@ } }, "required": true - } + }, + "x-speakeasy-test": false } }, "/v1/teams/{teamId}/request": { @@ -49860,6 +51624,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -49881,7 +51646,9 @@ } } }, - "503": {} + "503": { + "description": "" + } }, "parameters": [ { @@ -50127,6 +51894,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -50236,6 +52004,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -50244,11 +52013,14 @@ } } }, - "402": {}, + "402": { + "description": "" + }, "403": { "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -50342,7 +52114,9 @@ } } }, - "402": {}, + "402": { + "description": "" + }, "403": { "description": "You do not have permission to access this resource." }, @@ -50356,7 +52130,9 @@ } } }, - "500": {} + "500": { + "description": "" + } }, "parameters": [ { @@ -50494,6 +52270,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -50515,7 +52292,9 @@ } } }, - "503": {} + "503": { + "description": "" + } }, "parameters": [ { @@ -50588,6 +52367,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -50645,6 +52425,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -50664,6 +52445,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -50672,7 +52454,9 @@ } } }, - "402": {}, + "402": { + "description": "" + }, "403": { "description": "You do not have permission to access this resource.\nNot authorized to update the team. Must be an OWNER." }, @@ -50718,6 +52502,7 @@ "avatar": { "type": "string", "format": "regex", + "regex": "^[0-9a-f]{40}$", "description": "The hash value of an uploaded image." }, "description": { @@ -50729,6 +52514,7 @@ "emailDomain": { "type": "string", "format": "regex", + "regex": "\\\\b((?=[a-z0-9-]{1,63}\\\\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\\\\.)+[a-z]{2,63}\\\\b", "example": "example.com", "nullable": true }, @@ -50901,6 +52687,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51002,6 +52789,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51014,6 +52802,7 @@ "description": "You do not have permission to access this resource." } }, + "parameters": [], "requestBody": { "content": { "application/json": { @@ -51134,6 +52923,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51142,7 +52932,9 @@ } } }, - "402": {}, + "402": { + "description": "" + }, "403": { "description": "You do not have permission to access this resource.\nThe authenticated user can't access the team" }, @@ -51156,7 +52948,9 @@ } } }, - "409": {} + "409": { + "description": "" + } }, "parameters": [ { @@ -51272,6 +53066,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51377,6 +53172,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51491,8 +53287,11 @@ } } }, - "302": {}, + "302": { + "description": "" + }, "400": { + "description": "", "content": { "application/json": { "schema": { @@ -51502,6 +53301,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51513,8 +53313,12 @@ "403": { "description": "You do not have permission to access this resource." }, - "409": {} - } + "409": { + "description": "" + } + }, + "parameters": [], + "x-speakeasy-test": false } }, "/v1/user": { @@ -51572,6 +53376,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51580,11 +53385,14 @@ } } }, - "402": {}, + "402": { + "description": "" + }, "403": { "description": "You do not have permission to access this resource." } }, + "parameters": [], "requestBody": { "content": { "application/json": { @@ -51638,6 +53446,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -51665,6 +53474,7 @@ } }, "400": { + "description": "", "content": { "application/json": { "schema": { @@ -51674,6 +53484,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51685,7 +53496,8 @@ "403": { "description": "You do not have permission to access this resource." } - } + }, + "parameters": [] } }, "/v3/user/tokens": { @@ -51738,6 +53550,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51838,6 +53651,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51921,6 +53735,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -51973,6 +53788,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -52005,6 +53821,8 @@ "integration-configuration.permission-upgraded", "integration-configuration.removed", "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", "project.created", "project.removed", "deployment-checks-completed", @@ -52030,45 +53848,48 @@ "description": "The webhooks events", "example": "deployment.created", "x-speakeasy-enums": [ - "budget.reached,", - "budget.reset,", - "domain.created,", - "deployment.created,", - "deployment.error,", - "deployment.canceled,", - "deployment.succeeded,", - "deployment.ready,", - "deployment.check-rerequested,", - "deployment.promoted,", - "deployment.integration.action.start,", - "deployment.integration.action.cancel,", - "deployment.integration.action.cleanup,", - "edge-config.created,", - "edge-config.deleted,", - "edge-config.items.updated,", - "firewall.attack,", - "integration-configuration.permission-upgraded,", - "integration-configuration.removed,", - "integration-configuration.scope-change-confirmed,", - "project.created,", - "project.removed,", - "deployment-checks-completed-legacy,", - "deployment-ready-legacy,", - "deployment-prepared-legacy,", - "deployment-error-legacy,", - "deployment-check-rerequested-legacy,", - "deployment-canceled-legacy,", - "project-created-legacy,", - "project-removed-legacy,", - "domain-created-legacy,", - "deployment-legacy,", - "integration-configuration-permission-updated-legacy,", - "integration-configuration-removed-legacy,", - "integration-configuration-scope-change-confirmed-legacy,", - "marketplace.invoice.created,", - "marketplace.invoice.paid,", - "marketplace.invoice.notpaid,", - "marketplace.invoice.refunded,", + "budget.reached", + "budget.reset", + "domain.created", + "deployment.created", + "deployment.error", + "deployment.canceled", + "deployment.succeeded", + "deployment.ready", + "deployment.check-rerequested", + "deployment.promoted", + "deployment.integration.action.start", + "deployment.integration.action.cancel", + "deployment.integration.action.cleanup", + "edge-config.created", + "edge-config.deleted", + "edge-config.items.updated", + "firewall.attack", + "integration-configuration.permission-upgraded", + "integration-configuration.removed", + "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", + "project.created", + "project.removed", + "deployment-checks-completed-legacy", + "deployment-ready-legacy", + "deployment-prepared-legacy", + "deployment-error-legacy", + "deployment-check-rerequested-legacy", + "deployment-canceled-legacy", + "project-created-legacy", + "project-removed-legacy", + "domain-created-legacy", + "deployment-legacy", + "integration-configuration-permission-updated-legacy", + "integration-configuration-removed-legacy", + "integration-configuration-scope-change-confirmed-legacy", + "marketplace.invoice.created", + "marketplace.invoice.paid", + "marketplace.invoice.notpaid", + "marketplace.invoice.refunded", + "observability.anomaly", "test-webhook" ] }, @@ -52137,6 +53958,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -52211,6 +54033,8 @@ "integration-configuration.permission-upgraded", "integration-configuration.removed", "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", "project.created", "project.removed", "deployment-checks-completed", @@ -52234,45 +54058,48 @@ "test-webhook" ], "x-speakeasy-enums": [ - "budget.reached,", - "budget.reset,", - "domain.created,", - "deployment.created,", - "deployment.error,", - "deployment.canceled,", - "deployment.succeeded,", - "deployment.ready,", - "deployment.check-rerequested,", - "deployment.promoted,", - "deployment.integration.action.start,", - "deployment.integration.action.cancel,", - "deployment.integration.action.cleanup,", - "edge-config.created,", - "edge-config.deleted,", - "edge-config.items.updated,", - "firewall.attack,", - "integration-configuration.permission-upgraded,", - "integration-configuration.removed,", - "integration-configuration.scope-change-confirmed,", - "project.created,", - "project.removed,", - "deployment-checks-completed-legacy,", - "deployment-ready-legacy,", - "deployment-prepared-legacy,", - "deployment-error-legacy,", - "deployment-check-rerequested-legacy,", - "deployment-canceled-legacy,", - "project-created-legacy,", - "project-removed-legacy,", - "domain-created-legacy,", - "deployment-legacy,", - "integration-configuration-permission-updated-legacy,", - "integration-configuration-removed-legacy,", - "integration-configuration-scope-change-confirmed-legacy,", - "marketplace.invoice.created,", - "marketplace.invoice.paid,", - "marketplace.invoice.notpaid,", - "marketplace.invoice.refunded,", + "budget.reached", + "budget.reset", + "domain.created", + "deployment.created", + "deployment.error", + "deployment.canceled", + "deployment.succeeded", + "deployment.ready", + "deployment.check-rerequested", + "deployment.promoted", + "deployment.integration.action.start", + "deployment.integration.action.cancel", + "deployment.integration.action.cleanup", + "edge-config.created", + "edge-config.deleted", + "edge-config.items.updated", + "firewall.attack", + "integration-configuration.permission-upgraded", + "integration-configuration.removed", + "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", + "project.created", + "project.removed", + "deployment-checks-completed-legacy", + "deployment-ready-legacy", + "deployment-prepared-legacy", + "deployment-error-legacy", + "deployment-check-rerequested-legacy", + "deployment-canceled-legacy", + "project-created-legacy", + "project-removed-legacy", + "domain-created-legacy", + "deployment-legacy", + "integration-configuration-permission-updated-legacy", + "integration-configuration-removed-legacy", + "integration-configuration-scope-change-confirmed-legacy", + "marketplace.invoice.created", + "marketplace.invoice.paid", + "marketplace.invoice.notpaid", + "marketplace.invoice.refunded", + "observability.anomaly", "test-webhook" ] } @@ -52307,6 +54134,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -52411,6 +54239,8 @@ "integration-configuration.permission-upgraded", "integration-configuration.removed", "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", "project.created", "project.removed", "deployment-checks-completed", @@ -52436,45 +54266,48 @@ "description": "The webhooks events", "example": "deployment.created", "x-speakeasy-enums": [ - "budget.reached,", - "budget.reset,", - "domain.created,", - "deployment.created,", - "deployment.error,", - "deployment.canceled,", - "deployment.succeeded,", - "deployment.ready,", - "deployment.check-rerequested,", - "deployment.promoted,", - "deployment.integration.action.start,", - "deployment.integration.action.cancel,", - "deployment.integration.action.cleanup,", - "edge-config.created,", - "edge-config.deleted,", - "edge-config.items.updated,", - "firewall.attack,", - "integration-configuration.permission-upgraded,", - "integration-configuration.removed,", - "integration-configuration.scope-change-confirmed,", - "project.created,", - "project.removed,", - "deployment-checks-completed-legacy,", - "deployment-ready-legacy,", - "deployment-prepared-legacy,", - "deployment-error-legacy,", - "deployment-check-rerequested-legacy,", - "deployment-canceled-legacy,", - "project-created-legacy,", - "project-removed-legacy,", - "domain-created-legacy,", - "deployment-legacy,", - "integration-configuration-permission-updated-legacy,", - "integration-configuration-removed-legacy,", - "integration-configuration-scope-change-confirmed-legacy,", - "marketplace.invoice.created,", - "marketplace.invoice.paid,", - "marketplace.invoice.notpaid,", - "marketplace.invoice.refunded,", + "budget.reached", + "budget.reset", + "domain.created", + "deployment.created", + "deployment.error", + "deployment.canceled", + "deployment.succeeded", + "deployment.ready", + "deployment.check-rerequested", + "deployment.promoted", + "deployment.integration.action.start", + "deployment.integration.action.cancel", + "deployment.integration.action.cleanup", + "edge-config.created", + "edge-config.deleted", + "edge-config.items.updated", + "firewall.attack", + "integration-configuration.permission-upgraded", + "integration-configuration.removed", + "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", + "project.created", + "project.removed", + "deployment-checks-completed-legacy", + "deployment-ready-legacy", + "deployment-prepared-legacy", + "deployment-error-legacy", + "deployment-check-rerequested-legacy", + "deployment-canceled-legacy", + "project-created-legacy", + "project-removed-legacy", + "domain-created-legacy", + "deployment-legacy", + "integration-configuration-permission-updated-legacy", + "integration-configuration-removed-legacy", + "integration-configuration-scope-change-confirmed-legacy", + "marketplace.invoice.created", + "marketplace.invoice.paid", + "marketplace.invoice.notpaid", + "marketplace.invoice.refunded", + "observability.anomaly", "test-webhook" ] }, @@ -52558,6 +54391,8 @@ "integration-configuration.permission-upgraded", "integration-configuration.removed", "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", "project.created", "project.removed", "deployment-checks-completed", @@ -52583,45 +54418,48 @@ "description": "The webhooks events", "example": "deployment.created", "x-speakeasy-enums": [ - "budget.reached,", - "budget.reset,", - "domain.created,", - "deployment.created,", - "deployment.error,", - "deployment.canceled,", - "deployment.succeeded,", - "deployment.ready,", - "deployment.check-rerequested,", - "deployment.promoted,", - "deployment.integration.action.start,", - "deployment.integration.action.cancel,", - "deployment.integration.action.cleanup,", - "edge-config.created,", - "edge-config.deleted,", - "edge-config.items.updated,", - "firewall.attack,", - "integration-configuration.permission-upgraded,", - "integration-configuration.removed,", - "integration-configuration.scope-change-confirmed,", - "project.created,", - "project.removed,", - "deployment-checks-completed-legacy,", - "deployment-ready-legacy,", - "deployment-prepared-legacy,", - "deployment-error-legacy,", - "deployment-check-rerequested-legacy,", - "deployment-canceled-legacy,", - "project-created-legacy,", - "project-removed-legacy,", - "domain-created-legacy,", - "deployment-legacy,", - "integration-configuration-permission-updated-legacy,", - "integration-configuration-removed-legacy,", - "integration-configuration-scope-change-confirmed-legacy,", - "marketplace.invoice.created,", - "marketplace.invoice.paid,", - "marketplace.invoice.notpaid,", - "marketplace.invoice.refunded,", + "budget.reached", + "budget.reset", + "domain.created", + "deployment.created", + "deployment.error", + "deployment.canceled", + "deployment.succeeded", + "deployment.ready", + "deployment.check-rerequested", + "deployment.promoted", + "deployment.integration.action.start", + "deployment.integration.action.cancel", + "deployment.integration.action.cleanup", + "edge-config.created", + "edge-config.deleted", + "edge-config.items.updated", + "firewall.attack", + "integration-configuration.permission-upgraded", + "integration-configuration.removed", + "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", + "project.created", + "project.removed", + "deployment-checks-completed-legacy", + "deployment-ready-legacy", + "deployment-prepared-legacy", + "deployment-error-legacy", + "deployment-check-rerequested-legacy", + "deployment-canceled-legacy", + "project-created-legacy", + "project-removed-legacy", + "domain-created-legacy", + "deployment-legacy", + "integration-configuration-permission-updated-legacy", + "integration-configuration-removed-legacy", + "integration-configuration-scope-change-confirmed-legacy", + "marketplace.invoice.created", + "marketplace.invoice.paid", + "marketplace.invoice.notpaid", + "marketplace.invoice.refunded", + "observability.anomaly", "test-webhook" ] }, @@ -52693,6 +54531,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -52750,6 +54589,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -52778,6 +54618,8 @@ "integration-configuration.permission-upgraded", "integration-configuration.removed", "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", "project.created", "project.removed", "deployment-checks-completed", @@ -52803,45 +54645,48 @@ "description": "The webhooks events", "example": "deployment.created", "x-speakeasy-enums": [ - "budget.reached,", - "budget.reset,", - "domain.created,", - "deployment.created,", - "deployment.error,", - "deployment.canceled,", - "deployment.succeeded,", - "deployment.ready,", - "deployment.check-rerequested,", - "deployment.promoted,", - "deployment.integration.action.start,", - "deployment.integration.action.cancel,", - "deployment.integration.action.cleanup,", - "edge-config.created,", - "edge-config.deleted,", - "edge-config.items.updated,", - "firewall.attack,", - "integration-configuration.permission-upgraded,", - "integration-configuration.removed,", - "integration-configuration.scope-change-confirmed,", - "project.created,", - "project.removed,", - "deployment-checks-completed-legacy,", - "deployment-ready-legacy,", - "deployment-prepared-legacy,", - "deployment-error-legacy,", - "deployment-check-rerequested-legacy,", - "deployment-canceled-legacy,", - "project-created-legacy,", - "project-removed-legacy,", - "domain-created-legacy,", - "deployment-legacy,", - "integration-configuration-permission-updated-legacy,", - "integration-configuration-removed-legacy,", - "integration-configuration-scope-change-confirmed-legacy,", - "marketplace.invoice.created,", - "marketplace.invoice.paid,", - "marketplace.invoice.notpaid,", - "marketplace.invoice.refunded,", + "budget.reached", + "budget.reset", + "domain.created", + "deployment.created", + "deployment.error", + "deployment.canceled", + "deployment.succeeded", + "deployment.ready", + "deployment.check-rerequested", + "deployment.promoted", + "deployment.integration.action.start", + "deployment.integration.action.cancel", + "deployment.integration.action.cleanup", + "edge-config.created", + "edge-config.deleted", + "edge-config.items.updated", + "firewall.attack", + "integration-configuration.permission-upgraded", + "integration-configuration.removed", + "integration-configuration.scope-change-confirmed", + "integration-resource.project-connected", + "integration-resource.project-disconnected", + "project.created", + "project.removed", + "deployment-checks-completed-legacy", + "deployment-ready-legacy", + "deployment-prepared-legacy", + "deployment-error-legacy", + "deployment-check-rerequested-legacy", + "deployment-canceled-legacy", + "project-created-legacy", + "project-removed-legacy", + "domain-created-legacy", + "deployment-legacy", + "integration-configuration-permission-updated-legacy", + "integration-configuration-removed-legacy", + "integration-configuration-scope-change-confirmed-legacy", + "marketplace.invoice.created", + "marketplace.invoice.paid", + "marketplace.invoice.notpaid", + "marketplace.invoice.refunded", + "observability.anomaly", "test-webhook" ] }, @@ -52909,6 +54754,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -52963,7 +54809,9 @@ "webhooks" ], "responses": { - "204": {}, + "204": { + "description": "" + }, "400": { "description": "One of the provided values in the request query is invalid.", "content": { @@ -52975,6 +54823,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -53302,6 +55151,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -53314,6 +55164,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -53698,6 +55549,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -53844,6 +55696,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54095,6 +55948,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54212,6 +56066,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54315,6 +56170,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -54361,6 +56217,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54373,6 +56230,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -54427,6 +56285,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -54446,6 +56305,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54458,6 +56318,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -54514,6 +56375,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -54560,6 +56422,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54575,6 +56438,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -54583,8 +56447,12 @@ } } }, - "449": {}, - "500": {} + "449": { + "description": "" + }, + "500": { + "description": "" + } }, "parameters": [ { @@ -54640,6 +56508,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -54686,6 +56555,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54795,6 +56665,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54874,6 +56745,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -54966,6 +56838,7 @@ ], "responses": { "200": { + "description": "", "content": { "application/json": { "schema": { @@ -55457,6 +57330,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -55469,6 +57343,7 @@ "description": "You do not have permission to access this resource." }, "404": { + "description": "", "content": { "application/json": { "schema": { @@ -55477,7 +57352,9 @@ } } }, - "422": {} + "422": { + "description": "" + } }, "parameters": [ { @@ -55670,6 +57547,7 @@ } }, "401": { + "description": "", "content": { "application/json": { "schema": { @@ -56048,6 +57926,16 @@ "CONTRIBUTOR" ] }, + "additionalRoles": { + "items": { + "type": "string", + "enum": [ + "CreateProject", + "FullProductionDeployment" + ] + }, + "type": "array" + }, "teamId": { "type": "string" }, @@ -56331,6 +58219,7 @@ "type": "string" }, "viewPreference": { + "nullable": true, "type": "string", "enum": [ "list", @@ -56338,6 +58227,7 @@ ] }, "favoritesViewPreference": { + "nullable": true, "type": "string", "enum": [ "open", @@ -56345,6 +58235,7 @@ ] }, "recentsViewPreference": { + "nullable": true, "type": "string", "enum": [ "open", @@ -56384,6 +58275,7 @@ ] }, "importFlowGitProvider": { + "nullable": true, "type": "string", "enum": [ "github", @@ -56617,15 +58509,14 @@ "defaultTeamId": { "nullable": true, "type": "string", - "description": "The user's default team. Only applies if the user's `version` is `'northstar'`." + "description": "The user's default team." }, "version": { - "nullable": true, "type": "string", "enum": [ "northstar" ], - "description": "The user's version. Will either be unset or `northstar`." + "description": "The user's version. Will always be `northstar`." } }, "required": [ @@ -56682,15 +58573,14 @@ "defaultTeamId": { "nullable": true, "type": "string", - "description": "The user's default team. Only applies if the user's `version` is `'northstar'`." + "description": "The user's default team." }, "version": { - "nullable": true, "type": "string", "enum": [ "northstar" ], - "description": "The user's version. Will either be unset or `northstar`." + "description": "The user's version. Will always be `northstar`." } }, "required": [